DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=28163>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=28163

XPath does not accept default namespaces with prefix resolver

           Summary: XPath does not accept default namespaces with prefix
                    resolver
           Product: XalanJ2
           Version: CurrentCVS
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: Normal
          Priority: Other
         Component: org.apache.xpath
        AssignedTo: [EMAIL PROTECTED]
        ReportedBy: [EMAIL PROTECTED]


The lexer class does not accept xpathes when a prefix resolver is defined which
is able to handle default namespaces.

The error occurs in
***********
    if ((null != uName) && (uName.length() > 0))
    {
      addToTokenQueue(uName);
      addToTokenQueue(":");

===>  String s = pat.substring(posOfNSSep + 1, posOfScan);

      if (s.length() > 0)
        addToTokenQueue(s);
    }
***********

when a default namespace is used at the last position of the path. In this case
posOfNSSep is -1 and the path is used from the beginning as a token which is
incorrect. Example for XPath: "/xy:root/test". The lexer crashes at "test".

P.S. I hope I got the right version in Bugzilla.

Reply via email to