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

  • Home
  • SEARCH
  • 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 6570395
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T14:45:04+00:00 2026-05-25T14:45:04+00:00

I have a variable: <xsl:variable name=code select=F2/> can I reinitializing it anywhere else in

  • 0

I have a variable:

<xsl:variable name="code" select="F2"/>

can I reinitializing it anywhere else in my code? is it possible?
I need save the current node in it and determine whether rejected it or pass in.

  • 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-25T14:45:05+00:00Added an answer on May 25, 2026 at 2:45 pm

    xsl:variables cannot be reassigned ‘explicitly’, although their scope is limited to the current construct (e.g. xsl:template or xsl:for-each), and so will be ‘re-initialized’ as it traverses to the next ‘each’.

    xsl:variables can be pointed to a node, i.e.

    <xsl:variable name="someNodeVar" select="xpathToElement"/>
    

    and then used e.g.

    <xsl:value-of select="$someNodeVar/relativeXpathGoesHere/text()"/>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have this snippet of XSLT code: <xsl:variable name=key select=@*[1]/> But I need it
What I have is following: <xsl:variable name=myvar select=.//spss:category[((not @varName) or @varName=$colVarName) and @text=$series]/spss:cell/@text/> What
I have the following XSLT code that almost does what I want: <xsl:variable name=scoredItems
I have the following snippet of XSL: <xsl:for-each select=item> <xsl:variable name=hhref select=link /> <xsl:variable
I have the following template: <xsl:template name=theday> <xsl:param name=thisday /> <xsl:variable name='holiday' select='foo'/><!-- made
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
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
I have nested xsl:for loops: <xsl:for-each select=/Root/A> <xsl:for-each select=/Root/B> <!-- Code --> </xsl:for> </xsl:for>
Assume I have the following temp documents: <xsl:variable name=emc> <people> <person id=1> <name>Jim</name> </person>
I have a variable in my xsl that may or may not be declared.

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.