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
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