I have an XML document of the form
[tt]
<ArrayOfSomething>
<Something>
<MyElement xmlns=" </Something>
<Something>
<MyElement xmlns=" </Something>
</ArrayOfSomething>
[/tt]
and an XSL transformation of the form
[tt]
<xsl:template match="ArrayOfSomething">
<xsl:for-each select="Something">
<xsl:value-of select="MyElement" />
<xsl:text>statictext</xsl:text>
</xsl:for-each>
</xsl:template>
[/tt]
When I run this transform all I'm getting is the statictext element - it doesn't seem to be picking up the MyElement element. I know this is to do with the xmlns attribute as when I remove it the transform works (I'm trying to address this separately - the source XML doc is the serialization of a complex type returned from a web service)
Any idea what expression (think it's xpath) I could use in the value-of element to pick up the element's value?
Any guidance appreciated.
Greg.
[tt]
<ArrayOfSomething>
<Something>
<MyElement xmlns=" </Something>
<Something>
<MyElement xmlns=" </Something>
</ArrayOfSomething>
[/tt]
and an XSL transformation of the form
[tt]
<xsl:template match="ArrayOfSomething">
<xsl:for-each select="Something">
<xsl:value-of select="MyElement" />
<xsl:text>statictext</xsl:text>
</xsl:for-each>
</xsl:template>
[/tt]
When I run this transform all I'm getting is the statictext element - it doesn't seem to be picking up the MyElement element. I know this is to do with the xmlns attribute as when I remove it the transform works (I'm trying to address this separately - the source XML doc is the serialization of a complex type returned from a web service)
Any idea what expression (think it's xpath) I could use in the value-of element to pick up the element's value?
Any guidance appreciated.
Greg.