RE: [xsl] How to navigate in an expression (sort of)

Subject: RE: [xsl] How to navigate in an expression (sort of)
From: Jay Walters <jwalters@xxxxxxxxxxxxx>
Date: Thu, 8 Feb 2001 13:17:58 -0500
Sorry, I wasn't too clear then... or else I've been taking that advice about
making my XSL much too verbose!

I'll try to make my question more clear...  I've put a really truncated, but
hopefully illustrative bit of the XML input file I'm working with at the end
of the e-mail.  The attribute is of type ID and xmi.idref is of type
IDREF, so we can use id( and id(@xmi.idref) with abandon.

The context is a template which is processing <Foundation.Core.Class"S.1">.  What I want to do is select the node
<Foundation.Core.AssociationEnd"G.2"> by navigating through the
<Foundation.Core.Classifier xmi.idref="S.1"> node.

What I have been doing is essentially ...

<xsl:template match="Foundation.Core.Class">

<xsl:variable name="foo">
  <xsl:value-of select=""/>


I haven't had much luck or spent a lot of time trying to figure out how to
get the attribute of the node from where the <xsl:value-of select> is
applied within the [] expression after I've navigated around a bit.

Is there a quick and clean expression for this?

Thanks in advance.

Jay Walters

----------------- XML -----------------


  <!-- From here -->


      <!-- I want to get to here -->


          <!-- This node links the AssociationEnd to a Class -->

          <Foundation.Core.Classifier xmi.idref="S.1"/>
          <Foundation.Core.Classifier xmi.idref="S.2"/>

-----Original Message-----
From: David Carlisle [mailto:davidc@xxxxxxxxx]
Sent: Thursday, February 08, 2001 12:45 PM
To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
Subject: Re: [xsl] How to navigate in an expression (sort of)

If your attribute is of type ID then I think you just want

<xsl:apply-templates select="id("/>


 XSL-List info and archive:

 XSL-List info and archive:

Current Thread