Uploaded image for project: 'XalanJ2'
  1. XalanJ2
  2. XALANJ-1912

match="and" causes error - doesn't comply with XPath spec section 3.7

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Critical
    • Resolution: Fixed
    • 2.6
    • 2.7
    • XSLTC
    • Security Level: No security risk; visible to anyone (Ordinary problems in Xalan projects. Anybody can view the issue.)
    • None
    • Operating System: Other
      Platform: PC
    • PatchAvailable

    Description

      Trying to compile a stylesheet with 'template match="and"' or with 'template
      match="or"' causes an error. The compiler reports a syntax error. Probably it
      interprets the expression "and" as an OperatorName.
      However, the XPath spec in section 3.7 (http://www.w3.org/TR/xpath#exprlex)
      states clearly that a token must not be recognized as an OperatorName unless
      there is a preceding token (other than @, ::, (, [, , or an Operator).
      In the expression "and" there is only one token (namely "and"). There is no
      preceding token, so the token "and" must NOT be recognized as an OperatorName!
      Instead it should be recognized as a NameTest, matching an XML element named "and".
      The same applies to "or".

      Regards,
      Michał Borowiecki

      Attachments

        1. XalanJ1912Patch.txt
          11 kB
          Yash Talwar
        2. xpath.lex.patch
          11 kB
          Santiago Pericas-Geertsen

        Activity

          People

            santiago.pericasgeertsen@sun.com Santiago Pericas-Geertsen
            mihbor@wp.pl Michal Borowiecki
            Votes:
            1 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: