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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T16:02:58+00:00 2026-05-26T16:02:58+00:00

I would like to change the value of RequestQueue elemt under @sorregion name[.=’default’] to

  • 0

I would like to change the value of RequestQueue elemt under “@sorregion name[.=’default’]” to “DEFAULT.REQUEST. I tried using the below identity template. Could anyone please help me with this dentity template. I would like to use identity template, only.
My xsl file

<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
    xmlns:msxsl="urn:schemas-microsoft-com:xslt" exclude-result-prefixes="msxsl"
>
    <xsl:output method="xml" indent="yes"/>

    <xsl:template match="@* | node()">
        <xsl:copy>
            <xsl:apply-templates select="@* | node()"/>
        </xsl:copy>
    </xsl:template>
    <xsl:template match="@name[.='default']/QueueDetails/RequestQueue">
         <xsl:value-of select="'DEFAULT.REQUEST'"/>
    </xsl:template>
</xsl:stylesheet>

My input xml

  • 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-26T16:02:58+00:00Added an answer on May 26, 2026 at 4:02 pm

    How I would approach this question is the same way that @Kirill Polishchuk did (+1 btw) and that is to override the identity transform only for the node that needs to change.

    However, in your question you stated “I would like to use identity template, only.“. If this is truly the case and you only want one template, you can do it like this:

    <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
      <xsl:output method="xml" indent="yes"/>
      <xsl:strip-space elements="*"/>
    
      <xsl:template match="node()|@*">
        <xsl:choose>
          <xsl:when test="current()[name()='RequestQueue'][ancestor::SORRegion[@name = 'default']]">
            <xsl:copy>
              <xsl:text>DEFAULT.REQUEST</xsl:text>
            </xsl:copy>
          </xsl:when>
          <xsl:otherwise>
            <xsl:copy>
              <xsl:apply-templates select="node()|@*"/>
            </xsl:copy>        
          </xsl:otherwise>
        </xsl:choose>
      </xsl:template>
    
    </xsl:stylesheet>
    

    I would be curious to know though why you would want to use the identity transform template only. If you end up needing to modify more than just RequestQueue, it’s going to get ugly fast.

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

Sidebar

Related Questions

When using the jquery slider, I would like to change the default color of
Using Javascript, I would like change the background color of the numbers in an
I would like to change the default behavior of Joomla's password reminding mechanism. I
I would like to change the name of the ruby process that gets displayed
I would like to change visual studio's default configurations (Debug,Release). That is, change the
I have the following problem: I would like to change value of ExpandableListView's cell
I would like to change the value of a property if it is a
I would like to change the values of RouteName node, according to the below
I would like to change the self value of a float instance. I have
I would like to change the value in minChars depending on a select value

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.