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 Arun Ramdas <ar...@etrade.com> on 2002/03/18 20:18:15 UTC

problem with compileStylesheet

When i try to  compile the StyleSheet, i get a core dump, in case the
stylesheet has incorrect syntax.

Can u help me out on this?

I am attaching the code piece for compilation and the XSL which i am using. 
In this case the problem wit the XSL is i have two extra BR tags in improper
position.

If i run the sample program on this XSL, it gives a proper error (br is not
a valid child of xsl:text (990.xslt, line 14, column 5)), instead of a core
dump.


code piece for XSL compilation

int theResult = 0;
        istrstream   theXSLStream(XslString, strlen(XslString));

        theResult =     theXalanTransformer.compileStylesheet(&theXSLStream,
the
CompiledStylesheet);

Xsl Sheet

<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:fo="http://www.w3.org/1999/XSL/For
mat">
<xsl:output method='html'/>
<xsl:param name="mktg" select="''" />
<xsl:param name="legal" select="''" />
<xsl:template match="/">

<xsl:text>
<br>
<br>
Thank you for your deposit!   On </xsl:text><xsl:value-of
select="events/alert/msg-data/param [@name='RECV_DATE']"/><xs
l:text>
we recieved your deposit of $</xsl:text><xsl:value-of
select="events/alert/msg-data/param [@name='AMOUNT']"/><xsl:text>
.
You can see your deposit now reflected in your balances.  Your funds are now
available for investment. </xsl:text>

<p/>
<xsl:value-of select="events/alert/sender"/>
<p/>
<xsl:text>
Cash Management Team
E*Trade Financial, Inc.

</xsl:text>
<xsl:value-of select="$mktg" disable-output-escaping="yes"/>

<xsl:value-of select="$legal" disable-output-escaping="yes"/>
</xsl:template>
</xsl:stylesheet>


Arun