You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@xalan.apache.org by xa...@xml.apache.org on 2004/09/04 19:43:37 UTC

[jira] Updated: (XALANJ-1851) XPath does not accept default namespaces with prefix resolver

The following issue has been updated:

    Updater: Brian Minchau (mailto:minchau@ca.ibm.com)
       Date: Sat, 4 Sep 2004 10:41 AM
    Changes:
             description changed from 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. to 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.
             environment changed from Operating System: All
Platform: All to Operating System: All
Platform: All
             priority changed to Blocker
    ---------------------------------------------------------------------
For a full history of the issue, see:

  http://issues.apache.org/jira/browse/XALANJ-1851?page=history

---------------------------------------------------------------------
View the issue:
  http://issues.apache.org/jira/browse/XALANJ-1851

Here is an overview of the issue:
---------------------------------------------------------------------
        Key: XALANJ-1851
    Summary: XPath does not accept default namespaces with prefix resolver
       Type: Bug

     Status: Open
   Priority: Blocker

    Project: XalanJ2
 Components: 
             XPath
   Versions:
             CurrentCVS

   Assignee: Henry Zongaro
   Reporter: Ralf

    Created: Fri, 2 Apr 2004 4:13 PM
    Updated: Sat, 4 Sep 2004 10:41 AM
Environment: Operating System: All
Platform: All

Description:
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.


---------------------------------------------------------------------
JIRA INFORMATION:
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

If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: xalan-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xalan-dev-help@xml.apache.org