This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
Re: How to navigate in an expression (sort of)
- To: xsl-list at lists dot mulberrytech dot com
- Subject: Re: [xsl] How to navigate in an expression (sort of)
- From: David Carlisle <davidc at nag dot co dot uk>
- Date: Thu, 8 Feb 2001 18:47:59 GMT
- References: <B7800B02C98FD4118E8000D0B7820F4ACC56E0@MABOST01>
- Reply-To: xsl-list at lists dot mulberrytech dot com
Oh sorry for previous reply this is a key question.
(Which probably means I should leave it to Jeni to answer, but
anyway...)
given an id string you eant to get to element nodes that have
that string as the value of
Foundation.Core.AssociationEnd.type/Foundation.Core.Classifier/@xmi.idref
Incidentally the above only looks horrible as you've gone in for this
computer science notion of understandable names, if you'd have caled it
x/y/@z
then it would have looked a lot more compact:-)
Anyway back to keys...
You want something like
<xsl:key name="x"
match="Foundation.Core.AssociationEnd"
use="Foundation.Core.AssociationEnd.type/Foundation.Core.Classifier/@xmi.idref"
/>
now in your template for Foundation.Core.Class you can go
<xsl:apply-templates select="key(@xmi.id)"/>
and you will apply templates to all (one) Foundation.Core.AssociationEnd
elements that have the stated property of having a key value of S.1.
(I hope)
David
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list