This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
RE: Simple problem??
- To: "'xsl-list at mulberrytech dot com'" <xsl-list at mulberrytech dot com>
- Subject: RE: Simple problem??
- From: "Pollington, Lee (ELSLON)" <lee dot pollington at biomednet dot com>
- Date: Mon, 16 Oct 2000 15:58:06 +0100
- Reply-To: xsl-list at mulberrytech dot com
<xsl:template match="products">
<content><xsl:apply-templates/></content>
</xsl:template>
<xsl:template match="product">
<name ID="{@ID}"><xsl:apply-templates/></name>
</xsl:template>
..is the template way, you could use for-each.
Lee
-----Original Message-----
From: Tomas Aspelin (SIX) [mailto:tomas.aspelin@six.se]
Sent: 17 October 2000 01:01
To: Xsl-Listan
Subject: Simple problem??
Hi everyone
I have a small problem that i need help with. I want to select
the content of an element with a specified id and move it to
another element with the same id. Can someone tell me how to
do this?
My XML looks something like this.
<products>
<product ID="1">prod_one</product>
<product ID="2">prod_two</product>
<product ID="3">prod_three</product>
<product ID="4">prod_four</product>
</products>
...
<content>
<name ID="1"><name>
<name ID="2"><name>
<name ID="3"><name>
<name ID="4"><name>
</content>
So, I want to copy the name of <product> "prod_one" with id="1" to
the element <name> in <content> that has the same id as the product.
Thanx
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list