This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
RE: repeating nodes, multiple attributes
- To: <xsl-list at lists dot mulberrytech dot com>
- Subject: RE: [xsl] repeating nodes, multiple attributes
- From: "Michael Kay" <mhkay at iclway dot co dot uk>
- Date: Fri, 8 Jun 2001 10:17:36 +0100
- Reply-To: xsl-list at lists dot mulberrytech dot com
> Given a node type with 3 defining attributes (i.e., primary key) ...
>
> <someNode a=aValue b=bValue c=cValue>
> <data>target</data>
> </someNode>
>
> ... is it possible to access data from 1 of n of these using
> some form of
> logical AND?
>
> For example ...
>
> <xsl:variable name="theData" select="someParent/someNode[@a='aKey' and
> @b='bKey' and @c='cKey']/data" />
>
Yes, you've guessed the syntax correctly.
But couldn't you have (a) looked it up in a book, or (b) tried it on an XSLT
processor? Asking the list is a pretty inefficient mechanism compared with
either of these.
Mike Kay
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list