  | |  PLEASE HELP: SAX events and CDATA problem when using transformat
ion chaining | PLEASE HELP: SAX events and CDATA problem when using transformat
ion chaining 2003-04-07 - By Hess Yvan
Hi,
I have an urgent problem to solve with Xalan. I am doing XSLT SAX Transformation using Chaining. I am try to transform an XML using CDATA sections as follow:
XML INPUT:
<custom:type> <rdf:Description> <custom:id>100</custom:id> <custom:description><![CDATA[<<<<TEST>>>>]]></custom:description> </rdf:Description> </custom:type>
CODE: TransformerHandler transformerHandler;
this.setContentHandler(transformerHandler); this.setLexicalHandler(transformerHandler); SAXResult result = new SAXResult(xmlConsumer); /* xmlConsumer implements ContentHandler and LexicalHandler */ result.setLexicalHandler(xmlConsumer); transformerHandler.setResult(result);
XSL:
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:output method="xml" version="1.0" encoding="ISO-8859-1" indent="yes"/> <xsl:template match="/"> <xsl:copy-of select="/"/> </xsl:template> </xsl:stylesheet>
My XMLConsumer classes plays the role of a content handler and a lexicalhandler. When I execute my program I get th following result where my CDATA has been replaced. I debug my code and I saw that my lexical hanldler is never called. It is a bug of Xalan or I am doing something wrong ?
<custom:type> <rdf:Description> <custom:id>100</custom:id> <custom:description><<<<TEST>>>></custom:description > </rdf:Description> </custom:type>
Thanks for your answer because, It is urgent!!!
Regards. Yvan
|
|
 |