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

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=21276

XObject.toString() produces strange behavior

           Summary: XObject.toString() produces strange behavior
           Product: XalanJ2
           Version: CurrentCVS
          Platform: PC
        OS/Version: Windows NT/2K
            Status: UNCONFIRMED
          Severity: Normal
          Priority: Other
         Component: org.apache.xpath
        AssignedTo: [EMAIL PROTECTED]
        ReportedBy: [EMAIL PROTECTED]


When using xpaths and printing out an XObject using the toString() method, two 
successive calls will not work... ie:

XObject xval = XPathAPI.eval(<yournode>,<yourstring>);
System.err.println(xval.toString());
System.err.println(xval.toString());

The first will print okay, the second will not.
You wouldnt think that the toString method should move pointers, but tracing 
the code back to NodeSequence, something strange is happening in the method:

  /**
   * @see DTMIterator#item(int)
   */
  public int item(int index)

with the pointers.  This behavior may be needed for something else, but if its 
not needed in the toString() method, maybe that should be modified to simply 
get the current node and not move any pointers?

sincerely,

Aaron LaBella

Reply via email to