[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: How to retain the end tag when outputting an empty
> 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
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|