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

Re: Better way to change context?

Subject: Re: Better way to change context?
From: David Carlisle <davidc@xxxxxxxxx>
Date: Thu, 14 Oct 2004 16:41:32 +0100
element change context .net
> However, something bugs me. I used xsl:for-each to force the context to 
> the node pointed to by the cross-reference. It seems a little silly to use 
> a for-each statement to do that.

Not really, saxon:path() could have been designed to take an argument
specifying a node, but it isn't it just does the current node, so you
have to make what you want be the current node and for-each is used for
that purpose as often as it's used for iterating over a set of more than
one. (similar uses come up all the time with key() or xsl:number)

On the other hand I almost certainly wouldn't use an extension element
at all here. Without seeing your input and only a fraction of your
output I'm not sure what I would use, but probably xsl:number would give
you a 3.2.4 type number for chapter 3 section 2 subsetion 4 that you
could use to generate a unique filename suffix for each file.

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
________________________________________________________________________

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.