This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
RE: container list display problem
- From: "Michael Kay" <michael dot h dot kay at ntlworld dot com>
- To: <xsl-list at lists dot mulberrytech dot com>
- Date: Wed, 1 May 2002 15:01:55 +0100
- Subject: RE: [xsl] container list display problem
- Reply-to: xsl-list at lists dot mulberrytech dot com
> I have been using a style sheet that supports an XML DTD
> called EAD - Encoded Archival Description. ....
>
> <xsl:when test="(../preceding-sibling::c03[1]//did/container
> @type='reel']=$reelnumber
> or parent::c02[last()]/did/container[@type='reel']=$reelnumber)">
>
I haven't tried to understand your detailed logic but the
parent::c02[last()] test looks wrong. A node has exactly one parent so the
predicate [last()] is always true. You obviously don't want to select the
"last parent" because there is only one. Perhaps you want to test whether
the parent is the last child of its own parent? In that case the condition
would be parent[not(following-sibling::*)].
Michael Kay
Software AG
home: Michael.H.Kay@ntlworld.com
work: Michael.Kay@softwareag.com
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list