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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T12:51:59+00:00 2026-06-05T12:51:59+00:00

Can you share an XSLT with me which achieves following please? Input: <alfa data=abc

  • 0

Can you share an XSLT with me which achieves following please?

Input:

<alfa data="abc" xmlns="http://test1.com/">
  <mus:beta xmlns:mus="http://test2.com">
    <mus:a>1234567897</mus:a>
    <mus:s>777666</mus:s>
  </mus:beta>
</alfa>

Output should be:

<alfa data="abc" xmlns="http://test1.com/">
  <beta xmlns="http://test2.com">
    <a>1234567897</a>
    <s>777666</s>
  </beta>
</alfa>

In fact; the input is generated with XmlBeans; I can not achieve the output with xmlbeans; So i will do a transform with xslt in mediation; however I need a xslt first 🙂 XmlBeans solution is acceptable too. 🙂

For xmlbeans users; following does not work, fyi:

Map map = new HashMap();
 map.put("http://test1.com/",""); 
 map.put("http://test2.com/","");
 xo.setSaveSuggestedPrefixes(map);

Cheers,
Kaan

  • 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-06-05T12:52:01+00:00Added an answer on June 5, 2026 at 12:52 pm

    Here is a stylesheet:

    <xsl:stylesheet
      xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
      xmlns:mus="http://test2.com"
      exclude-result-prefixes="mus"
      version="1.0">
    
    <xsl:template match="@* | node()">
      <xsl:copy>
        <xsl:apply-templates select="@* | node()"/>
      </xsl:copy>
    </xsl:template>
    
    <xsl:template match="mus:*">
      <xsl:element name="{local-name()}" namespace="namespace-uri()}">
         <xsl:apply-templates select="@* | node()"/>
      </xsl:element>
    </xsl:template>
    
    </xsl:stylesheet>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

i am having an application which can share Notes to evernote,it works fine i
So I know you can share your cookies across subdomains eg. staging.mysite.com and www.mysite.com
Using XSLT, how can I wrap siblings that share the same value for an
i have a note which can share it to evernote,i done it sucessfully.but there
I'm creating an application where users can share data by sending emails to each
I'm building a site on which users can share YouTube videos. Therefore I need
I am developing an application in which user can share messages with his/her Facebook
As you may know, IIS 6+ can share port 80 with other HTTP applications
If anybody can share a link in which Unit of Work pattern is fully
Is there a way I can share Http/Wicket Session information to the service layer

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.