You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@xalan.apache.org by Aseem Bajaj <as...@intersolutions.stpn.soft.net> on 2000/08/02 18:54:59 UTC

string to xpath

hi,

    i was trying to find a way to do this... but couldn't find... i wonder
if someone would just direct me where to look for a solution to this?

thanx

aseem

    the attribute to one of the tags in a the xml doc, refers to (is
actually) the xpath expression for certain nodes in the same document. i
want to print the text() in the nodes that are pointed to by that document,
rather than the atribute ( which is an xpath expr ) itself..

my xml file is
-------------

<data>
    <tag1 path="/data/tag2" />
    <tag2>dummy</tag2>
</data>

my xsl is
---------
<xsl:template match="data">
    <xsl:for-each select="//tag1">
        <xsl:value-of select="./@path" />
    </xsl:for-each>
</xsl:template>


the output would be
--------------------
/data/tag2

but i want the output to be
---------------------------
dummy