Ccssrs69
Programmer
- Jan 7, 2008
- 2
I new to the XSL thing and I'm have issues linking data together. I have an XML file like below and need help with get it to output correctly.
<doc>
<new id="22234" name="Bob">
<more id="22234" address="somewhere">
<more id="22234" address="somewhere else">
<new id="22235" name="George">
<more id="22235" address="somewhere new">
<new id="22236" name="Mike">
<more id="22236" address="new place">
<doc>
My XSL code looks something like this, but I'm not sure this can even be done.
<xsl:for-each select="/doc/new">
<xsl:value-of select="/doc/new/@name"/>
<xsl:for-each select="doc/new/@id = doc/new/more/@id">
<xsl:value-of select="doc/new/more/@address"/>
</xsl:for-each>
</xsl:for-each>
I have tried everything that I can think of, and I probably over looking something stupid, but I could use the help. I need the data to display like this.
Bob
somewhere
somewhere else
George
somewhere new
Mike
new place
Any help would be greatly appreciated and thanks in advance.
<doc>
<new id="22234" name="Bob">
<more id="22234" address="somewhere">
<more id="22234" address="somewhere else">
<new id="22235" name="George">
<more id="22235" address="somewhere new">
<new id="22236" name="Mike">
<more id="22236" address="new place">
<doc>
My XSL code looks something like this, but I'm not sure this can even be done.
<xsl:for-each select="/doc/new">
<xsl:value-of select="/doc/new/@name"/>
<xsl:for-each select="doc/new/@id = doc/new/more/@id">
<xsl:value-of select="doc/new/more/@address"/>
</xsl:for-each>
</xsl:for-each>
I have tried everything that I can think of, and I probably over looking something stupid, but I could use the help. I need the data to display like this.
Bob
somewhere
somewhere else
George
somewhere new
Mike
new place
Any help would be greatly appreciated and thanks in advance.