|
Subject: [xsl] nearest ancestor From: Stephane Bailliez <sbailliez@xxxxxxxxxxxxxx> Date: Mon, 26 Mar 2001 10:43:59 +0100 |
Hello all,
I have a problem with the nearest ancestor... and the conformance.
Say I have:
<AAA name="1">
<AAA name="2">
<AAA name="3">
<BBB>
<CCC/>
</BBB>
</AAA>
</AAA>
</AAA>
and my xsl is
<xsl:template match="CCC">
<xsl:value-of select="(ancestor::AAA)[last()]/@name"/>,
<xsl:value-of select="(ancestor::AAA)[1]/@name"/>,
<xsl:value-of select="ancestor::AAA[last()]/@name"/>,
<xsl:value-of select="ancestor::AAA[1]/@name"/>
</xsl:template>
MSXML3 gives me 1, 3, 1, 3
Xalan (1.2.2/2.0.x) gives me 3, 1, 1, 3
Reading the 'nearest ancestor' thread a couple of months ago, it seems that
the expected behavior is xalan's (3, 1, 1, 3).
Can anyone confirm this and that MSXML3 incorrectly handles ancestor ?
Thanks for your input.
--
Stéphane Bailliez
Software Engineer, Paris - France
iMediation - http://www.imediation.com
Disclaimer: All the opinions expressed above are mine and not those from my
company.
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
| Current Thread |
|---|
|
| <- Previous | Index | Next -> |
|---|---|---|
| RE: [xsl] How do I check if an elem, Michael Kay | Thread | [xsl] Write Java DOM build code wi, Nick Vincent |
| Re: [xsl] How do I check if an elem, David Carlisle | Date | RE: [xsl] How do I check if an elem, Michael Kay |
| Month |