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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T09:49:57+00:00 2026-05-20T09:49:57+00:00

<xsl:variable name=filterValue >@subject = ‘Subject To Filter On'</xsl:variable> <xsl:for-each select=$Rows[$filterValue]> It seems to me

  • 0
<xsl:variable name="filterValue"
 >@subject = 'Subject To Filter On'</xsl:variable>
<xsl:for-each select="$Rows[$filterValue]">

It seems to me that the $filterValue is being treated as a literal string rather than being evaluated. How can I make it so that the variable’s value is evaluated instead?

Desired result:

<xsl:for-each select="$Rows[@subject = 'Subject To Filter On']">

I apologize if this has been answered before, I don’t know much terminology about XSL so I’m having trouble searching online. Thanks.

  • 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-20T09:49:58+00:00Added an answer on May 20, 2026 at 9:49 am

    Dynamic evaluation of XPath expressions is not supported in both XSLT 1.0 and XSLT 2.0.

    Usually, there are workarounds.

    In this specific case you can have (global/external) parameters:

      <xsl:param name="attrName" select="'subject'"/>
      <xsl:param name="attrValue" select="'Subject To Filter On'"/>
    

    and then in your code:

    <xsl:for-each select="$Rows[@*[name()=$attrName] = $attrValue]"> 
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have <xsl:for-each select=ancestor-or-self::*> <xsl:variable name=expression select=name() ></xsl:variable> </xsl:for-each> below I have href and
What I have is following: <xsl:variable name=myvar select=.//spss:category[((not @varName) or @varName=$colVarName) and @text=$series]/spss:cell/@text/> What
This code selects the nodes, I want to work on...: <xsl:variable name=rootTextpageNode select=$currentPage/ancestor-or-self::node [@level
I have the following XSLT code that almost does what I want: <xsl:variable name=scoredItems
I have this snippet of XSLT code: <xsl:variable name=key select=@*[1]/> But I need it
The following works for me: <xsl:variable name=core select=document('CoreMain_v1.4.0.xsd') /> <xsl:variable name=AcRec select=document('AcademicRecord_v1.3.0.xsd') /> <xsl:template
The relevant parts of the code: <xsl:variable name=apos>'</xsl:variable> <xsl:variable name=and select='&#039;' /> <xsl:value-of select=translate(products_name/node(),$and,$apos)/>
Given <xsl:variable name=datePrecision as=element()*> <p>Year</p> <p>Month</p> <p>Day</p> <p>Time</p> <p>Timestamp</p> </xsl:variable> The expression $datePrecision[5] returns
The following isn't working as intended: <xsl:template match=xs:complexType> <xsl:param name=prefix /> <xsl:if test=$prefix='core'> <xsl:variable
How can I retrieve the position of the current Para? <xsl:template match=Para> <xsl:variable name=PositionInDocument

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.