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

RE: Grouping over multiple files

Subject: RE: Grouping over multiple files
From: Florent Georges <darkman_spam@xxxxxxxx>
Date: Sat, 14 Jan 2006 22:52:33 +0100 (CET)
RE:  Grouping over multiple files
Michael Kay wrote:

> > Florent, would you be kind enough to explain the function.

  Yes.  But Michael did it better than me :-)

  And as Michael said, in this case, you can directly cut what you want
in the document-uri.

> I would personally be inclined to write it as

>  <xsl:function name="k:get-source" as="xs:string">
>    <xsl:param    name="node" as="node()"/>
>    <xsl:variable name="root" as="node()" select="root($node)"/>
>    <xsl:sequence select='
>      for $i in 1 to 4 return
>        if (($north, $south, $east, $west)[$i] is $root)
>        then ("north", "south", "east", "west")[$i]
>        else ()'/>
>   </xsl:function>

  Intresting.  I'm used to use document trees in variables to simulate
randomly-accessed tables, indexed by strings for example.  But here,
because the "index" (the thing to use as such) is a document node, I
didn't see how to don't use a choose.  It's not really the same thing,
but it looks clearer and more compact than the choose.

  Regards,

--drkm


















	

	
		
___________________________________________________________________________ 
Nouveau : tiliphonez moins cher avec Yahoo! Messenger ! Dicouvez les tarifs exceptionnels pour appeler la France et l'international.
Tilichargez sur http://fr.messenger.yahoo.com

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.