Page 1 of 1

XPath ok, XSLT not

Posted: Sat Nov 10, 2007 2:06 am
by amix
I might be completley dumb, but I do not get over this:

Code: Select all


<xsl:template match="//body/descendant-or-self::node()">
[...]
</xsl:template>
The error I get is:

Code: Select all


Error in expression //body/descendant-or-self::node(): 
Axis in pattern must be child or attribute
If I use the same XPath in the oXygen XPath string input (upper left corner) I get the desired result.

Posted: Tue Nov 13, 2007 5:32 pm
by jkmyoung
I believe you're not allowed to use the descendant-or-self axis in the match pattern.
You might want to try something like this instead with a inverted condition instead:
<xsl:template match="node()[ancestor-or-self::body]">

Posted: Wed Nov 14, 2007 9:47 pm
by amix
Thank you very much. That solved my issues. :-)