[Home] [By Thread] [By Date] [Recent Entries]
Jaime Stuardo wrote:
Hi all... It took me a long time to understand what this pattern does, but it's really quite simple. The key is realizing that "|" is the *union* operator. That is, you are creating a *set* consisting of the current node (".") and the first member of the row from the key table (remember that key() lookups select node lists): . | key('relacion_x_cobertura', REL_ID)[1] Sets have the property that no nodes are duplicated, so if the current node and the first node of the selected key table entry are *the same* node, they will be collapsed in the set and the set will have exactly one member. If the two nodes are not the same, the set will have two members. Thus, you are selecting those rows that are the first entries in their corresponding key table entries. This allows you to then select all of the *unique* rows in the document, since no row can be in two entries in the same key table. Cheers, Eliot -- W. Eliot Kimber Professional Services Innodata Isogen 9030 Research Blvd, #410 Austin, TX 78758 (512) 372-8122 eliot@xxxxxxxxxxxxxxxxxxx www.innodata-isogen.com XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|

Cart



