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: [EMAIL PROTECTED]
        ReportedBy: [EMAIL PROTECTED]


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.

Reply via email to