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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T00:10:33+00:00 2026-05-23T00:10:33+00:00

Maybe there is a better way of describing my problem… Here is an example

  • 0

Maybe there is a better way of describing my problem…

Here is an example of what I would like to do:

Take this:

<inc_3c>
    <Title>This is 3C</Title>
    <Subtitle>Lorem ipsum dolor consectetur adipiscing elit. Fusce mattis consequat malesuada.</Subtitle>
    <Description>Consectetur adipiscing elit. Fusce mattis consequat malesuada. Nullam vel justo a dui pellentesque euismod. Integer eu pulvinar dolor.</Description>
    <Class>priceWrapper</Class>
    <Price>$00.00</Price>
    <Url>Url</Url>
    <Image>apple-tv.png</Image>
</inc_3c>

and copy it like so:

<inc_3c-copy>
    <Title>This is 3C</Title>
    <Subtitle>Lorem ipsum dolor consectetur adipiscing elit. Fusce mattis consequat malesuada.</Subtitle>
    <Description>Consectetur adipiscing elit. Fusce mattis consequat malesuada. Nullam vel justo a dui pellentesque euismod. Integer eu pulvinar dolor.</Description>
    <Class>priceWrapper</Class>
    <Price>$00.00</Price>
    <Url>Url</Url>
    <Image>apple-tv.png</Image>
</inc_3c-copy>
  • inc_3c = would populate content on page#1
  • inc_3c-copy = would populate content on page#2

might even be a scenario where inc_3c and inc_3c-copy live on the same page.

hopefully I wouldn’t need to create another XSL page.

this would have to be non-coder proof.

  • 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-23T00:10:34+00:00Added an answer on May 23, 2026 at 12:10 am

    Learn about using the identity rule/template and overriding it. This alone is the most fundamental and powerful XSLT design pattern.

    In your case we use this design pattern to override just the top element in the following way:

    <xsl:stylesheet version="1.0"
     xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
     <xsl:output omit-xml-declaration="yes" indent="yes"/>
     <xsl:strip-space elements="*"/>
    
     <xsl:template match="node()|@*">
         <xsl:copy>
           <xsl:apply-templates select="node()|@*"/>
         </xsl:copy>
     </xsl:template>
    
     <xsl:template match="/inc_3c">
      <inc_3c-copy>
       <xsl:apply-templates/>
      </inc_3c-copy>
     </xsl:template>
    </xsl:stylesheet>
    

    When applied on the provided XML document:

    <inc_3c>
        <Title>This is 3C</Title>
        <Subtitle>Lorem ipsum dolor consectetur adipiscing elit. Fusce mattis consequat malesuada.</Subtitle>
        <Description>Consectetur adipiscing elit. Fusce mattis consequat malesuada. Nullam vel justo a dui pellentesque euismod. Integer eu pulvinar dolor.</Description>
        <Class>priceWrapper</Class>
        <Price>$00.00</Price>
        <Url>Url</Url>
        <Image>apple-tv.png</Image>
    </inc_3c>
    

    the wanted, corresct result is produced:

    <inc_3c-copy>
       <Title>This is 3C</Title>
       <Subtitle>Lorem ipsum dolor consectetur adipiscing elit. Fusce mattis consequat malesuada.</Subtitle>
       <Description>Consectetur adipiscing elit. Fusce mattis consequat malesuada. Nullam vel justo a dui pellentesque euismod. Integer eu pulvinar dolor.</Description>
       <Class>priceWrapper</Class>
       <Price>$00.00</Price>
       <Url>Url</Url>
       <Image>apple-tv.png</Image>
    </inc_3c-copy>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Maybe there's no way to solve this the way I'd like it but I
Maybe there is a better way to do this. The jist of I want
Maybe there was a better way to do this, but I have a list
Is there a better way of writing the following method? Using LINQ maybe? Instead
Maybe there is no difference, but is either way better than the other (or
I'm having trouble transitioning my walking to idle animations. Maybe there's a better way
Maybe there is a better way around having to use a cookie. But i
I would like to know if there's a way to monitor the life of
Is there a better/shorter way to handle (lots of) null references, for example when
Maybe there is a proper term for this, but what if you want 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.