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

"Unknown error in XPath" occurs on fairly complex XPath expression

           Summary: "Unknown error in XPath" occurs on fairly complex XPath
                    expression
           Product: XalanJ2
           Version: 2.6
          Platform: PC
        OS/Version: Other
            Status: NEW
          Severity: Normal
          Priority: Other
         Component: Xalan
        AssignedTo: [EMAIL PROTECTED]
        ReportedBy: [EMAIL PROTECTED]


This happens with Xalan 2.6.0, as it also did with Xalan 2.5.1.
I'm not using xsltc.
I will attach the stylesheet which gives this error, and the input XML, if possible.
The error is occurring within Cocoon.
Here's the line that causes the error (or at least, the error occurs iff this
line is not commented out:)
<xsl:variable name="role"
select="(ancestor::view/@role)|(ancestor::view/@type[not(current()/ancestor::view/@role)])"
/>

On the other hand, when the following line is substituted for the above, the
stylesheet works fine, with no errors:
          <xsl:variable name="role"
select="(ancestor::view/@role)|$base[not(current()/ancestor::view/@role)]" />          
 

The variable 'base' is defined as follows (at top level of stylesheet):

   <!-- create a variable whose value is a nodeset whose string value is 'base' -->
   <xsl:variable name="base-aux" select="base" />
   <xsl:variable name="base"
select="document('')/*/xsl:[EMAIL PROTECTED]'base-aux']/@select" />

The above is somewhat of a kludge, and I'd prefer to get rid of the 'base'
variable, but can't because of the error. (Incidentally, where I'm using @type
above, in the line that causes the error, its value is 'base'.)

I tried the same stylesheet on the same input with Saxon and with XMLSpy's XSLT
engine (outside Cocoon), and both gave the expected output without errors.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to