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 6882381
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T05:14:46+00:00 2026-05-27T05:14:46+00:00

<p>Title: <xsl:value-of select=$section_map /></p> Note the above section_map variable is printing value /form/medical-info/question-categories/question-category .

  • 0
 <p>Title: <xsl:value-of select="$section_map" /></p>

Note the above section_map variable is printing value /form/medical-info/question-categories/question-category .

Now i am trying to run my for loop by two ways:

1st way :

<xsl:for-each select="$section_map">...my code here ..</xsl:for-each>

2nd way :

<xsl:for-each select="/form/medical-info/question-categories/question-category">...my code here ..</xsl:for-each>

When i am using my for loop using first way. It is not able to enter insde the loop.

where as in second way it is executing fine.

Kindly tell me what could be the issue?

Kindly find the my xsl code here

    <?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0"
    xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns="http://www.w3.org/1999/xhtml"
    xmlns:date="http://exslt.org/dates-and-times" xmlns:str="http://exslt.org/strings">
    <xsl:output method="html" indent="yes" encoding="UTF-8"
        doctype-public="-//W3C//DTD XHTML 1.0 Transitional//EN"
        doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd" />
    <xsl:template match="/form">
    <xsl:param name="sectionMap" select="'medical-info'"/>

        <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">

            <head></head>

            <body>

<form name="myform" id="myform" method="post" action="/admin/eapp/testForm">
<xsl:variable name="section_map" select="concat('/form/',$sectionMap ,'/question-categories/question-category')"></xsl:variable>
         <p>Title: <xsl:value-of select="$section_map" /></p>
        <xsl:for-each select="$section_map">

        </xsl:for-each>

</form>
            </body>
        </html>

    </xsl:template>

</xsl:stylesheet>
  • 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-05-27T05:14:47+00:00Added an answer on May 27, 2026 at 5:14 am

    The section_map is a string:

    <xsl:variable name="section_map"
     select="concat('/form/',$sectionMap ,'/question-categories/question-category')">
    

    how do you expect to for-each about it?

    Maybe your should try select="/form/*[name()=$sectionMap]/question-categories/question-category" or some such instead?

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

<xsl:for-each select=$all_events[g:active = true()][g:body/g:current = true()]> <xsl:for-each select=g:body> <h2 class=normal><xsl:value-of select=g:sub_title /></h2> <xsl:for-each select=g:paragraphs>
I have the following snippet of XSL: <xsl:for-each select=item> <xsl:variable name=hhref select=link /> <xsl:variable
I'm trying to do a for each on each page: <xsl:for-each select=/root/page> <xsl:value-of select=/root/titles/@page//>
Title is the entire question. Can someone give me a reason why this happens?
Title field is sealed. Any attempts to update the default value resets the value
I've updated the title and the text of my original question after gaining more
Like the title tells: Is it possible to write a PHP-Function in a XSL-Document
Using XSL I am trying to turn this XML: <book><title>This is a <b>great</b> book</title></book>
HI, I want to select all nodes other than first node.My xsl and xml
This a very similar question as XSL: Transforming xml into a sorted multicolumn html

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.