Subject: Re: Is there an elegant way to copy a DOCTYPE declaration from one do c to another? From: Mike Brown <mike@xxxxxxxx> Date: Thu, 10 Aug 2000 12:50:05 -0600 (MDT) |
Joe Ward wrote: > So far, the only way I've found to keep the doctype declaration intact after > a "pass-through" transformation is to hide a copy of the declaration in a > comment via a pre-processor and then extract it. > > Is there a more elegant way? (Frankly, if I have to write a preprocess > script, I might as well skip XSLT altogether.) > > Is this a major flaw in XSLT? The doctype declaration is not acknowledged in the XPath/XSLT data model, presumably because to support this declaration you need to support the kind of stuff you're likely to find in it -- the internal subset of the DTD -- and the non-XML syntax of DTDs poses formidable challenges. "support for DTDs in the data model" is listed in Appendix G of the XSLT 1.0 Recommendation as a feature under consideration for future versions. I would guess it's not a high priority, because the <!DOCTYPE> contains document metadata for an XML parser to use; it doesn't convey crucial information that would affect how an XSLT processor should go about constructing the source tree. - Mike ____________________________________________________________________ Mike J. Brown, software engineer at My XML/XSL resources: webb.net in Denver, Colorado, USA http://www.skew.org/xml/ XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: Is there an elegant way to copy, Rick Geimer | Thread | Re: Is there an elegant way to copy, Eric van der Vlist |
RE: How dynamic is XSL?, Ben Robb | Date | position(), Steve Carton |
Month |