[XSL-LIST Mailing List Archive Home] [By Thread] [By Date]

RE: [xsl] Connecting the Source and Destination fields


Subject: RE: [xsl] Connecting the Source and Destination fields
From: "Yaswanth" <yaswanth.mtrx@xxxxxxxxx>
Date: Mon, 20 Aug 2007 15:49:18 +0530

Thanks 


-----Original Message-----
From: Ronan Klyne [mailto:ronan.klyne@xxxxxxxxxxx] 
Sent: Monday, August 20, 2007 3:44 PM
To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
Subject: Re: [xsl] Connecting the Source and Destination fields

Yaswanth wrote:
> In 
> <xsl:apply-templates select="key('conn-by-source', $startEvent)"/>
> 
> How will I know the start Event? 
> 
> Start Event (Source) has to be chosen in such a way that it is not present
> in the destination of any Connection! And then it has to proceed with the
> remaining things...
> 
> Isn't it? 
> 
> 
> -----Original Message-----
> From: Andrew Welch [mailto:andrew.j.welch@xxxxxxxxx] 
> Sent: Monday, August 20, 2007 2:41 PM
> To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
> Subject: Re: [xsl] Connecting the Source and Destination fields
> 
> On 8/20/07, Ronan Klyne <ronan.klyne@xxxxxxxxxxx> wrote:
>> Out of curiosity, how would your solution change if we couldn't
>> guarantee that event.0 would be first? I couldn't express that
>> particularly elegantly either...
> 
> Just make it a parameter...
> 
> <xsl:apply-templates select="key('conn-by-source', $startEvent)"/>
> 

This XPath would select such elements:
/root/connection[not(/root/connection/@destination = @source)]

You could put that in a for-each, and generate chains for each of them.
(See my XSL for an example of this)

	# r

-- 
Ronan Klyne
Business Collaborator Developer
Tel: +44 (0)870 163 2555
ronan.klyne@xxxxxxxxxxx
www.groupbc.com


Current Thread
Keywords