Re: [Tei-council] Stylesheets: rub out tei: prefix?
Just to point out an option that Syd didn't suggest:
- Use both prefix and xpath-default-namespace. This gives you the tei: prefix when you want to use it, but if you forget, defaults to the TEI namespace anyway.
This is, of course, a _horrible_ idea for which I hope there is no support. Except if we were adopting a process of gradual conversion from prefixed to not.
However, I would point out that xpath-default-namespace is used throughout the Stylesheets repository so that we are *already* inconsistent in our practice. So really we're already doing my horrible idea, though not commonly in a single stylesheet but more metaphorically throughout the repository as a whole.
c.f. https://github.com/TEIC/Stylesheets/search?q=xpath-default-namespace&unscoped_q=xpath-default-namespace
Many thanks,
James
--
Dr James Cummings, James.Cummings@newcastle.ac.uk
Senior Lecturer in Late-Medieval Literature and Digital Humanities
School of English, Newcastle University
________________________________
From: Tei-council
On Jan 4, 2019, at 5:05 AM, Elisa Beshero-Bondar
mailto:ebbondar@gmail.com> wrote: Having worked with setting default namespaces rather a lot in various contexts (XSLT, XQuery, Schematron, I vote enthusiastically for 1). This really just amounts to a change that reduces verbosity, as Syd indicates, but also reflects the default centrality of the TEI in the Stylesheets anyway. And it is a pain to have to remember the default prefix all the time when we gave to edit.
Elisa
Sent from my iPhone
On Jan 4, 2019, at 3:54 AM, Peter Stadler
mailto:pstadler@mail.uni-paderborn.de> wrote: I honestly prefer the verbosity of 5) — and I don’t think these XPath expressions can be significantly simplified nor compressed by removing those namespace prefixes. But just to make double sure: This is just a (proposed) cosmetic change due to your personal preference, right? This wouldn’t be bad thing, though, and I think you deserve to do it your way since you are the ODD one :)
Cheers Peter
Am 04.01.2019 um 02:18 schrieb Syd Bauman
mailto:s.bauman@northeastern.edu>: The current odd2odd.xsl (like most of the stylesheets) uses the explicitly bound namespace prefix "tei:" in XPaths. I am inclined to use @xpath-default-namespace and get rid of them. I think our XPaths are often already long enough to wrap around even a wide screen twice, and things like "ancestor::tei:teiHeader" are just harder to read.
Please vote (fast): 1) I very much want to get rid of the "tei:" prefix in XPaths 2) I prefer to get rid of them, but don't care much 3) Makes no difference to me, mate 4) I prefer to keep them, but don't care much 5) I very much want to keep the "tei: prefix in XPaths
In case you're curious, there are approximately 517 tei: 38 rng: 15 xs: 5 a: 4 xml: 2 sch: prefixes in odd2odd.xsl. (Looking only in attr values.) _______________________________________________ Tei-council mailing list Tei-council@lists.tei-c.orgmailto:Tei-council@lists.tei-c.org http://lists.lists.tei-c.org/mailman/listinfo/tei-council
_______________________________________________ Tei-council mailing list Tei-council@lists.tei-c.orgmailto:Tei-council@lists.tei-c.org http://lists.lists.tei-c.org/mailman/listinfo/tei-council
Tei-council mailing list Tei-council@lists.tei-c.orgmailto:Tei-council@lists.tei-c.org http://lists.lists.tei-c.org/mailman/listinfo/tei-council _______________________________________________ Tei-council mailing list Tei-council@lists.tei-c.orgmailto:Tei-council@lists.tei-c.org http://lists.lists.tei-c.org/mailman/listinfo/tei-council -- Elisa Beshero-Bondar, PhD Director, Center for the Digital Text | Associate Professor of English University of Pittsburgh at Greensburg | Humanities Division 150 Finoli Drive Greensburg, PA 15601 USA E-mail: ebb8@pitt.edumailto:ebb8@pitt.edu Development site: http://newtfire.orghttp://newtfire.org/ _______________________________________________ Tei-council mailing list Tei-council@lists.tei-c.orgmailto:Tei-council@lists.tei-c.org http://lists.lists.tei-c.org/mailman/listinfo/tei-council -- Elisa Beshero-Bondar, PhD Director, Center for the Digital Text | Associate Professor of English University of Pittsburgh at Greensburg | Humanities Division 150 Finoli Drive Greensburg, PA 15601 USA E-mail: ebb8@pitt.edumailto:ebb8@pitt.edu Development site: http://newtfire.orghttp://newtfire.org/
Ha! It is interesting to learn that our practice is already mixed! I would like to take this opportunity point out that it would be less brittle to set an xpath-default-namespace to TEI in XSLT Stylesheets designed first and foremost to process TEI. I always do this in writing XSLT because it is clearly signaled and simpler to write. Also, when you have to process elements in multiple namespaces, those other namespaces are usually more rare than the TEI and I want them to stand out. Where TEI simply *is* our default namespace, what is wrong with designating it so? But yes, we should decide clearly one way or the other and not be mixing the practice(!) Elisa, who always sets an xpath-default-namespace except when processing code in no namespace :-) Sent from my iPhone
On Jan 5, 2019, at 8:20 AM, James Cummings
wrote: Just to point out an option that Syd didn't suggest:
- Use both prefix and xpath-default-namespace. This gives you the tei: prefix when you want to use it, but if you forget, defaults to the TEI namespace anyway.
This is, of course, a _horrible_ idea for which I hope there is no support. Except if we were adopting a process of gradual conversion from prefixed to not.
However, I would point out that xpath-default-namespace is used throughout the Stylesheets repository so that we are *already* inconsistent in our practice. So really we're already doing my horrible idea, though not commonly in a single stylesheet but more metaphorically throughout the repository as a whole.
Many thanks,
James
--
Dr James Cummings, James.Cummings@newcastle.ac.uk Senior Lecturer in Late-Medieval Literature and Digital Humanities
School of English, Newcastle University
From: Tei-council
on behalf of Scholger, Martina (martina.scholger@uni-graz.at) Sent: 04 January 2019 19:14:00 To: Elisa Beshero-Bondar; Lou Burnard Cc: TEI Council; Martin Holmes Subject: Re: [Tei-council] Stylesheets: rub out tei: prefix? Hi all,
I usually use prefixes. So I would prefer option 5.
Martina
Von: Tei-council
Im Auftrag von Elisa Beshero-Bondar Gesendet: Freitag, 4. Januar 2019 19:48 An: Lou Burnard Cc: TEI Council ; Martin Holmes Betreff: Re: [Tei-council] Stylesheets: rub out tei: prefix? And it's one more thing to forget! Life's challenging enough. When you have an opportunity to use a default namespace, why not use it?
E :)
On Fri, Jan 4, 2019 at 1:47 PM Lou Burnard
wrote: (which is what I do, btw)
they're only pesky if you forget them!
On 04/01/2019 18:45, Mylonas, Elli wrote:
you can always abbreviate to a single letter...
On Fri, Jan 4, 2019 at 1:43 PM Elisa Beshero-Bondar
wrote: I will take this opportunity to express surprise that so many of you like those pesky prefixes! Forgetting to use them drives me mad--think of occasions in writing XSLT where it's just so many extra keystrokes and one thing more to debug. Anyway, happy new year, you namespace-prefix-lovers!
Elisa
On Fri, Jan 4, 2019 at 1:41 PM Mylonas, Elli
wrote: Hi all - I tend to prefer tp see namespaces expressed explicitly. But agree with James that Syd is the one groping around in the code. So 4 or 5 for me.
--elli
On Fri, Jan 4, 2019 at 11:44 AM James Cummings
wrote: Hi all,
I simultaneously agree that explicitness is good and tend to use xpath-default-namespace all the time myself. I also remember learning from Sebastian that you *always* check namespaces first when something goes wrong. ;-) But since ODDs are always written in TEI (even non-TEI ODDs), it makes sense to me to use default namespace for TEI. I'd vote 4.
Many thanks,
James
--
Dr James Cummings, James.Cummings@newcastle.ac.uk Senior Lecturer in Late-Medieval Literature and Digital Humanities
School of English, Newcastle University
From: Tei-council
on behalf of Lou Burnard Sent: 04 January 2019 15:07:27 To: Raffaele Viglianti; Elisa Beshero-Bondar Cc: Peter Stadler; Lou Burnard; TEI Council; Martin Holmes Subject: Re: [Tei-council] Stylesheets: rub out tei: prefix? FWIW, I agree with Raffaele and Peter in preferring the explicitness and clarity of a prefix. Sebastian always used to say that whenever a stylesheet didn't behave as expected, it was a namespace problem.
But if Syd is producing a new version, clearly he has the right to make whatever cosmetic changes he is more comfortable with. Might be a good idea to keep the old version around for a while though, just to check nothing has been broken by such changes, if I may state the obvious.
On 04/01/2019 11:44, Raffaele Viglianti wrote:
I always use prefixes. I think it helps with clarity and feels more rigorous/consistent. So my preference would be 5.
Raff
On Fri, Jan 4, 2019, 5:09 AM Elisa Beshero-Bondar
By the way, I think there’s a way to do it in pure Schematron, but I am not sure (have to check) if it can be done in the ODD context. If I remember right for pure Schematron at least, the question is whether you have to set the prefix on the Schematron elements or the TEI ones.
Elisa
Sent from my iPhone
On Jan 4, 2019, at 5:05 AM, Elisa Beshero-Bondar
wrote: Having worked with setting default namespaces rather a lot in various contexts (XSLT, XQuery, Schematron, I vote enthusiastically for 1). This really just amounts to a change that reduces verbosity, as Syd indicates, but also reflects the default centrality of the TEI in the Stylesheets anyway. And it is a pain to have to remember the default prefix all the time when we gave to edit.
Elisa
Sent from my iPhone
On Jan 4, 2019, at 3:54 AM, Peter Stadler
wrote: I honestly prefer the verbosity of 5) — and I don’t think these XPath expressions can be significantly simplified nor compressed by removing those namespace prefixes. But just to make double sure: This is just a (proposed) cosmetic change due to your personal preference, right? This wouldn’t be bad thing, though, and I think you deserve to do it your way since you are the ODD one :)
Cheers Peter
Am 04.01.2019 um 02:18 schrieb Syd Bauman
: The current odd2odd.xsl (like most of the stylesheets) uses the explicitly bound namespace prefix "tei:" in XPaths. I am inclined to use @xpath-default-namespace and get rid of them. I think our XPaths are often already long enough to wrap around even a wide screen twice, and things like "ancestor::tei:teiHeader" are just harder to read.
Please vote (fast): 1) I very much want to get rid of the "tei:" prefix in XPaths 2) I prefer to get rid of them, but don't care much 3) Makes no difference to me, mate 4) I prefer to keep them, but don't care much 5) I very much want to keep the "tei: prefix in XPaths
In case you're curious, there are approximately 517 tei: 38 rng: 15 xs: 5 a: 4 xml: 2 sch: prefixes in odd2odd.xsl. (Looking only in attr values.) _______________________________________________ Tei-council mailing list Tei-council@lists.tei-c.org http://lists.lists.tei-c.org/mailman/listinfo/tei-council
_______________________________________________ Tei-council mailing list Tei-council@lists.tei-c.org http://lists.lists.tei-c.org/mailman/listinfo/tei-council
Tei-council mailing list Tei-council@lists.tei-c.org http://lists.lists.tei-c.org/mailman/listinfo/tei-council
_______________________________________________ Tei-council mailing list Tei-council@lists.tei-c.org http://lists.lists.tei-c.org/mailman/listinfo/tei-council
--
Elisa Beshero-Bondar, PhD Director, Center for the Digital Text | Associate Professor of English University of Pittsburgh at Greensburg | Humanities Division 150 Finoli Drive Greensburg, PA 15601 USA E-mail: ebb8@pitt.edu Development site: http://newtfire.org
_______________________________________________ Tei-council mailing list Tei-council@lists.tei-c.org http://lists.lists.tei-c.org/mailman/listinfo/tei-council
--
Elisa Beshero-Bondar, PhD Director, Center for the Digital Text | Associate Professor of English University of Pittsburgh at Greensburg | Humanities Division 150 Finoli Drive Greensburg, PA 15601 USA E-mail: ebb8@pitt.edu Development site: http://newtfire.org
_______________________________________________ Tei-council mailing list Tei-council@lists.tei-c.org http://lists.lists.tei-c.org/mailman/listinfo/tei-council
Four of you have still not voted. summary so far ------- -- --- 1) I very much want to get rid of the "tei:" prefix in XPaths 2) I prefer to get rid of them, but don't care much 3) It makes no difference to me, mate 4) I prefer to keep them, but don't care much 5) I very much want to keep the "tei:" prefix in XPaths SB: 0 (My vote is weighted :-) EB: 1 LB: 4 ? HC: JC: 2 (Said "4", but seems to have meant "2") MH: 1 VJ: EM: 4 MS: 5 PS: 5 SS: MT: RV: 5 That's a total of 27 in 9 votes, for an average of exactly 3! Thus the remaining 4 votes will likely be the deciding ones ... what a nail-biter!
participants (3)
-
Elisa Beshero-Bondar
-
James Cummings
-
Syd Bauman