This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
RE: XPath question
- From: "Macaulay,Malcolm (US)" <Malcolm dot Macaulay2 at cnare dot com>
- To: <Roger dot Varley at brake dot co dot uk>
- Cc: <xsl-list at lists dot mulberrytech dot com>
- Date: Fri, 17 May 2002 09:36:40 -0500
- Subject: RE: [xsl] XPath question
- Reply-to: xsl-list at lists dot mulberrytech dot com
Hi Roger,
I'm probably misunderstanding you, but can't you do this:
<xsl:variable name="ListOfFieldNames"
select="//column//name[generate-id(.)=generate-id(key('FieldNames', .))]"/>
cheers
Malcolm
-----Original Message-----
From: Varley, Roger [mailto:Roger.Varley@brake.co.uk]
Sent: 17 May 2002 08:56
To: Mailing_List:Xsl-List (E-mail)
Subject: [xsl] XPath question
Hi
I'm building a key for use in creating a Muenchian group. I've got as far as
<xsl:variable name="ListOfFieldNames"
select="//name[generate-id(.)=generate-id(key('FieldNames', .))]"/>
This, in conjunction with the rest of the stylesheet is working fine, but I
now want to change this statement so it will only select <name> nodes that
are children of a node <column>. I can't use select= "//column/name ....."
because name is not a direct child of <column> nor can I specify a direct
path because these <name> nodes appear at different levels in the nested
XML. I think I've got to use AxisNames somehow, but I'm just confusing
myself at the moment.
Regards
Roger
************************************************************************
Information in this message is confidential and may be privileged. It is
for the exclusive use of the intended recipient(s). If you are not the
intended recipient(s) please notify the sender and delete the message
immediately. Unauthorised disclosure, distribution and copying of this
email is strictly prohibited. The opinions expressed within this message
are those of the individual author. Whilst Brakes takes reasonable steps to
scan this email it does not accept liability for any virus that may be
contained in it.
Brake Bros plc. Registered Office: Enterprise House, Eureka Business Park,
Ashford, Kent TN25 4AG.
Registered in England & Wales number 2035315.
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list