Subject: Re: [xsl] Checking a parent's attribute From: Abel Braaksma <abel.online@xxxxxxxxx> Date: Wed, 07 Feb 2007 11:09:12 +0100 |
On 07/02/2007, at 4:07 PM, G. Ken Holman wrote:
You use a predicate to achieve this:
<xsl:for-each select="ExportEntries[../Restore/@state='True']/ ExportEntry/Field"> ... </xsl:for-each>
I hope this helps.
That was exactly what I was after, I didn't realise I could do that. Thanks for your help Ken.
<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>
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] Checking a parent's attri, Nicholas Orr | Thread | Re: [xsl] Checking a parent's attri, Nicholas Orr |
Re: [xsl] Regex groups / was: Re: [, Owen Rees | Date | Re: [xsl] Regex groups / was: Re: [, Abel Braaksma |
Month |