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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T08:42:34+00:00 2026-06-17T08:42:34+00:00

I have a situation in xsl where I had a param value that will

  • 0

I have a situation in xsl where I had a param value that will be assigned some where in xslt transformation. But I get that param as a String , that param may contains a node a unbounded[0 or more repetitions] . How can I use param in for each as just any other xml content as used by any xpath expression.

Here is my sample xmls:
RetreiveData.xml

<soap-content>
------
<return>
<!--0 or more repetitions>-->
<data>
<startdate>12-12-12</startdate>
<enddate>12-12-13</enddate>
<nooftrans>5</nooftrans>
</data>
<data>
----
</data>

</soap=content>

This is my sample file which will be sent as param to xsl

xsl file:

<xsl style>
<param name ="retrieve"></param>
---
<xsl:for-each ="$retreive/return/data">
----do strufff
</xsl:for-each>


This was throwing an error . How can i travese to a node if it is param ?

I know this can be done using variable which is assigned to the path in a xml file . But that method is suggested in my scenario.

Can any one help me in solving this

Thanks in advance,
Eresh

  • 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-17T08:42:35+00:00Added an answer on June 17, 2026 at 8:42 am

    It would help If your posted code was well formed XSLT but guessing what you meant, then if $retrieve is a single element name you can do

    <param name ="retrieve"></param>
    ---
    <xsl:for-each select="*[name()=$retrieve]/return/data">
    ----do stuff
    </xsl:for-each>
    

    Note that XPath variables hold values not fragments of expressions. If $retrieve held the string "root" then $retrieve/return/data is not root/return/data/ it is "root"/return/data which is a syntax/type error as it is in most languages. If you have a string “x” in c or fortran, the expression “x” + 1 does not add one to the variable x. To do that you need an XPath parser available at run time. Some products have extensions for that (and there is an evaluate function proposed for XPath 3) But for simple cases the above avoids the need to evaluate a string as an XPath.

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

Sidebar

Related Questions

i have situation like this: class IData { virtual void get() = 0; virtual
I have situation, where running a query that filters by an indexed column in
We have situation where say we have four engineers that are working on software
I have this situation: $(#button).toggle(function(){ $(#window).animate({top:'0%'},1000); },function(){ $(#window).animate({top:'-100%'},1000); }); but I need change it
The situation is I have two xslt files: one is called from my ASP.NET
I have situation, when user prepare some data in ASP.NET application, it save them
I have situation when the current directory becomes invalid (ie, when some program deletes
i have situation in which i have some library projects, say DataProcessors,Lib2 , included
Possible Duplicate: What is my script src URL? I have situation: <script type=text/javascript src=http://server/some.js>
Situation: I have a simple XML document that contains image information. I need to

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.