You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-users@xalan.apache.org by "Bielik, Robert" <Ro...@gyros.com> on 2003/04/17 09:37:39 UTC

Compiling embedded XSL problem

Hi All,

I'm using Xerces-C V2.1.0 deprecated i.f. and Xalan-C V1.4.0. I have an embedded XSL within the XML I want to 
process as (simplified but valid view):

<doc>
	<dataToProcessForXSL>
		... lots of XML here ...
	</dataToProcessForXSL>
	<theXSL>
		<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
			... the XSL itself ...
		</xsl:stylesheet>
	</theXSL>
</doc>

I want to precompile the XSL into a compiled stylesheet, then apply that stylesheet upon a subtree (dataToProcessForXSL) of the XML. This works as long as I extract the XSL subtree as a string, then parse the XSL from a stream.

However, if I take the XalanNode* that points to the <xsl:stylesheet..> element, the TreeWalker crashes in StylesheetHandler::endElement when the element name passed to the method is "theXSL" (!!!???). The
<theXSL> element isn't even part of the subtree that is passed to XalanTransformer::compileStylesheet !!
Anybody know what's going on ??

TIA
/Rob

Re: Compiling embedded XSL problem

Posted by da...@us.ibm.com.



Hi Rob,

I think someone else recently reported this problem, and it was fixed.
Please try your code with the latest release candidate.  If that fails,
create a bug report and attach the xml and xsl files, and a minimal source
code sample to reproduce the problem.

Dave



                                                                                                                                 
                      "Bielik, Robert"                                                                                           
                      <Robert.Bielik@g         To:      <xa...@xml.apache.org>                                           
                      yros.com>                cc:      (bcc: David N Bertoni/Cambridge/IBM)                                     
                                               Subject: Compiling embedded XSL problem                                           
                      04/17/2003 12:37                                                                                           
                      AM                                                                                                         
                                                                                                                                 



Hi All,

I'm using Xerces-C V2.1.0 deprecated i.f. and Xalan-C V1.4.0. I have an
embedded XSL within the XML I want to
process as (simplified but valid view):

<doc>
             <dataToProcessForXSL>
                         ... lots of XML here ...
             </dataToProcessForXSL>
             <theXSL>
                         <xsl:stylesheet version="1.0" xmlns:xsl="
http://www.w3.org/1999/XSL/Transform">
                                     ... the XSL itself ...
                         </xsl:stylesheet>
             </theXSL>
</doc>

I want to precompile the XSL into a compiled stylesheet, then apply that
stylesheet upon a subtree (dataToProcessForXSL) of the XML. This works as
long as I extract the XSL subtree as a string, then parse the XSL from a
stream.

However, if I take the XalanNode* that points to the <xsl:stylesheet..>
element, the TreeWalker crashes in StylesheetHandler::endElement when the
element name passed to the method is "theXSL" (!!!???). The
<theXSL> element isn't even part of the subtree that is passed to
XalanTransformer::compileStylesheet !!
Anybody know what's going on ??

TIA
/Rob