Subject: Re: [xsl] cross-ref From: Jeni Tennison <mail@xxxxxxxxxxxxxxxx> Date: Thu, 9 Aug 2001 17:48:28 +0100 |
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
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
RE: [xsl] cross-ref, Bas Alberts | Thread | [xsl] Xquery vs XSLT, Carlos Sanchez |
RE: [xsl] Transforming non structur, Matt Sergeant | Date | Re: [xsl] count with variables?, Jeni Tennison |
Month |