You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@xalan.apache.org by bu...@apache.org on 2001/10/25 22:47:20 UTC

DO NOT REPLY [Bug 4433] New: - XPath bug evaluating comment nodes

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=4433>.
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=4433

XPath bug evaluating comment nodes

           Summary: XPath bug evaluating comment nodes
           Product: XalanJ2
           Version: 2.2.x
          Platform: PC
        OS/Version: Windows NT/2K
            Status: NEW
          Severity: Minor
          Priority: Other
         Component: Xalan
        AssignedTo: xalan-dev@xml.apache.org
        ReportedBy: bevan.arps@clear.net.nz


While writing an XSLT stylesheet that works in a similar fashion to JavaDoc, I used this:

<xsl:variable name="docs" 
              select="//comment()[ starts-with( . , 'mode:')]"/>

This should given the same results every time it is evaluated as it doesn't reference the current context. However, for one evaluation (the third of three) it returned an empty nodeset.

Changing it to this:

<xsl:variable name="docs" 
              select="/*/comment()[ starts-with( . , 'mode:')]"/>

(Changing // to /*/)

This gave the correct results but limits the possible placement of the comment.