I have an XSL variable prdxml which holds an XML like this
<node id="2939" parentID="2938" level="3" writerID="0" >
<data alias="itemNumbers">,3101056,8261247,</data>
<data alias="pass_word">akspass</data>
<data alias="logo">/media/41532/inner-logo01.png</data>
</node>
How can I select id(id=”2939″) which is in the root node from this variable
This looks like the XML structure of an Umbraco node (pre-v4.5).
To access any of the attributes on an Umbraco node, you can use the
@symbol like so:To access properties you’ve defined on an Umbraco node, you’ll use something like this:
Umbraco have a whole section on their wiki here; http://our.umbraco.org/wiki/reference/xslt ; with examples on how to traverse their XML with XPATH.
— edit to address comments —
A working version of my XSLT is:
Possible reasons why this may not display on your page could be :
<xsl:param name="currentPage" />is removed from your XSLT.