- From: Jonas Sicking <jonas@sicking.cc>
- Date: Thu, 18 Dec 2008 15:21:35 -0800
> This should work in any scenario in which the XSLT processor itself is > serializing the output. If it's merely generating some sort of DOM or tree > to pass to another process, then all bets are off. However in that scenario, > other means of producing DOCTYPES are also not guaranteed since the DOCTYPE > is not part of the XPath 1.0 data model. XSLT can promise a DOCTYPE only > when it controls the serialization path, regardless of the technique you use > to create it. Why does this matter at all if your XSLT outputs a DOM? In such a case all you need to do is to ensure that the right type of nodes are created. Adding a DOCTYPE of any sort isn't going to affect anything as far as I can tell, at least not from an HTML perspective. The XSLT spec (at least the 1.0 one) is actually very vague on what the result from the transformation is when the output isn't a serialized sequence of bytes. I.e. the only mention of how to output HTML is in section 16 which is about serialized results, i.e. it technically doesn't apply when the result is a DOM. In firefox we do however use the HTML output mode to create HTML DOM nodes. In any event, this would seem like something that needs to be defined in the producer of the DOM, not in HTML in general. Although we could call out some specific producers if needed. / Jonas
Received on Thursday, 18 December 2008 15:21:35 UTC