This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: cross-ref


Hi Bas,

> Thank you very much for explaining the "key issue" of xsl keys to
> me. You were right, I had to compare the value of elementName (in
> the source document) with elementName/@refAttr (in the other
> document); not the source attribute refAttr.
>
> It miraculously works now. I had some trouble understanding the
> mechanism behind the "use" attribute.

Basically, the XSLT processor creates a look-up table for the
document. The processor goes through all the nodes in the document and
tests them to see if they match the pattern in the 'match' attribute
of xsl:key. If a node matches the pattern, then the processor creates
an entry in the look-up table.

The matching nodes are each assigned a key value, which you can then
use to look up the nodes that have that key value. The key value is
calculated by evaluating the expression in the 'use' attribute with
the matching node as the current node. So the expression in the 'use'
attribute usually takes you from the node that you're matching to the
value you can use to look up the node.

Cheers,

Jeni

---
Jeni Tennison
http://www.jenitennison.com/


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]