Subject: Re: [xsl] Checking a parent's attribute From: Nicholas Orr <nick@xxxxxxxxxxx> Date: Wed, 7 Feb 2007 22:36:16 +1100 |
Depending on your needs, it may be better suited to use template matching instead of for-each. For instance, the above for-each can be written in separate templates like this (first one is your initial template):
<xsl:template match="/">
<xsl:apply-templates select="ExportEntries[../Restore/ @state='True']" />
</xsl:template>
<xsl:template match="ExportEntries"> ... do something on ExportEntry level .... <xsl:apply-templates select="ExportEntry/Field" /> </xsl:template>
<xsl:template match="Field"> .... do something on field level .... ... this is the same as the core of your for-each ... </xsl:template>
Thanks, Nick
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] Checking a parent's attri, Abel Braaksma | Thread | [xsl] Problem in Poem, Byomokesh |
RE: [xsl] Problem in Poem, Michael Kay | Date | Re: [xsl] Problem in Poem, Abel Braaksma |
Month |