[ 
http://issues.apache.org/jira/browse/XALANJ-2199?page=comments#action_12356606 
] 

Henry Zongaro commented on XALANJ-2199:
---------------------------------------

I thought I'd elaborate on my previous comment.  In an expression like the 
following, lexical analysis has to treat the first "or" token as a QName, 
because of its position in the expression, the second "or" token as an 
operator, because it follows a QName token, and the third "or" token as a QName 
because it follows an operator token.

  or or or

The lexical analyzer in XSLTC is using the same token to represent an asterisk 
that is used as a wildcard as it does to represent an asterisk that is used as 
a multiplication operator.  So in the following pair of expressions, the "or" 
token is being treated as a QName because it follows an asterisk, which it is 
assuming must be a multiplication operator, but that's not the correct way of 
disambiguating the token in the second of those two expressions.

   elem * or
   * or *


> Xalan 2.7.0 Error parsing XPath expression
> ------------------------------------------
>
>          Key: XALANJ-2199
>          URL: http://issues.apache.org/jira/browse/XALANJ-2199
>      Project: XalanJ2
>         Type: Bug
>   Components: XSLTC
>     Versions: 2.7
>  Environment: #---- BEGIN writeEnvironmentReport($Revision: 1.29 $): Useful 
> stuff found: ----
> version.DOM.draftlevel=2.0fd
> java.class.path=/usr/apps/xalan/serializer.jar:/usr/apps/xalan/xalan.jar:/usr/apps/xalan/xercesImpl.jar:/usr/apps/xalan/xml-apis.jar:/usr/apps/docbook/xsl/1.69.1/extensions/xalan25.jar
> version.JAXP=1.1 or higher
> java.ext.dirs=/usr/apps/jdk1.5.0_04/jre/lib/ext
> version.xerces2=Xerces-J 2.7.1
> version.xerces1=not-present
> version.xalan2_2=Xalan Java 2.7.0
> version.xalan1=not-present
> version.ant=not-present
> java.version=1.5.0_04
> version.DOM=2.0
> version.crimson=not-present
> sun.boot.class.path=/usr/apps/jdk1.5.0_04/jre/lib/rt.jar:/usr/apps/jdk1.5.0_04/jre/lib/i18n.jar:/usr/apps/jdk1.5.0_04/jre/lib/sunrsasign.jar:/usr/apps/jdk1.5.0_04/jre/lib/jsse.jar:/usr/apps/jdk1.5.0_04/jre/lib/jce.jar:/usr/apps/jdk1.5.0_04/jre/lib/charsets.jar:/usr/apps/jdk1.5.0_04/jre/classes
> #---- BEGIN Listing XML-related jars in: foundclasses.java.class.path ----
> serializer.jar-apparent.version=serializer.jar present-unknown-version
> serializer.jar-path=/usr/apps/xalan/serializer.jar
> xalan.jar-path=/usr/apps/xalan/xalan.jar
> xercesImpl.jar-apparent.version=xercesImpl.jar from Xerces-J-bin.2.7.1
> xercesImpl.jar-path=/usr/apps/xalan/xercesImpl.jar
> xml-apis.jar-apparent.version=xml-apis.jar from head branch of xml-commons, 
> tag: xml-commons-external_1_3_02
> xml-apis.jar-path=/usr/apps/xalan/xml-apis.jar
> #----- END Listing XML-related jars in: foundclasses.java.class.path -----
> version.SAX=2.0
> version.xalan2x=Xalan Java 2.7.0
> #----- END writeEnvironmentReport: Useful properties found: -----
> # YAHOO! Your environment seems to be OK.
>     Reporter: Jens Elkner
>     Assignee: Henry Zongaro
>     Priority: Blocker

>
> I'm trying to compile docbook XSL 1.69.1, however, xsltc fails with:
> Compiler errors:
>   Syntax error in '* or $generate.index != 0'.
>   file:/usr/apps/docbook/xsl/1.69.1/xhtml/autotoc.xsl: line 294: Error 
> parsing XPath expression '* or $generate.index != 0'.
>   file:/usr/apps/docbook/xsl/1.69.1/xhtml/autotoc.xsl: line 294: Required 
> attribute 'test' is missing.
>   Syntax error in '* or $generate.index != 0'.
>   file:/usr/apps/docbook/xsl/1.69.1/xhtml/autotoc.xsl: line 401: Error 
> parsing XPath expression '* or $generate.index != 0'.
>   file:/usr/apps/docbook/xsl/1.69.1/xhtml/autotoc.xsl: line 401: Required 
> attribute 'test' is missing.
> But the test attributes are there (e.g. autotoc.xsl):
> 294:   <xsl:if test="* or $generate.index != 0">
> ...
> But transformation with the "normal" processor, which uses this template as 
> well works.
> Refs: 
> http://mesh.dl.sourceforge.net/sourceforge/docbook/docbook-xsl-1.69.1.tar.gz
> http://archive.apache.org/dist/xml/xalan-j/xalan-j_2_7_0-bin.tar.gz
> Used commandline:
> java -cp 
> /usr/apps/xalan/serializer.jar:/usr/apps/xalan/xalan.jar:/usr/apps/xalan/xercesImpl.jar:/usr/apps/xalan/xml-apis.jar:/usr/apps/docbook/xsl/1.69.1/extensions/xalan25.jar
>  org.apache.xalan.xsltc.cmdline.Compile -x 
> /usr/apps/docbook/xsl/1.69.1/xhtml/chunk.xsl

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to