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

RE: RE: PLEASE HELP: SAX events and CDATA problem whe

Subject: RE: RE: PLEASE HELP: SAX events and CDATA problem when using transformation chaining
From: "Andrew Welch" <AWelch@xxxxxxxxxxxxxxx>
Date: Mon, 7 Apr 2003 15:28:02 +0100
sax cdata
Yeah sorry about this one - it was a private email that I tried to take back on-list but sent to the xsl-list instead of the Xalan list!

Anyway, the crux of the matter was that the user had a cdata section on the source xml:

<RDF>
  <description><![CDATA[<<<<MY TEST>>>>]]></description>
</RDF>

And wanted to get identical output from an identity transform.  To achieve this, you need to set the cdata-section-elements attribute on <xsl:output> which they did, but still ended up with:  

<RDF>
  <description>&lt;&lt;&lt;&lt;MY TEST&gt;&gt;&gt;&gt;</description>
</RDF>

...as if the cdata-section-elements had been ignored.  I think they were using XML Spy, so I suggested that they may be using a custom processor instead of Xalan, but I have no experience of XML Spy so Im just guessing.  

cheers
andrew

> 
> > <RDF>
> >   <description>&lt;&lt;&lt;&lt;MY TEST&gt;&gt;&gt;&gt;</description>
> > </RDF>
> > 
> 
> That is exactly equivalent to the version using CDATA marked section.
> So why is this output a problem? It should be the same kind 
> of thing as
> if attribute quotes change from a="b" to a='b' it is just a difference
> at the surface syntax, not in the underlying result tree.
> 
> Like all features of xsl:output,  cdata-section-elements="description"
> is only a hint to the serialiser, which may be ignored, and in
> particular if you pass the result tree directly as a tree to another
> process, then this XSLt process will not serialise the tree 
> at all, and
> so all these hints will not be used.
> 
> David
> 
 

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.467 / Virus Database: 266 - Release Date: 01/04/2003
 

 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.