cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Anna Afonchenko <a...@ubaccess.com>
Subject TransformerException Invalid element name
Date Sun, 09 Jan 2005 10:35:28 GMT
Hello all.

I have an xsl stylesheet that has the following template:

<xsl:template match="node()[not(name()='br' or name()='area' or name()='img' or local-name()='meta'
or name()='link' or name()='input' or name()='hr')][normalize-space(.)=''][not(descendant::node())]">
<xsl:element name="{name()}">
<xsl:copy-of select="@*"/>
<xsl:text> </xsl:text>
</xsl:element>
</xsl:template>

It expands all closed tags in html.

This stylesheet is applied in the cocoon pipeline and produces the correct output.
BUT a lot of errors are output into the core.log of cocoon WEB-INF.
All errors are like this:
Error in TraxTransformer: file:/C:/tomcat/jakarta-tomcat-5.0.27/webapps/cocoon/renderings/stylesheets/expandTags.xsl;
Line 13; Column -1; 
; SystemID: file:/C:/tomcat/jakarta-tomcat-5.0.27/webapps/cocoon/renderings/stylesheets/expandTags.xsl;
Line#: 13; Column#: -1
javax.xml.transform.TransformerException: Invalid element name: 

The line causing the error is <xsl:element name="{name()}"> from the template above.

The problem is that this pipeline is used very often, and then the log file becomes very big
- 30-40 Mb.

Is there any way to prevent the error to be written to the logs?
Or maybe the way I write xsl is invalid?

Thanks you very much for help.

Anna

Mime
View raw message