Subject: Re: [xsl] How to retain the end tag when outputting an empty element? From: "Michael Kay mike@xxxxxxxxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> Date: Fri, 17 Jun 2022 15:57:21 -0000 |
> Surely <test/> is canonical, and <test></test> isnbt? > Or maybe I should look-up what canonical means in this context. > And I guess the next question would be bwhyb as all XML parsers are (or should be) happy with the single form, shouldnbt they. > https://www.w3.org/TR/xml-c14n/#XMLCanonicalization section 2.3. <test></test> is the canonical form. I've no idea why. Perhaps because it's simpler, in the sense that all elements are serialized the same way regardless of whether or not they are empty. (With no need for special rules about edge cases, like elements that are empty except for comments). Michael Kay Saxonica
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] How to retain the end tag, Wendell Piez wapiez@ | Thread | Re: [xsl] How to retain the end tag, Bauman, Syd s.bauman |
Re: [xsl] How to retain the end tag, Wendell Piez wapiez@ | Date | Re: [xsl] How to retain the end tag, Bauman, Syd s.bauman |
Month |