xsl-list
[Top] [All Lists]

Re: [xsl] xslt key used with a predicate of an xpath expression

2006-03-25 10:18:45
"idref" is a relative path expression that means child::idref. The context
node is a <color> element, so it looks for a child of the color element
named idref, but there is none.

Would prepending 'current()' in front of 'idref' change the context
node from $colors/color back to the 'thing' node that it is
processing? I tried:

  <xsl:value-of select="concat('The @hex of that object means color ',
                               
$colors/color[(_at_)hex=key('objects',current()/idref)/@hex],
                                ' (.)',$NL)"/>

To no avail. Probably because it doesn't address the second problem
you outline, but I'm not sure how to address that.


Moreover, the key function searches the document containing the context
node. But the color element is in a different document from the one you want
to search.

So the key is searching the the xsl document, while I want it to
search the input document? Is there a way to get it to search the
input document by using the $doc(key('objects',current()/idref) or
key('objects',current()/idref,$doc) constructs?

Thank you for your patience,

-Tim Lebo

--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--

<Prev in Thread] Current Thread [Next in Thread>