[XSL-LIST Mailing List Archive Home] [By Thread] [By Date]

Re: [xsl] .[predicate] vs self::node()[predicate]- Xalan 2.7


Subject: Re: [xsl] .[predicate] vs self::node()[predicate]- Xalan 2.7
From: "Imsieke, Gerrit, le-tex" <gerrit.imsieke@xxxxxxxxx>
Date: Wed, 17 Apr 2013 11:27:07 +0200

On 17.04.2013 11:12, Raimund Kammering wrote:
XSL:
<xsl:template match="entry/sum">
   ...
   <xsl:for-each select=".[starts-with(name,'tdown')]">
   ...
   </xsl:for-each>
   ...
</xsl:template>

Given the structure of your XML document, it looks as if the processor interprets ".[starts-with(name,'tdown')]" as "*[starts-with(name(),'tdown')]".
Except that your original expression cannot match because there is no element called 'name'  you probably wanted to write 'name()'.


If the first hypothesis is correct, it will explain that "self::node()[starts-with(name,'tdown')]" does not match while "child::node()[starts-with(name,'tdown')]" or "*[starts-with(name,'tdown')]" will probably match. All based on the assumption that your XML structure actually looks like the example that you gave.

Gerrit


Current Thread
Keywords
xml