|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] 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
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|

Cart








