Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9306529
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 19, 20262026-06-19T00:11:37+00:00 2026-06-19T00:11:37+00:00

I have an XSL variable prdxml which holds an XML like this <node id=2939

  • 0

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

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-19T00:11:38+00:00Added an answer on June 19, 2026 at 12:11 am

    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:

    <xsl:value-of select="$prdxml/@id" />
    <xsl:value-of select="$prdxml/@parentID" />
    

    To access properties you’ve defined on an Umbraco node, you’ll use something like this:

    <xsl:value-of select="$prdxml/data[@alias='pass_word']" />    
    <xsl:value-of select="$prdxml/data[@alias='logo']" />
    

    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:

    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE xsl:stylesheet [ <!ENTITY nbsp "&#x00A0;"> ]>
    <xsl:stylesheet 
        version="1.0" 
        xmlns:xsl="http://www.w3.org/1999/XSL/Transform" 
        xmlns:msxml="urn:schemas-microsoft-com:xslt"
        xmlns:umbraco.library="urn:umbraco.library" xmlns:Exslt.ExsltCommon="urn:Exslt.ExsltCommon" xmlns:Exslt.ExsltDatesAndTimes="urn:Exslt.ExsltDatesAndTimes" xmlns:Exslt.ExsltMath="urn:Exslt.ExsltMath" xmlns:Exslt.ExsltRegularExpressions="urn:Exslt.ExsltRegularExpressions" xmlns:Exslt.ExsltStrings="urn:Exslt.ExsltStrings" xmlns:Exslt.ExsltSets="urn:Exslt.ExsltSets" 
        exclude-result-prefixes="msxml umbraco.library Exslt.ExsltCommon Exslt.ExsltDatesAndTimes Exslt.ExsltMath Exslt.ExsltRegularExpressions Exslt.ExsltStrings Exslt.ExsltSets">
    
    <xsl:output method="html" omit-xml-declaration="yes"/>
    
    <xsl:param name="currentPage"/>
    
    <xsl:template match="/">
        Current Page ID : <xsl:value-of select="$currentPage/@id" />
    </xsl:template>
    
    </xsl:stylesheet>
    

    Possible reasons why this may not display on your page could be :

    • <xsl:param name="currentPage" /> is removed from your XSLT.
    • The XSLT isn’t bound to a Macro.
    • The Macro isn’t featured on a Template.
    • The Template isn’t assigned to your Node.
    • The Node hasn’t been published.
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a variable named filt holding an xml like this: <filters> <ISP_WebItem FILTER=Farve
I have a xsl:variable ($features-list) specified in my XSL which contains a tree fragment
I have something like the following code:: <xsl:variable name=sample> <xsl:copy-of select=//foo> <xsl:copy-of select=//bar> </xsl>
I have a variable from which I need to dynamically generate nodes <xsl:template match=banner_discount_1
I have this snippet of XSLT code: <xsl:variable name=key select=@*[1]/> But I need it
I have XSLT 1.0 code like this: <xsl:key name=enemyItems match=metadata[attributes/metadata_key/@value = 'enemylist'] use=attributes/metadata_refkey/@value/> <xsl:template
When I have this in xsl: <xsl:choose> <xsl:when test=something > 0> <xsl:variable name=myVar select=true()/>
In my XSLT, I have a variable which contains a string. This string contains
I have an XSLT stylesheet like the following: <?xml version=1.0 encoding=utf-8?> <xsl:stylesheet version=2.0 xmlns:xsl=http://www.w3.org/1999/XSL/Transform
I have the following XSL which I render into my HTML: <xsl:for-each select=user> <xsl:variable

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.