[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

RE: limitations of xsl:comment

Subject: RE: limitations of xsl:comment
From: "Stuart Celarier" <stuart@xxxxxxxxxxx>
Date: Sun, 12 May 2002 19:15:39 -0700
limitations of xsl
A comment in XML consists of character data, see the XML specification,
2.5, Comments, http://www.w3.org/TR/2000/REC-xml-20001006#dt-comment,
for details. Comments have no children, they are straight text.

When you place what _looks_ like XML markup in you comment, it is still
just text, so the comment <!-- <Tag> </Tag> --> does not include a Tag
element as a child, just a bunch of characters happen to resemble
markup. Check out the sample comment in the XML specification (link
above) and notice that its contents are not well-formed XML.

I am not sure I understand what your second question is getting at
regarding comments and CDATA sections. This may help. Comments are not
part of the data expressed by an XML document. In fact XML parsers are
free to drop comments when constructing a DOM from an XML document.
OTOH, a CDATA section indicates that the enclosed characters are to be
interpreted literally, and not to be construed as markup. In the case of
both a comment and a CDATA section, the contents are not taken as part
of the markup. However, the contents of a CDATA section are part of the
text data of the document, while the contents of a comment are not part
of the data of the document.

Cheers,
Stuart


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.