namespace declaration in examples
Magic removal time! OMG, I am so excited. But I have to prep slides for tomorrow, no time to do this now. Thus I am writing some notes here. See https://tei-c.org/Vault/P5/4.6.0/doc/tei-p5-doc/en/html/ref-TEI.html. Note that there is a proper namespace declaration in both examples. How the BLEEP did it get there? We cannot put a namespace declaration for the empty namespace on an element in an eg:egXML (unless it is on an element that has an explicit prefix), because its contents need to be in the eg: namespace. The answer is that there is magic in the Stylesheets.[1] Now take a look at https://www.wwp.neu.edu/outreach/seminars/miami_2023-07/presentations/manusc.... The source for that slide uses <egMarkup>, an element that has the same kind of namespace specification restriction. So how did the namespace declaration get there? Simple. So simple I am annoyed at myself for not thinking of this long ago. In the source it is not a namespace declaration, it is an xmlns attribute in a namespace. Thus it makes it to the Stylesheet as an attribute node and can be processed like any other attribute. The special case in the stylesheet that processes that slide is simple, straightforward, and easy to document: “An attribute in the duck: namespace has its prefix stripped off before it is rendered in the output”. Note [1] Particularly in Stylesheets/common/verbatim.xsl, starting at roughly line 463.
HI Syd, That is ingenious. We could use eg:xmlns (where eg = the egXML namespace) in the Guidelines code, and then strip off the prefix in the rendering. Brilliant! Cheers, Martin On 2023-07-19 20:00, Bauman, Syd wrote:
Magic removal time! OMG, I am so excited. But I have to prep slides for tomorrow, no time to do this now. Thus I am writing some notes here. See https://tei-c.org/Vault/P5/4.6.0/doc/tei-p5-doc/en/html/ref-TEI.html https://tei-c.org/Vault/P5/4.6.0/doc/tei-p5-doc/en/html/ref-TEI.html. Note that there is a proper namespace declaration in both examples. How the BLEEP did it get there? We *cannot* put a namespace declaration for the empty namespace on an element in an eg:egXML (unless it is on an element that has an explicit prefix), because its contents need to be in the eg: namespace. The answer is that there is magic in the Stylesheets.[1] Now take a look at https://www.wwp.neu.edu/outreach/seminars/miami_2023-07/presentations/manusc... https://www.wwp.neu.edu/outreach/seminars/miami_2023-07/presentations/manusc.... The source for that slide uses <egMarkup>, an element that has the same kind of namespace specification restriction. So how did the namespace declaration get there? Simple. So simple I am annoyed at myself for not thinking of this long ago. In the source it is /not /a namespace declaration, it is an xmlns attribute in a namespace. Thus it makes it to the Stylesheet as an attribute node and can be processed like any other attribute. The special case in the stylesheet that processes that slide is simple, straightforward, and easy to document: “An attribute in the duck: namespace has its prefix stripped off before it is rendered in the output”.
_Note_ [1] Particularly in Stylesheets/common/verbatim.xsl, starting at roughly line 463.
_______________________________________________ Tei-council mailing list Tei-council@lists.tei-c.org http://lists.lists.tei-c.org/mailman/listinfo/tei-council
-- ------------------------------------- Humanities Computing and Media Centre University of Victoria mholmes@uvic.ca
participants (2)
-
Bauman, Syd
-
Martin Holmes