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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T12:24:01+00:00 2026-05-31T12:24:01+00:00

I am working on XML to XML transformations through XSLT. I want to remove

  • 0

I am working on XML to XML transformations through XSLT. I want to remove the name spaces in output xml. For that I have used Exclude result prefix option, but in the output i still see the namespaces.

Sorce XML:

 <?xml version="1.0" encoding="ISO-8859-1"?>
 <aaa>
 hello
 </aaa>

XSLT written:

 <?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" xmlns:simple="aaaa" xmlns:xlink="http://www.w3.org/1999/xlink"      xmlns:tcm="http://www.tridion.com/ContentManager/5.0" exclude-result-prefixes="msxsl simple wireframe widget tcdl tcm xlink"      xmlns:wireframe="bbb" xmlns:widget="ccc" xmlns:tcdl="tcdl">
  <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="yes" />
 <xsl:template match="/">
  <wireframe:wireframe>
       <wireframe:si>
         <widget:ah>
         <xsl:value-of select="aaa" />
               </widget:ah> 
         </wireframe:si>
 </wireframe:wireframe>
 </xsl:template>
   </xsl:stylesheet>

OUTPUT produced:

 <?xml version="1.0" encoding="utf-8"?>
 <wireframe:wireframe xmlns:wireframe="aaaa">
   <wireframe:si>
     <widget:ah xmlns:widget="bbb">
 hello
 </widget:ah>
   </wireframe:si>
 </wireframe:wireframe>

Output Expexcted:

 <?xml version="1.0" encoding="utf-8"?>
 <wireframe:wireframe>
   <wireframe:si>
     <widget:ah>
 hello
 </widget:ah>
   </wireframe:si>
 </wireframe:wireframe>

Please tell me how to avoid namespace appearance in output XML.

Thank you in advance.

  • 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-31T12:24:03+00:00Added an answer on May 31, 2026 at 12:24 pm

    You could leave out the two used namespaces in the exclude attribute as follows:

    exclude-result-prefixes="msxsl simple xlink tcm tcdl"
    

    which will make sure that the two namespaces which are used appear in the root element, not in the element where they are first used; the result will be:

    <?xml version="1.0" encoding="UTF-8"?>
    <wireframe:wireframe xmlns:widget="ccc" xmlns:wireframe="bbb">
        <wireframe:si>
            <widget:ah>
     hello
     </widget:ah>
        </wireframe:si>
    </wireframe:wireframe>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am working on XML to XML transformations through XSLT. I want to extract
I'm working on a XSLT transformation that consists on merging two XML and then
I am working on XSLT transformations. I am stuck at one point. Source XML:
I am new to XSLT working on XML to XML transformation. I want to
I'm working with XML that was designed by somebody who got paid by the
I'm working with an XML document that contains a structure that looks similar to
I'm working on an XML Schema which is going to be used for data
I'm working with various XML inputs and outputs and simply want to grab the
I'm currently working on a project which uses XSL-Transformations to generate HTML from XML.
I am working under java application which uses XSLT transformation. I have a lot

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.