|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] how XSL processor treat doctype declaration in source
I'm still confused about how XSL processors react to or treat the doctype
declaration in the source file.
Elliot Rusty Harold's tutorial on XSLT (XML Bible Chapter 14) says:
"XSL processors assume an XML tree contains seven kinds of nodes.
These are:
The root
Elements
Text
Attributes
Namespaces
Processing instructions
Comments
The DTD and document type declaration are specifically not included
in this tree. If present, they're ignored, with the single exception
that they may add additional attribute nodes to some elements that
are declared to have default attributes."
"If present, they're ignored..." for the most part.
If this is so, then why is it that I get weird results if I include the
doctype declaration in my source file?
e.g. sometimes when the dtd line is in the source file, no processing
occurs, and only <?xml ... ?> is output; other times processing occurs but
only CDATA/text is output and all templates seem to be ignored (because
the default for text nodes is to output them unchanged); other times
processing occurs but weird things happen (as happened to my colleague
recently) such as the doctype getting output with no STAGC:
<!doctype ...
instead of
<!doctype ...>
Thanks,
-carole
- - - - - - - - - - - - - - - - - - - - - - - - -
Carole E. Mah Carole_Mah@xxxxxxxxx
Senior Programmer/Analyst
Brown University Scholarly Technology Group
phn 401-863-2669
fax 401-863-9313
http://www.stg.brown.edu/
personal: http://www.stg.brown.edu/~carolem/
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|
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
|

Cart








