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_err or">
<xsl:param name="class"/>
<xsl:param name="attribute "/>
<xsl:param name="error_msg "/>
<xsl:message terminate="no">
Class:<xsl:valu e-of select="$class"/>
Attribute:<xsl: value-of select="$attrib ute"/>
Error:<xsl:valu e-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_err or">
<xsl:param name="class"/>
<xsl:param name="attribute "/>
<xsl:param name="error_msg "/>
<redirect:wri te file="{$output. dir}/{$error.log}" append="true">
Class:<xsl:valu e-of select="$class"/>
Attribute:<xsl: value-of select="$attrib ute"/>
Error:<xsl:valu e-of select="$error_ msg"/>
</redirect:write>
<redirect:clo se file="{$output. dir}/{$error.log}"/>
<xsl:message terminate="no">
Class:<xsl:valu e-of select="$class"/>
Attribute:<xsl: value-of select="$attrib ute"/>
Error:<xsl:valu e-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