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

Re: Interesting(?) XSLT task

Subject: Re: Interesting(?) XSLT task
From: Eric van der Vlist <vdv@xxxxxxxxxxxx>
Date: Fri, 05 Nov 1999 20:00:46 +0100
logins.xsl
What about something like :

<xsl:template match="User">
 <xsl:variable name="id" select="@id"/>
 <User id="{@id}">
   <xsl:attribute name="logins">
     <xsl:for-each select="../Login[@user=$id]">
	<xsl:value-of select="concat(@id, ' ')"/>
     </xsl:for-each>
   </xsl:attribute>
 </User>
</xsl:template>

???

Eric

Terris wrote:
> 
> Let's say I have the following document which
> has IDs and IDREFs:
> 
> <User id="id5"/>
> <Login id="id1" user="id5" name="bar"/>
> <Login id="id2" user="id5" name="foo"/>
> 
> I want to produce:
> 
> <User id="id5" logins="id1 id2"/>
> 
> I add a new attribute called logins which
> contains the ids of the objects that reference
> the user.
> 
> Can someone show me a stylesheet that can
> do this?  I am having trouble with
> concatenation two ids in the logins
> attribute.
> 
> Thanks,
> Terris
> 
>  XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list

-- 
------------------------------------------------------------------------
Eric van der Vlist                                              Dyomedea

http://www.dyomedea.com                          http://www.ducotede.com
------------------------------------------------------------------------


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


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.