java - How to get the elements <and> and <or> in XPath with Jre default Processor (JAXPSAXProcessor) -


i working xml files contain and/or tags. want transform them html. in xsl using 2 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 using xalan processor when using jaxpsaxprocessor getting errors: error [main] jaxpsaxprocessorinvoker - syntax error in 'or'. error [main] jaxpsaxprocessorinvoker - syntax error in 'and'.

i suppose jaxpsaxprocessor translates and/or operators in xpath. here can see list of operators can not change jaxb processor because have been used in many places. there other sugesstion solve problem?

if xslt processor that buggy, may try cheating using number of techniques, such as:

<xsl:template match="*[name()=concat('a', 'nd')"> 

or

<xsl:template match="*[name()=substring('land',2)"> 

good luck.


Comments

Popular posts from this blog

java - SNMP4J General Variable Binding Error -

windows - Python Service Installation - "Could not find PythonClass entry" -

Determine if a XmlNode is empty or null in C#? -