Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3792860
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T12:41:16+00:00 2026-05-19T12:41:16+00:00

I am working with some xml files which contain and/or tags. I want to

  • 0

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?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-19T12:41:16+00:00Added an answer on May 19, 2026 at 12:41 pm

    If the XSLT processor is that buggy, you may try cheating it using a number of techniques, such as:

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

    or

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

    Good luck.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I've got a dozen XML files which contain the results of some wcat web
I'm working on a windows phone project where I have some xml files with
I'm working on a project involving some large XML files (from 50MB to over
I'm working on some code that deals with parsing files (mainly XML, but there
I am working on some Plesk integration using the XML API and I am
I have some xml files, which are used in my application. They are stored
I'm working on a Firefox plugin which contains a file holding some HTML data.
I have some pretty big xml files which used for scheduled import. I use
I have been working on code that parses external XML-files. Some of these files
I am working on an application which has some forms and then using FOP

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.