[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: Defining a key on a RTF inside a Template

Subject: Re: Defining a key on a RTF inside a Template
From: Mukul Gandhi <mukul_gandhi@xxxxxxxxx>
Date: Wed, 8 Dec 2004 07:13:52 -0800 (PST)
rtf newline
Thank you David for the most precise explanation.. I
have another related doubt..

Supposing, I want to apply key() function within the
below for-each loop, on the document constructed from
the source XML(and not the RTF)
<xsl:for-each
select="exsl:node-set($rtf)/someelement">
  <!-- using key() here to operate on the document
representing the source XML; not the RTF -->
</xsl:for-each>

Can this be done..?

I feel, this could be a requirement in applications..

Regards,
Mukul

--- David Carlisle <davidc@xxxxxxxxx> wrote:

>   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"
>   use="@id"/>
>   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.
> 
> David
> 
>
________________________________________________________________________
> 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:
> http://www.star.net.uk
>
________________________________________________________________________
> 
> 



	
		
__________________________________ 
Do you Yahoo!? 
Yahoo! Mail - You care about security. So do we. 
http://promotions.yahoo.com/new_mail

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.