I am working with some xml files which contain and/or tags. I want to transform them to
html. In my XSL I am using two templates
<xsl:template match="and">
(
<xsl:apply-templates select="./*[1]" />
<xsl:text> </xsl:text>
<xsl:value-of select="name(.)" />
<xsl:text> </xsl:text>
<xsl:apply-templates select="./*[2]" />
)
</xsl:template>
<xsl:template match="or">
(
<xsl:apply-templates select="./*[1]" />
<xsl:text> </xsl:text>
<xsl:value-of select="name(.)" />
<xsl:text> </xsl:text>
<xsl:apply-templates select="./*[2]" />
)
</xsl:template>
It Works when i am using Xalan as a processor but when I am using JAXPSAXProcessor I am getting errors:
ERROR [main] JAXPSAXProcessorInvoker – Syntax error in ‘or’.
ERROR [main] JAXPSAXProcessorInvoker – Syntax error in ‘and’.
I suppose that JaxPSaxProcessor translates and/or to the operators in Xpath.
here you can see the list of operators
I can not change the jaxb processor because it have been used in many places. Is there any other sugesstion to solve the problem?
If the XSLT processor is that buggy, you may try cheating it using a number of techniques, such as:
or
Good luck.