Okay so by your method then this would get me each member of the struct node
<?xml version="1.0" ?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="/">
<xsl:for-each
select="methodResponse/params/param/value/array/data/value/struct/member/value[string='Syndicated']">
<xsl:for-each
select="methodResponse/params/param/value/array/data/value/struct/member">
<xsl:value-of
select="methodResponse/params/param/value/array/data/value/struct/member/name"
/>
:
<xsl:value-of
select="methodResponse/params/param/value/array/data/value/struct/member/value/string"
/>
;<br />
</xsl:for-each>
</xsl:for-each>
</xsl:template>
</xsl:stylesheet>
But do I really have to give the path for each item isnt there a way to say
start at this path and go down or up?
-----Original Message-----
From: Josh Canfield <Josh(_dot_)Canfield(_at_)plumtree(_dot_)com>
Sent: Mar 25, 2004 10:33 AM
To: xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com
Subject: RE: [xsl] Some help with xsl transform and filter please
Your path is incomplete.
<xsl:template match="/">
<xsl:for-each select="struct/member/value[string='Syndicated']">
Your template match is putting your context at the root of the document so your
for-each is looking for a "struct" node relative to the root, but there isn't
one.
You can fully specify the path like this:
<xsl:for-each
select="methodResponse/params/param/value/array/data/value/struct/member/value[string='Syndicated']">
This explicitly tells the xpath processor where to find the nodes.
Josh
[clipped.............]
Dylan Barber (CIW Professional, A+ Technician, Web Designer, Web Developer)
home phone-:- (785) 765-2664
work phone-:- (785) 539-3565 x1034
email-:- dylan(_dot_)barber(_at_)earthlink(_dot_)net
homesite-:- http://www.codegalaxy.com