This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: CDATA question


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]