Subject: Re: [xsl] find the name of the child after root From: David Carlisle <davidc@xxxxxxxxx> Date: Wed, 06 Nov 2013 16:04:43 +0000 |
That works with the exclude-result-prefixes avoiding the namespace, thanks, but now I face following: Originally I wanted o use the name of the root or the next child to loop over in a for-each as bellow
<xsl:for-each select="/node()[1]/name()"> /* or this notation <xsl:for-each select="/*[1]/local-name()"/>*/
which does not work. I get no elments from the xml tree because the xpath does not works . I cant work with the XML for example say: <xsl:variable name="Root">
<xsl:value-of select="/*[1]/local-name()"/>
</xsl:variable> <xsl:for-each select="$Root">
<Version> <xsl:value-of select="ChildElment1/ChildElement2/getVersion"></Version> </xsl:for-each> The output is: <Version/>
but following works <xsl:for-each select="RootElement"> <Version><xsl:value-of select="ChildElement1/ChildElement2/getVersion"></Version> </xsl:for-each> Output: <Version>1.26</Version>
brg
________________________________________________________________________ The Numerical Algorithms Group Ltd is a company registered in England and Wales with company number 1249803. The registered office is: Wilkinson House, Jordan Hill Road, Oxford OX2 8DR, United Kingdom.
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] find the name of the chi, henry human | Thread | Re: [xsl] JSON-encoding strings in , Hermann Stamm-Wilbra |
Re: [xsl] find the name of the chi, henry human | Date | [xsl] exclude-result-prefixes issue, Andrew Welch |
Month |