This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
RE: repost Applying xsl:key to similar looking node names
- From: "Stuart Celarier" <stuart at ferncrk dot com>
- To: <xsl-list at lists dot mulberrytech dot com>
- Date: Fri, 3 May 2002 19:51:58 -0700
- Subject: RE: [xsl] repost Applying xsl:key to similar looking node names
- Reply-to: xsl-list at lists dot mulberrytech dot com
I am not sure I understand your question. What does "pull the data"
mean? What does "similar looking node names" mean?
Are you looking for something like this?
<xsl:template match="/">
<agentnames>
<xsl:apply-templates select="//agentname"/>
</agentnames>
</xsl:template>
<xsl:template match="agentname">
<xsl:copy-of select="."/>
</xsl:template>
That would result in an XML file with an <agentnames> element containing
each of the <agentname> elements. I don't see where you think you need
to use xsl:key.
Try restating the question or giving an example of the result you want
from transforming you sample.
Cheers,
Stuart
-----Original Message-----
From: owner-xsl-list@lists.mulberrytech.com
[mailto:owner-xsl-list@lists.mulberrytech.com] On Behalf Of KUMAR
NINGASHETTY
Sent: Wednesday, May 01, 2002 10:46
Sorry if this is not a sensible question ...For the following xml i was
wondering is there a way to
use xsl:key for similar looking node names...If so how ??
All i need is to pull the data from the node <agentname> across the
whole xml ...
<data>
<companies>
<agent>
<agentname>AAA</agentname>
</agent>
<agent>
<agentname>BBB</agentname>
<companies>
<agent>
<agentname>CCC</agentname>
</agent>
<agent>
<agentname>DDD</agentname>
</agent>
</companies>
</agent>
</companies>
</data>
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list