Re: Not grokking keys...

Subject: Re: Not grokking keys...
From: "Alistair MacDonald" <AlistairMacDonald@xxxxxxxxxxxxx>
Date: Thu, 22 Apr 1999 16:38:34 +0100
Having spent an interesting afternoon trying to work out how to persuade XSLT to follow cross-references stored in attributes, I'm intrigued to know when the various XSLT implementors plan on implementing this (and m/doc(ref)?/ ) . (Everytime a new email comes in I end up trying a different permutation of XSLT commands!)

As far as I can tell, the only major stumbling block that I have now is not being able to dynamically change a 'select' or 'match'. Even James' suggested method of visualising the key doesn't appear to help as, (using xt-19990421), I either get nothing [1] or the very helpful 'cannot convert to node-set' [2] error. (Thats the complete error message by the way 8-) 

As a reminder of the problem I was trying to solve last time, here is a quick tree:

<doc>
  <foo xref="/doc/bar/child[1]" name="first">
    <title>wibble</title>
    <content>
      Lots of Wibbling 
   </content>
  </foo>
  <bar>
    <child name="first">Weeee!</child>
    <child>Bah!</child>
  </bar>
</doc>

Obviously I would like to be able to do something with either 'xref' or 'name' to retrieve the appropriate NODE (not the value!). 

Answers on the back of an electron please ....

Alistair

------
[1] 
<xsl:variable name="sel" expr="@xref" />
<xsl:apply-templates select="$sel" />

[2]
<xsl:variable name="sel"><xsl:value-of select="@xref" /></xsl:variable>
<xsl:apply-templates select="$sel" />



 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread