Re: [xsl] Defining a key on a RTF inside a Template

Subject: Re: [xsl] Defining a key on a RTF inside a Template
From: David Carlisle <davidc@xxxxxxxxx>
Date: Wed, 8 Dec 2004 13:50:55 GMT
  But please consider this.., if for instance, the main
  XML document also contained the <projectsum> nodes,
  then the key definition -
  <xsl:key name="countDetail" match="projectsum"
  would include those nodes also in the scope.. So
  introducing the <temp> tag would be neccessary to
  enforce the scope to RTF..

No, XSLT indexes each document _separately_ key() only ever returns
nodes from one document (the document which the current node is in).
So if the current node is in a document which resulted from calling
xx:node-set on an rtf, any use of key will only return nodes from that
same document, there is no other scoping required (or possible).

In this case even if other documents (such as the main input document)
contain projectsum elements they will not be returned by key() because
no nodes from other documents are ever returned.


This e-mail has been scanned for all viruses by Star. The
service is powered by MessageLabs. For more information on a proactive
anti-virus service working around the clock, around the globe, visit:

Current Thread