This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
Re: CDATA question
- From: Mike Brown <mike at skew dot org>
- To: xsl-list at lists dot mulberrytech dot com
- Date: Tue, 18 Jun 2002 16:13:59 -0600 (MDT)
- Subject: Re: [xsl] CDATA question
- Reply-to: xsl-list at lists dot mulberrytech dot com
Amy Cheung wrote:
> Thanks for the reply. But I forget to mention that in
> my case, people are allowed to modify the xml file to
> add new tags, which may contain CDATA section. So it's
> unpredictable beforehand what tags to include in
> <xsl:output cdata-section-elements='xxx'/>
CDATA sections are not part of the XPath/XSLT data model, nor are they part of
what is reported by an XML parser to any application; they are merely a
convenience for document authors who don't want to escape "&" and "<" when
those characters are not being used to denote markup.
Because of this, during XSLT processing you have no way of knowing that the
original input had CDATA sections, entity references, character references,
what character-to-bits encoding was used, what the DTD looked like, etc.
You're only working with the logical contents of the XML, not the
physical/lexical contents.
- Mike
____________________________________________________________________________
mike j. brown | xml/xslt: http://skew.org/xml/
denver/boulder, colorado, usa | resume: http://skew.org/~mike/resume/
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list