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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T00:02:19+00:00 2026-05-31T00:02:19+00:00

I am working on XSLT transformations. I am stuck at one point. Source XML:

  • 0

I am working on XSLT transformations. I am stuck at one point.

Source XML:

   <?xml version="1.0" encoding="ISO-8859-1"?>
    <Content xmlns="uuid:4522eb85-0a47-45f9-8e2b-1f82c78fa920">
    <first xmlns="uuid:4522eb85-0a47-45f9-8e2b-1f82c78fa920">Hello World.This is Fisrt       field</first>
    <second xmlns="uuid:4522eb85-0a47-45f9-8e2b-1f82c78fa920">Hello World.This is second      field2</second>
   </Content>

Output Format required:

<aaa>Hello World.This is Fisrt   field</aaa>
<bbb>Hello World.This is second field</bbb>

Please suggest a solution for this.

I have tried this

   <?xml version="1.0" encoding="utf-8"?>
    <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
    xmlns="uuid:4522eb85-0a47-45f9-8e2b-1f82c78fa920">
    <xsl:output method="xml" indent="yes"/>
    <xsl:template match="/">
    <aaa>
    <xsl:value-of select="Content/first"/>
    </aaa>
     </xsl:template>
    </xsl:stylesheet> 

Output that i got is

 <?xml version="1.0" encoding="utf-8"?>
    <aaa xmlns="uuid:4522eb85-0a47-45f9-8e2b-1f82c78fa920"></aaa>

Output required is

<aaa>Hello World.This is Fisrt   field</aaa>
  • 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-31T00:02:20+00:00Added an answer on May 31, 2026 at 12:02 am

    Here’s one that does what you want, sort of, see comments below.

    <?xml version="1.0" encoding="utf-8"?>
    
    <xsl:stylesheet version="1.0"
      xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
      xmlns:x="uuid:4522eb85-0a47-45f9-8e2b-1f82c78fa920">
    
      <xsl:output method="xml" indent="yes"/>
    
      <xsl:template match="/">
        <xsl:element name="root">
          <xsl:element name="aaa">
            <xsl:value-of select="x:Content/x:first"/>
          </xsl:element>
          <xsl:element name="bbb">
            <xsl:value-of select="x:Content/x:second"/>
          </xsl:element>
        </xsl:element>
      </xsl:template>
    
    </xsl:stylesheet>
    

    While certain xslt processors allow you to have more than one root element in the result, this isn’t advisable as it contradicts syntactically with the standard.

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

Sidebar

Related Questions

I'm working on XSLT. I have this XML source file : <?xml version=1.0 encoding=UTF-8?>
I am working on this from xslt cookbook type my.xml <?xml version=1.0 encoding=UTF-8?> <people>
I am working with an open source version of the Saxon XSLT processor Saxon
I'm working on a XSLT transformation that consists on merging two XML and then
XSLT available is 1.0. I'm working on a dual-language site in an XML-based CMS
I'm working on XSLT 1.0 version I have declared an int variable that have
I'm working on an XSLT file to transform an XML doc that represents a
i am using XSLT 1.0 version and got stuck in translating a pattern. I
I'm transforming xml using the following code. It works fine for one xslt but
I'm working on some xslt transformations and I've just found out that there might

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.