How to remove namespace from root-element

Hi Gurus,
I want one xml output from xslt transformation with no namespace. I managed to remove namespace from child elements by leveraging elementFormDefault ='unqualified' property of xsd. But not able remove namespace from root-element.
Output that I want is :
<?xml version = '1.0' encoding = 'UTF-8'?>
<inp1:Email_Mod_Root>
   <Email_Mod_Root_Element>
      <Email_Record1>
         <PERSON_NUMBER>123456</PERSON_NUMBER>
         <COUNTRY/>
          <EMAIL_TYPE>WORK</EMAIL_TYPE>
         <EMAIL>EMAIL3</EMAIL>
         <PRIMARY_FLAG>Y</PRIMARY_FLAG>
      </Email_Record1>
</Email_Mod_Root_Element>
</Email_Mod_Root>
Output that I am getting:
<?xml version = '1.0' encoding = 'UTF-8'?>
<inp1:Email_Mod_Root xmlns:inp1="http://www.example.org">
   <Email_Mod_Root_Element>
      <Email_Record1>
         <PERSON_NUMBER>123456</PERSON_NUMBER>
         <COUNTRY/>
         <EMAIL_TYPE>WORK</EMAIL_TYPE>
         <EMAIL>EMAIL3</EMAIL>
         <PRIMARY_FLAG>Y</PRIMARY_FLAG>
      </Email_Record1>
</Email_Mod_Root_Element>
</Email_Mod_Root>
Anyone, pls suggest.
Thanks in advance,
SG_SOA

First of all :
<inp1:Email_Mod_Root>
   <Email_Mod_Root_Element>
      <Email_Record1>
         <PERSON_NUMBER>123456</PERSON_NUMBER>
         <COUNTRY/>
          <EMAIL_TYPE>WORK</EMAIL_TYPE>
         <EMAIL>EMAIL3</EMAIL>
         <PRIMARY_FLAG>Y</PRIMARY_FLAG>
      </Email_Record1>
</Email_Mod_Root_Element>
</Email_Mod_Root>
isn't valid xml (you start with inp1: prefix and you end the tag with no prefix, but let's assume you don't want any prefix/namespace at all)
if i use :
[code]
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:inp1="http://www.example.org" exclude-result-prefixes="inp1">
  <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="yes"/>
<xsl:template match="*">
    <xsl:element name="{local-name(.)}">
      <xsl:apply-templates select="@* | node()"/>
    </xsl:element>
  </xsl:template>
  <xsl:template match="@*">
    <xsl:attribute name="{local-name(.)}">
      <xsl:value-of select="."/>
    </xsl:attribute>
  </xsl:template>
</xsl:stylesheet>
[/code]
i get this
[code]
<Email_Root_Element>
  <Email_Record>
  <EMPLID>EMPLID46</EMPLID>
  <EMAIL>EMAIL48</EMAIL>
  <E_ADDR_TYPE>E_ADDR_TYPE49</E_ADDR_TYPE>
  <COUNTRY>US</COUNTRY>
  </Email_Record>
  <Email_Record>
  <EMPLID>EMPLID47</EMPLID>
  <EMAIL>EMAIL49</EMAIL>
  <E_ADDR_TYPE>E_ADDR_TYPE50</E_ADDR_TYPE>
  <COUNTRY>US</COUNTRY>
  </Email_Record>
  <Email_Record>
  <EMPLID>EMPLID48</EMPLID>
  <EMAIL>EMAIL49</EMAIL>
  <E_ADDR_TYPE>E_ADDR_TYPE51</E_ADDR_TYPE>
  <COUNTRY>US</COUNTRY>
  </Email_Record>
</Email_Root_Element>
[/code]

Similar Messages

  • How to remove namespace from xml in ALSB?

    I have a xquery transformation which works for data without namespace. But the data coming from source system has namespace details in it. Is there a way to strip the xml of namespace details from xml before passing it to xquery transformation?

    Hi
    silly mistake :P
    Following 'bold' declaration was not there!!
    Just copy paste following code as xquery and it will be all ok:
    declare namespace xf = "http://tempuri.org/vijfhuizen/com/myMessage/";
    declare function xf:strip-namespace($e as element())
    as element()
    element { xs:QName(local-name($e)) }
    for $child in $e/(@*,node())
    return
    if ($child instance of element())
    then xf:strip-namespace($child)
    else $child
    declare variable $e as element() external;
    xf:strip-namespace($e)

  • How to remove namespace prefix from target payload when using HTTP in PI7.0

    Hi,
    i have a requirement to remove namespace prefix from target payload when receiver receives the payload by an HTTP request.
    i am not able to use XML Anonymizer Bean as in HTTP channel its not possiile.
    Target structure after mapping now is:
    <?xml version="1.0" encoding="UTF-8"?>
    <ns3:Order xmlns:ns3="urn:xxx-com:pi:project">
    fields
    </ns3:Order>
    i need the target structure after mapping should look like:
    <?xml version="1.0" encoding="UTF-8"?>
    <Order xmlns:="urn:xxx-com:pi:project">
    fields
    <Order>
    i removed namespace from source and target Message Type of message mapping but still getting "ns3" prefix. My requirement is to just have this ns3 removed.
    Please reply if anyone has solved this problem before.
    Thanks

    Hi ,
    >>>i removed namespace from source and target Message Type of message mapping but still getting "ns3" prefix. My requirement is to just have this ns3 removed.
    Which process you've used for removing namespace...java/xslt mapping. In case of java mapping plese remove ns3 while creating the target element. Please go through the below blog it may help you.
    Quick Tips: Dealing with Namespaces in XI/PI
    Regards,
    Priyanka

  • How to remove namespaces in mapping when using External Definition

    Hi,
    I read in the blog (/people/sameer.shadab/blog/2005/12/05/how-to-remove-namespaces-in-mapping--xi) that you are able to remove namespaces in mapping by deleting the value from XML Namespace under the Message Type. However, is it possible to do this when you are using External Definition (xsd) ? The blog only describe how to do this if you define a Data Type.

    Hi ,
    No ..it is not possible to remove the namespace once you imported into IR of external defintion.You can remove your namesapce from external definition before importing into IR.
    Sekhar

  • How to remove Unicode from XML file

    I get following error when unmarshal xml:
    [java] org.xml.sax.SAXParseException: An invalid XML character (Unicode: 0x15) was found in the element content of the document.
    Anyone know how to remove Unicode from xml file? Can I remove the unicode by rebuild the file?
    Thanks

    These sort of error usually occur when you're using a different character encoding to read the file than the one you wrote it with. Perhaps if you were to post the problem section of the file and/or the code that created it in the first place.

  • Removing the dummy root element

    Looks like I created a topic that cannot
    be replied to! The topic maintainers will
    have to delete it.
    After looking at the XMLSample code I realized my mistake... oops!
    A quick edit turned off the <root>
    containment. Not sure why it's there in
    the sample in the first place.
    For anyone else who tries this, here's the
    change to remove the dummy root element:
    The new code in XMLSample.java is:
    out.appendChild(result);
    instead of:
    // create a dummy document element for the
    // output document
    Element root = out.createElement("root");
    out.appendChild(root);
    // append the transformed tree to the dummy
    // document element
    root.appendChild(result);
    null

    Hi,
    Please try deleting the xml files corresponding to the dimensions from the backend and try opening the dimension member sheet.
    For deleting the XML file follow the workaround in my reply of the below thread,
    Re: Master data issue in CV
    Hope this helps,
    Regards,
    G.Vijaya Kumar

  • Notebook defekt, how to remove it from PSE13 registration?

    My old notebook is scrap. How to deactivate it for PSE13, to enable registration on the new computer?

    Hi Arpit,
    thanks for your answer. You told me no news, so it was not helpful: I
    asked my question because I could not register - the old machine was
    already the second one...
    Regards - WolfEf
    Am 02.04.2015 um 21:09 schrieb Arpit Kapoor:
    >
          Notebook defekt, how to remove it from PSE13 registration?
    created by Arpit Kapoor <https://forums.adobe.com/people/Arpit+Kapoor>
    in /Photoshop Elements/ - View the full discussion
    <https://forums.adobe.com/message/7400133#7400133>

  • How to remove ICS from my Calendars

    I have click link webcal://www.apple.com/batteries/images/ipod_icalreminder.ics use iphone.How to remove it from my Calendars?

    V.K. wrote:
    You need to disable the root user. From what I understand you enabled it from the install DVD's password reset.
    Use [these instructions|http://docs.info.apple.com/article.html?artnum=106290] to disable it.
    Those instructions led me down this path, I have not the head to deal with them again today. My eyes glaze-over listening to myself read them aloud. SZ
    Message was edited by: ShakuZen

  • HT1386 The first time I synced my iphone with my mac, I didn't realize that all of my photos from iphoto would transfer over to the phone.   Now, I need to remove some, as they are taking up too much space.  I cannot figure out how to remove them from the

    The first time I synced my iphone 4 with my mac, I didn't realize that all of my photos from the iphoto library would transfer over to the phone (more than 3,000).   Now, I need to remove some, as they are taking up too much space.  I cannot figure out how to remove them from the phone.  I tried to uncheck boxes and sync again, but I get a message that there is no room on the iphone.  I've read as many articles as I can find, but still cannot manage this.  Thanks for any help.

    Open itunes, connect iphone, select what you want, sync

  • How to remove pics from my 3GS...???

    How to remove pics from my 3GS..???

    Photos taken with the phone can be deleted by selecting them and hitting the little wastebasket icon in the right bottom corner.
    Photos you did sync to your phone, can only be removed by deselecting them in the photo pane in iTunes, the following sync will remove them from the phone.

  • Does anyone know how to remove images from google

    i had instagram and i didnt upload images of myself but i only used my own image in the display picture and some how it has gone on to the google image search yesterday i deleted my account but when i checked to see if my images do appear in the google images i had some really bad regrets !! i reallywant to know how i can remove pictures off the google image search  even doe this does not kind of relate thank you .

    Does anyone know how to remove vocals from an import from I tunes...a  polyphonic stereo mix ?
    If you are talking about some "Karaoke" method using Logic I'll try to offer one. Before that I must say that most of the Karaoke methods are based on reversing the Phase of one of the stereo channel and bussing or merging the stereo into Mono. The result is: killing all Pan Centered in the mix - like Main Vocal, Bass, Kick, SN ect.
    The artifacts of the Stereo FX of the main vocal will stay in the Karaoke, cause the FX is stereo etc.
    Here is the Logic Setup I can offer to try some Karaoke trick using Logic.
    1. Import a Stereo mix into a Logic Stereo track.
    2. Create another stereo track and duplicate (copy) the Original Mix region to the duplicated track.
    3. Hard Pan L/R both stereo tracks.
    4. Insert an EQ and Gainer plugins into the duplicated track (R).
    5. Set the Output select of the both tracks to a Bus and assign the new Aux Track Switch mode to "Mono".
    6. Open the Gainer plugin and thick the "Phase Invert" Right button.
    7. To keep the "lowend" instruments like the bass and kick, open the EQ plugin and enable the Low Cut filter and try some Hz settings 80-115, or different Q which will sounds better for your Karaoke.
    P.S Click the image below to show its real resolution!
    Regards,
    A.G
    ======================================
    www.audiogrocery.com
    Author of: Logic GUI Deluxe(Free), Vox De Bulgaria s.a.g.e vocal pack for RMX, Logic Snapshot Console, RMX Power CTRL - Logic Environment Midi editor for Stylus etc.
    ======================================

  • How to remove iPhone from a certain computer

    How to remove iPhone from a certain computer along with it's ID to allow another phone to use the comp soley.

    You do not need to do anything.
    Simply stop syncing the iphone to the computer and begin syncing the new iphone to the computer.

  • How to remove Seperator from check-in and profile check in pages

    How to remove Seperator from check-in and profile check in pages
    The seperator is included on the checkin pages, which is present in the std_page with name "std_namevalue_separator", this is called by td_document_checkin_fields and std_document_file_fields.
    Defination of include:
    <@dynamichtml std_namevalue_separator@>
    <$if not isUploadFieldScript$>
    <tr>
         <td width="<$captionFieldWidth$>"><hr /></td>
         <td width="<$captionEntryWidth$>"><hr /></td>
    </tr>
    <$endif$>
    <@end@>
    I have to remove the following include from some of the profile check in page.
    Please suggest if anyone have some idea, how to proceed.
    Thanks,
    Sumit

    791848 wrote:I have to remove the following include from some of the profile check in page.The key here is that you want to do this in some profiles, not all profiles or globally, if I'm reading this right.
    Without writing a component, you can put this code in the "side effects" box in the desired profile(s). This code removes the horizontal rule, and inserts a non breaking space in its place.
    <$setResourceInclude("std_namevalue_separator","<$if not isUploadFieldScript$>
    <tr>
    <td width=\"<$captionFieldWidth$>\"> </td>
    <td width=\"<$captionEntryWidth$>\"> </td>
    </tr>
    <$endif$>")$>YMMV. The non-breaking space may get stripped out in the forum.

  • How to remove text from .swf animation?

    how to remove text from .swf animation? Can no find this text
    in fla file. Flash 8.

    exactly what 'text' are you referring to? text that you typed
    on the Stage using the 'textTool'? simply select the text with the
    'arrowTool' and hit delete.
    If you are referring to a textField that you want to
    eliminate after a certain amount of time, within your animation
    sequence. first copy the text, create a new layer, paste the text
    in place, then where you want to have the text 'disappear' insert a
    'blank keyframe' at that point in the text layer.
    OR place the textfield within a MC and remove it with code.
    OR if the text is dynamic and you wish to use the position at a
    later time, pass a value of null or and empty string to the field
    at the point you wish. And there are other ways still. :) hope one
    of these works for you.

  • How to remove passcode from ipod touch 3g  if power botton is not working?

    how to remove passcode from ipod touch 3g  if power botton is not working?

    Use this program to place the iPod in recovery mode so that you then can restore the iPod via iTunes.
    RecBoot: Easy Way to Put iPhone into Recovery Mode

Maybe you are looking for

  • How can i view the data from Access DB in oracle

    pls tell me that how can i view the data of MS ACCESS DATABASE in ORACLE.i was use ODBC of ACCESS DATABASE AND THEN CREATE DATABASE LINK IN ORACLE BUT NOT YET SUCCEEDED.PLS TELL ME THE PROCEDURE. regard's

  • My new user experience with PP5.5 (not so great)

    I just wrote up a very long post and I seem to have trouble posting it -- "Cannot post now" error, even though I can post in the testing forum. This is a short post to see if it works...

  • Logoff Functionality for ABAP webdynpro in Chrome browser

    Hi Gurus, I am working in ABAP web dynpro. We want to run our WDC on Chrome browser. It works fine but logoff is not working as desired. Though we are able to trigger logoff and close window, upon re-entering URL it does not prompt for authentication

  • Billing please help

    hello gur of SAP i need to update my billing after i ve done it once but the second time wen i want to update it its not giving me the authority to change. its coming in displya mode. so how can i update my price again.

  • MSS - TEAM

    hi    i want MSS->Team related services to be hidden  as   part of  Portal Content .   I have a scenari where , when i click on  MSS role  ,   then in the Detailed Navigation , i  Click on  TEAM   i can get services related to  TEAM  below the Detail