P
Petterson Mikael
Hi,
I am using xalan. In my stylesheet I have the following snippet to write
to std out when a specific error occurs.
<xsl:template name="class_error">
<xslaram name="class"/>
<xslaram name="attribute"/>
<xslaram name="error_msg"/>
<xsl:message terminate="no">
Class:<xsl:value-of select="$class"/>
Attribute:<xsl:value-of select="$attribute"/>
Error:<xsl:value-of select="$error_msg"/>
</xsl:message>
</xsl:template>
I want to collcet all these class errors in a file. I have tested to
create an error.log in my outputdirectory using
But there is not error.log file created there. What am I missing or is
there a better way to do it?
cheers,
//mikael
I am using xalan. In my stylesheet I have the following snippet to write
to std out when a specific error occurs.
<xsl:template name="class_error">
<xslaram name="class"/>
<xslaram name="attribute"/>
<xslaram name="error_msg"/>
<xsl:message terminate="no">
Class:<xsl:value-of select="$class"/>
Attribute:<xsl:value-of select="$attribute"/>
Error:<xsl:value-of select="$error_msg"/>
</xsl:message>
</xsl:template>
I want to collcet all these class errors in a file. I have tested to
create an error.log in my outputdirectory using
<xsl:template name="class_error">
<xslaram name="class"/>
<xslaram name="attribute"/>
<xslaram name="error_msg"/>
<redirect:write file="{$output.dir}/{$error.log}" append="true">
Class:<xsl:value-of select="$class"/>
Attribute:<xsl:value-of select="$attribute"/>
Error:<xsl:value-of select="$error_msg"/>
</redirect:write>
<redirect:close file="{$output.dir}/{$error.log}"/>
<xsl:message terminate="no">
Class:<xsl:value-of select="$class"/>
Attribute:<xsl:value-of select="$attribute"/>
Error:<xsl:value-of select="$error_msg"/>
</xsl:message>
</xsl:template>
But there is not error.log file created there. What am I missing or is
there a better way to do it?
cheers,
//mikael