|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Interesting(?) XSLT task
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
|
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








