Namespace in XML

Hi all, I am using the Test Tab in message mapping to test the mapping.
Somehow it is required for me to have a namespace prefix for my XML root element, otherwise an error would be thrown.
     <ns0:MDMBusinessPartner xmlns:ns0="http://sap.com/xi/MDEApplicationContent">
I would like to specify a root element without namespace.
For e.g.
      <MDMBusinessPartner>
Where should i make the necessary changes?

You can ignore the namespace in message type editor while creating the message type.
I have ignore and remove the namespace in the message type editor.
So when i click on source in the Message Test Tab, it has becomes
<MDMBusinessPartner>
However i when click execute it still prompts me
Cannot produce target element /HRMD_A07. Check xml instance is valid for source xsd and target-field mapping fulfills requirements of target xsd
any advicE?

Similar Messages

  • Problem using namespace of XML docs gerenrated by  XMLForm

    Hi community!
    I am facing a problem using namespace within a XSL stylsheet. Let me describe my problem:
    I am using the SAP XMLFormsBuilder within the SAP EnterprisePortal in order to provide a HTML based form for creating and editing specific XML documents. The data in the generated documents is finally presented as HTML using XSL Transformation.
    In the XMLFormsBuilder you define the Schema of the XML document and the HTML GUI of the form. The Schema document looks like below (extract):
    <?xml version="1.0" encoding="utf-8"?>
    <schema targetNamespace="http://www.xmlspy.com/schemas/orgchart"
            xmlns="http://www.w3.org/2001/XMLSchema"
            xmlns:xyz="http://www.xmlspy.com/schemas/orgchart" Version="6.3.0">
      <element name="commodity"
               default=""
               minOccurs="1"
               maxOccurs="1"
               ns="p2p"
               xmlns:p2p="http://www.portal.p2p.com">
        <complexType>
          <sequence>
            <element name="administrative_information"
                     default=""
                     minOccurs="1"
                     maxOccurs="1"
                     ns="p2p">
              <complexType>
                <sequence>
                  <element name="creation_date"
                           default=""
                           minOccurs="1"
                           maxOccurs="1"
                           type="date"
                           ns="p2p"/>
    As far as I understand, each element defined in the Schama belongs to the namespace "p2p" and this is exactly what I want.
    The XML document generated by the form looks like below (extract):
    <?xml version="1.0" encoding="UTF-8"?>
    <?xml-stylesheet type="text/xsl" href="show_card.xsl"?>
    <commodity xmlns:xf="http://www.sapportals.com/wcm/app/xmlforms"
               xmlns:xsi="http//www.w3.org/2001/XMLSchema-instance"
               xsi:noNamespaceSchemaLocation="/etc/xmlforms/P2PCategoryCard_TEST/P2PCategoryCard_TEST-Schema.xml">
      <administrative_information>
        <creation_date>2005-07-04</creation_date>
    Consequently, the file "show_card.xsl" is the responsible XSLT stylesheet, which looks like this:
    <?xml version="1.0" encoding="ISO-8859-1"?>
    <xsl:stylesheet version="1.0"
                    xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
                    xmlns:p2p="http://www.portal.p2p.com">
      <xsl:output method="html"/>
      <xsl:template match="p2p:commodity">
        <html>
        <body>
          <h2>XSLT Test</h2>
          Creation Date: <xsl:value-of select="p2p:administrative_information/p2p:creation_date"/>
        </body>
        </html>
      </xsl:template>
    </xsl:stylesheet>
    The problem in the XSLT stylesheet is, that I want to access the XML document elements using their namespace. And this is exactly what does not work for me. On the other hand, if I remove the reference to the namespace:
    <?xml version="1.0" encoding="ISO-8859-1"?>
    <xsl:stylesheet version="1.0"
                    xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
                    xmlns:p2p="http://www.portal.p2p.com">
      <xsl:output method="html"/>
      <xsl:template match="commodity">
        <html>
        <body>
          <h2>XSLT Test</h2>
          Creation Date: <xsl:value-of select="administrative_information/creation_date"/>
        </body>
        </html>
      </xsl:template>
    </xsl:stylesheet>
    the stylesheet works fine, but for some technical reasons, which I don't want to explain here, I have to use the namespace when accessing the XML document elements.
    For technical reasons, I cannot change the format of the Schema document and also cannot change the format of the generated XML document. The only file I can change and control is the XSLT stylsheet.
    My question is now, in the case described above, if there is any way to use the namespace in the sytlesheet when accessing the XML elements?
    Any help is appreciated.
    Cheers,
    Adam Kreuschner

    duggal.ashish wrote:
    3. Some XML files contain a "iso-8859-1" character with character code 146 which appears like apostrophes but actually it is : - &#146; and the problem is that words like can&#146;t are shown as can?t by database.http://en.wikipedia.org/wiki/ISO8859-1
    Scroll down in that page and you'll see that the character code 146 -- which would be 92 in hexadecimal -- is in the "unused" area of ISO8859-1. I don't know where you got the idea that it represents some kind of apostrophe-like character but it doesn't.
    Edit: Actually, I do know where you got that idea. You got it from Windows-1252:
    http://en.wikipedia.org/wiki/Windows-1252
    Not the same charset at all.

  • Remove  Namespace from XML File except Attribute

    Hi  XI  Experts ,
    1.I have referred to the code of xslt Generic XSLT Code to Remove ALL Namespaces from XML:
    http://forums.sdn.sap.com/thread.jspa?threadID=1920630
    But this removes the Attribute : id  from the records .
    My expected output is supposed to be :
    <?xml version="1.0" encoding="GBK"?>
    <body>
      <head>
        <nsrsbh>112001069711</nsrsbh>
        <nsrmc>诺维信(中国)生物技术有限公司出口发票</nsrmc>
        <dcrq>20120209</dcrq>
        <sssq_q>20111201</sssq_q>
        <sssq_z>20120207</sssq_z>
        <records>4</records>
      </head>
      <data>
        <record id="1">
           <fpdm></fpdm>
        </record>
    </data>
    </body
    But after using this XSLT code it removes :id from <record_1 id=> and generated the below code :
    The xml file now doesn't contain teh attribute :id
    <?xml version="1.0" encoding="GBK"?>
    <body>
      <head>
        <nsrsbh>112001069711</nsrsbh>
        <nsrmc>诺维信(中国)生物技术有限公司出口发票</nsrmc>
        <dcrq>20120209</dcrq>
        <sssq_q>20111201</sssq_q>
        <sssq_z>20120207</sssq_z>
        <records>4</records>
      </head>
      <data>
        <record>
          1
          <fpdm></fpdm>          
           </record>
    </data>
    </body>
    Could  you please provide your input
    Plaese note : Here  XI versin iS x1 3.0 SP7 . I have tried suing the Analyzer bean for the Encoing  of Chinese : GBK Intsead of UTF-8 in the Namespace  . But AF_Modules/XMLAnonymizerBean is not comptacible with XI 3.0 SP7
    Hence i have used the following code to remove namespcae and add  Encoding :GBK instead of UTF-8:
    <?xml version="1.0" ?>
    <xsl:stylesheet
    xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
    <xsl:output encoding="GBK"/>
    <xsl:template match="node()|@*">
      <xsl:copy>
       <xsl:apply-templates select="node()|@*"/>
      </xsl:copy>
    </xsl:template>
    </xsl:stylesheet>

    You could use exclude-result-prefixes.
    For example:
    <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:wt="http://www.example.com" exclude-result-prefixes="wt">
    </xsl:stylesheet>

  • Removing namespace from xml

    Hi,
    I have an xml which has some target namespace.
    I need to remove the namespace and the qualifiers and put it on a machine using a file adapter.
    Any help in this regard is highly appreciated.
    With Regards,
    Harsh

    Please go throught the below link
    Removing namespace from xml  created

  • Removing Default Namespaces from XML

    Hi All,
    I am having a situation where I can't remove the default
    namespace from XML mainly
    because there is no namespace prefix.
    I hope this code snipped makes better sense.
    function test():void
    document:XML =
    <test xmlns:soap="
    http://example.com" xmlns="
    http://swanmokshi.com">
    <item>peter</item>
    <item>jenny</item>
    <item>JK Angel</item>
    <test>
    // I can remove the soap namespace by doing the following
    soap:Namespace = document.namespace("soap");
    document.removeNamespace(soap).
    Alert.show(document.toXMLString()); // should now display
    the xml document without the soap namespace
    Note that removing the soap namespace is easy because of the
    first namespace is named "soap". How do
    I removed the unnamed namespace, xmlns="
    http://swanmokshi.com" ?
    regards,
    Arun

    Same problem for me.
    XPath expression failed to execute. Error while processing xpath expression, the expression is "ora:processXSLT("Transformation_2.xsl", bpws:getVariableData("PartyID", "Header"))", the reason is Character reference "&#24" is an invalid XML character.. Please verify the xpath query.
    I am getting the date from Oracle Advanced Queue

  • How to add mulitple namespace in xml

    Hi,
    I have this output xml:
    <?xml version="1.0" encoding="utf-8" ?>
    - <E24B:E24B_Update_MachineCards_001 xmlns:E24B="urn:E24B_UpdateMachineCards_001">
    - <E24B:DataArea>
    - <E24B:UpdateMachineCards>
    - <E24B:Machine>
    - <E24B:Component>
      <f:ComponentSerNo xmlns:f="urn:fields">000000000000000456</f:ComponentSerNo>
      <f:ComponentType xmlns:f="urn:fields">108</f:ComponentType>
      </E24B:Component>
    - <E24B:Market>
      <f:FinalMarket xmlns:f="urn:fields">TR</f:FinalMarket>
      </E24B:Market>
      <f:SalesModel xmlns:f="urn:fields" />
      <f:SerialNo xmlns:f="urn:fields">000000000000000456</f:SerialNo>
    - <s:CntrolArea xmlns:s="urn:segments">
    - <s:Bsr>
      <s:Noun>Machine Card</s:Noun>
      <s:Verb>UPDATE</s:Verb>
      </s:Bsr>
    - <s:DateTime>
      <s:Dt_Qualifier>Creation</s:Dt_Qualifier>
      <s:Dt_Value>20111207</s:Dt_Value>
      <s:TimeZone>7200</s:TimeZone>
    But this content is wrong.
    The expected  content should be as follows:
    <?xml version="1.0" encoding="UTF-8" ?>
    - <E24B:E24B_Update_MachineCards_001 xmlns:E24B="urn:E24B_UpdateMachineCards_001" xmlns:f="urn:fields" xmlns:s="urn:segments"  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    - <s:CntrolArea>
    - <s:Bsr>
      <s:Verb>Update</s:Verb>
      <s:Noun>Machine Card</s:Noun>
    Also xml content need to have multiple namespace. Can you help me please?
    Nurhan

    I used for target external definition and for  prefix (E24B  , f , s, instead of ns0, ns1..) i added module "AF_Modules/XMLAnonymizerBean".
    My source xml from  is
    <?xml version="1.0" encoding="UTF-8"?>
    <ns0:MT_Machine_Update xmlns:ns0="http://xxx.com/MachineUpdate">
       <ControlArea>
          <Bsr>
             <Verb>13</Verb>
             <Noun>32</Noun>
          </Bsr>
          <Sender>
             <LogicalId>34124</LogicalId>
             <ReferenceId>124</ReferenceId>
          </Sender>
          <DateTime>
             <Dt_Qualifier>42</Dt_Qualifier>
             <Dt_Value>214</Dt_Value>
             <TimeZone>14</TimeZone>
          </DateTime>
       </ControlArea>
       <DataArea>
          <UpdateMachineCards>
             <CompanyCode>4325</CompanyCode>
             <CompanyName>325</CompanyName>
             <ManufacturerCode>352</ManufacturerCode>
             <ManufacturerName>53</ManufacturerName>
             <Machine>
                <SalesModel>24</SalesModel>
                <SerialNo>352</SerialNo>
                <EnvironmentCode>53</EnvironmentCode>
                <Market>
                   <FinalMarket>24</FinalMarket>
                   <NewCompanyCode></NewCompanyCode>
                </Market>
                <Component>
                   <ComponentType>23</ComponentType>
                   <PartNo>35</PartNo>
                   <Model>35</Model>
                   <ComponentSerNo>352</ComponentSerNo>
                </Component>
             </Machine>
          </UpdateMachineCards>
       </DataArea>
    </ns0:MT_Machine_Update>
    The output should be as follows:
    <?xml version="1.0" encoding="UTF-8" ?>
    - <E24B:E24B_Update_MachineCards_001 xmlns:E24B="urn:E24B_UpdateMachineCards_001" xmlns:f="urn:fields" xmlns:s="urn:segments" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    - <s:CntrolArea>
    - <s:Bsr>
      <s:Verb>Update</s:Verb>
      <s:Noun>Machine Card</s:Noun>
      </s:Bsr>
    - <s:Sender>
      <s:LogicalId>CWL</s:LogicalId>
      <s:ReferenceId>2006-03-21T12:26:33</s:ReferenceId>
      </s:Sender>
    - <s:DateTime>
      <s:Dt_Qualifier>Creation</s:Dt_Qualifier>
      <s:Dt_Value>2006-03-24T14:29:46</s:Dt_Value>
      <s:TimeZone>+02:00</s:TimeZone>
      </s:DateTime>
      </s:CntrolArea>
    - <E24B:DataArea>
    - <E24B:UpdateMachineCards>
      <f:CompanyCode>428003</f:CompanyCode>
      <f:CompanyName>VOLVO ÉPÍTÕGÉPEK HUNGÁRIA KERESKEDELMI KFT.</f:CompanyName>
      <f:ManufacturerCode>CWL</f:ManufacturerCode>
      <f:ManufacturerName>VOLVO COMPACT W</f:ManufacturerName>
    - <E24B:Machine>
      <f:SalesModel>L45</f:SalesModel>
      <f:SerialNo>19521</f:SerialNo>
      <f:CurrentDate>20060323</f:CurrentDate>
    - <E24B:Market>
      <f:FinalMarket>HU</f:FinalMarket>
      </E24B:Market>
    - <E24B:Component>
      <f:ComponentType>17</f:ComponentType>
      <f:PartNo>11305947</f:PartNo>
      <f:ComponentSerNo>G070910121</f:ComponentSerNo>
      </E24B:Component>
    - <E24B:Component>
      <f:ComponentType>66</f:ComponentType>
      <f:PartNo>2814557</f:PartNo>
      <f:ComponentSerNo>100710021</f:ComponentSerNo>
      </E24B:Component>
      </E24B:Machine>
      </E24B:UpdateMachineCards>
      </E24B:DataArea>
      </E24B:E24B_Update_MachineCards_001>
    Thanks for your help

  • Namespace in XML Payload for HTTP Sender

    Hello,
    I have just configured my snychronous HTTP <--> RFC Scenario. When I want to test it with some XML payload in the HTTP testing tool I get a mapping runtime exception.
    After some investigation using the test tab in the message mapping I realized that missing namespace in the XML payload caused the error. I tried to add manually a namespace to the XML and then it worked
    This is very strange I though that the namespace of the sender interface is automatically added to the XML payload?
    Do you have any information on this?

    Hi,
    U need to copy the payload from Message mapping test message tab and use that payload.
    or u can use the HTTP test client for testing the same.
    sample HTML code to create HTTP Client:
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/66dadc6e-0a01-0010-9ea9-bb6d8ca48cc8
    You can also use the Wfetch application by Microsift for the same..
    download the same from below link
    http://www.iisfaq.com/Default.aspx?tabid=2975
    Thnx
    Chirag

  • XML namespace in xml converted pdf

    Hello everyone
    I have a problem when converting pdf's in xml. Everytime when I convert a PDF(either with Acrobat or with mailing the file as XML) in XML the date fields always in middle shows the xml namespace xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" . We are using these xml's to transfer data to an accounting software but the software recognizes the xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" as an error and because of that the data couldn't be uploaded. We created the PDF using a xsd scheme made in the accounting software. Is there a way to get rid of xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" showing in the date fields.
    I appreciate every possible help

    Hi,
    It sounds like you have the nillable="true" attribute in you XSD for the date field.
    If you XSD looks like;
    <xs:element name="Date1" type="xs:date" nillable="true"/>
    Then you will get the following when the field Date1 is bound to is left blank.
    <Date1 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true"/>
    This is the correct behaviour, so I am either not understanding the problem or there is a bug in the accounting software you are using.
    Maybe you could try replacing the nullable="true" with a minOccurs="0".  This will mean the element will not appear in the XML at all.
    Regards
    Bruce

  • Inserting Namespace in XML document using 4.6C(no XLST)

    Hi all,
    I'm writing a program in which I need to convert data into XML, all this works fine using CL_XML_DOCUMENT.Create_With_Data. I was also able to insert the encoding as asked by the EAI tool who will interpret the XML file I have generated. Now they have returned to me, saying they also need the <b>following</b> tag:
    <FILE>
            <b><asx:abap xmlns:asx="http://www.sap.com/abapxml" version="1.0">
                    <asx:values></b>                        <CONTROL>
                            </CONTROL>
                            <DNB>
                            </DNB>
    <b>               </asx:values>
            </asx:abap></b></FILE>
    I have read about this on SDN and found several posts in which people using 4.7(CALL TRANSFORMATION) are asking to get rid of that tag, but not how to insert it without the use of XSLT.
    I have already tried the following:
      call method l_dom->set_attribute(
      name = 'xmlns:asx'
      value = 'http://www.sap.com/abapxml version=1.0' ).
    This however is not giving the expected result, if someone can help me with this, I would be very gratefull.
    In the meantime I continue trying.
    Thanks in advance

    hi, before you set the attribute, you need to create a Namespace element preliminary.
    Try the following code:
    ELEMENT = DOCUMENT->CREATE_SIMPLE_ELEMENT_NS(
    NAME = 'abap'
    PREFIX = 'asx'
    PARENT = DOCUMENT ).
    ATTRIBUTE = DOCUMENT->create_namespace_decl(
    NAME = 'XMLNS'
    PREFIX = 'asx'
    URI = 'http://www.sap.com/abapxml').
    ELEMENT->SET_ATTRIBUTE_NODE_NS(
    NEW_ATTR = ATTRIBUTE).
    Hope my reply will be useful.
    thanks

  • How to add document name and document namespace to xml mail sender msg

    Hi,
    I have set up a sender mail CC that accepts messages already in XML format. However, the messages are missing the document name and document namespace. I am trying to use MessageTransformBean to add these to the message payload. However the examples I've found so far all talk about converting plain text coming in. When I used convertionTpe -> SimplePlain2XML it messed up the original content with unnecessary xml tags.
    Can someone please tell me how to insert the document name and namespace into the payload without converting the original xml content? Thanks in advance.

    Dont think there is a way.
    As the source is a XML, why dont you create the MessageType with the same name and namespace as the XML file in the email.
    Regards,
    Bhavesh

  • How to remove element namespaces in XML file using DOM or SAX?

    Hi Guys,
    I developed a JAVA mapping in XI to add name spaces for XML file, after mapping,name spaces xmlns="http://www.mro.com/mx/integration" and xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" were added correctly, but for some nodes, such as <Header> and <Content>, a name space xmlns="" was added automatically.Please check below files to compare.
    It looks like be added automatically by XI. I didn't process anything for these nodes in JAVA program.
    Now the issue is, how can I remove these redundant namespaces? Such as xmlns="".
    Can I remove them using DOM or SAX in JAVA Mapping?
    Thanks in advance.
    ====>Original XML file
    <?xml version="1.0" encoding="UTF-8"?>
    <LLYLPPInterface language="EN">
       <Header>
          <SenderID>GBIP</SenderID>
          <CreationDateTime>2008-02-13T22:49:34-05:00</CreationDateTime>
          <RecipientID/>
          <MessageID/>
       </Header>
       <Content>
          <LLY-LPP>
             <INVOICE>
                <INVOICELINE>
                   <PONUM>4780000008</PONUM>
                   <POLINENUM>1</POLINENUM>
                   <INVOICEQTY>1</INVOICEQTY>
                   <LOADEDCOST>68</LOADEDCOST>
                </INVOICELINE>
             </INVOICE>
          </LLY-LPP>
       </Content>
    </LLYLPPInterface>
    ===>Target XML file after JAVA mapping
    <?xml version="1.0" encoding="utf-8"?>
    <LLYLPPInterface language="EN" xmlns="http://www.mro.com/mx/integration" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
         <Header xmlns="">
              <SenderID>GBIP</SenderID>
              <CreationDateTime>2008-02-13T23:11:55-05:00</CreationDateTime>
              <RecipientID/>
              <MessageID/>
         </Header>
         <Content xmlns="">
              <LLY-LPP>
                   <INVOICE>
                        <INVOICELINE>
                             <PONUM>4780000008</PONUM>
                             <POLINENUM>0</POLINENUM>
                             <INVOICEQTY>1</INVOICEQTY>
                             <LOADEDCOST>68</LOADEDCOST>
                        </INVOICELINE>
                   </INVOICE>
              </LLY-LPP>
         </Content>
    </LLYLPPInterface>
    Edited by: Eddie Zhang on Feb 14, 2008 9:22 AM
    Edited by: Eddie Zhang on Feb 14, 2008 9:24 AM

    Hi Milan,
    Thanks for your replay.
    Actually when I used module XMLAnonymizerBean to convert namespaces, the header of XML, such as <?xml version="1.0" encoding="UTF-8"?> was converted to format <?xml version='1.0' encoding='UTF-8'?>, quote was converted to single quote. Although I set parameter anonymizer.quote = ", it still didn't work, single quote appeared instead of quote.
    I'm not sure why this happened. Can anyone help to clarify this?
    Thanks
    Edited by: Eddie Zhang on Feb 15, 2008 2:11 AM

  • How to remove prefix namespace in Xml from XmlBean

    I am trying to generate XML from XML Bean but i am getting namespace prefix in all my xml elements.
    For example
    <abc:Cutomer xmlns:abc="http://www.xyz.com/pqr>
    <abc:Name>
    I don't have this namespace prefix in my XSD (imported in Weblogic workshop).
    Is there any way that I can remove this prefix from my xml elements?
    Also, I don't need xml namespace in my xml string.
    Is there any way that I can generate xml without having namespace?

    Hello ,
    I think this issue as been discussed earlier in this forum. Refer follwoing link..
    http://forums.bea.com/bea/message.jspa?messageID=400000090#400000090
    Regards,
    Kuldeep Singh.

  • Adding namespace to XML output

    Hi,
    I have a requirement to generate a XML document for columns in the table. I am using DBMS_XMLgen.getXML inside my procedure to get the XML document.
    The output which i get after executing my procedure is:
    <?xml version="1.0"?>
    <EMP>
    <EMPLOYEE_NO>000017</EMPLOYEE_NO>
    <EMPLOYEE_STATUS>ACTIVE</EMPLOYEE_STATUS>
    <NAME_LAST>Mini</NAME_LAST>
    <NAME_FIRST/>
    </EMP>
    But I also need namespace prefix and namespace uri in this xml output. Is there a way to add namespace prefix and namespace uri to this xml output.
    So what i need is something like below one:
    <?xml version="1.0"?>
    <xs:EMP>xmlns:out="http://xmlns:out="http:/example.org/ver1.0/ThisISTest#">
    <xs:EMPLOYEE_NO>000017</xs:EMPLOYEE_NO>
    <xs:EMPLOYEE_STATUS>ACTIVE</xs:EMPLOYEE_STATUS>
    <xs:NAME_LAST>Mini</xs:NAME_LAST>
    <xs:NAME_FIRST/>
    </xs:EMP>
    Any solutions or sample code on this would be of great help.
    Thanks in Advance.

    Hi,
    IMO, the best option is to use an XSL transformation "on the fly" with DBMS_XMLGEN.
    Here's a stylesheet that should work (change namespace and prefix to yours) :
    <?xml version="1.0"?>
    <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:ns0="http://test">
    <xsl:template match="*">
    <xsl:element name="ns0:{local-name()}">
      <xsl:apply-templates/>
    </xsl:element>
    </xsl:template>
    </xsl:stylesheet>Right now, I only have a 10gR1 at my disposal and the transformation doesn't give expected results (there are a few known issues with XSLT on 10g).
    However, I could test it with an external processor (saxon9he) and it should work OK in 11g too.
    So, in your procedure, all you have to do is declare the XSLT document :
    xsldoc    xmltype := xmltype(
    '<?xml version="1.0"?>
    <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:ns0="http://test">
    <xsl:template match="*">
    <xsl:element name="ns0:{local-name()}">
      <xsl:apply-templates/>
    </xsl:element>
    </xsl:template>
    </xsl:stylesheet>'
    );and bind the stylesheet to the context :
    DBMS_XMLGEN.setrowsettag (messagehandle_xml, 'EMP');
    DBMS_XMLGEN.setrowtag (messagehandle_xml, NULL);
    DBMS_XMLGEN.setmaxrows (messagehandle_xml, 2);
    DBMS_XMLGEN.setNullHandling(messagehandle_xml, DBMS_XMLGEN.EMPTY_TAG);
    DBMS_XMLGEN.setXSLT(messagehandle_xml, xsldoc); -- < here
    ...Let me know if it works :)

  • Adding namespace in XML

    Hi,
    I have created an xml by using XMLTYPE( oracle object ). Now I want to add a namespace to the existing root node. How can I achieve this?
    Currently
    <RESPONSE>
    <TAG1>jack</TAG1>
    <TAG2>mon<TAG2>
    </RESPONSE>
    Desired ouput
    <RESPONSE xmns=''http://aloha.com">
    <TAG1>jack</TAG1>
    <TAG2>mon<TAG2>
    </RESPONSE>
    Thanks,
    VJ

    SELECT insertchildxml(XMLTYPE('<RESPONSE>
    <TAG1>jack</TAG1>
    <TAG2>mon</TAG2>
    </RESPONSE>'),
                          '/RESPONSE',
                          '@xmlns',
                          'http://aloha.com')
      FROM dual;Produces
    <RESPONSE xmlns="http://aloha.com"><TAG1>jack</TAG1><TAG2>mon</TAG2></RESPONSE>

  • Problem due to Namespace in XML

    Hi,
    From XI (Outbound proxy from R/3), using an XML package I am calling a webservice of a 3rd party system to create a contract. The webservice is failing. The 3rd party system is saying that it is failing becuase of the additonal lines in XML (like namespace details and hypens in the XML). Please see the below XML message that is displayed in Payload in SXMB_MONI.
    <?xml version="1.0" encoding="UTF-8" ?>
    <b>-</b> <<b>ns0:MT_SM_Contract xmlns:ns0="http://test.com/xi/sm"></b>
    <b>-</b> <CONTRACTS>
    <b>-</b> <Control>
      <createdWhen>2006-06-09T06:09:52</createdWhen>
      <destinationAddress />
      <documentGUID>495f31bc-9f99-4e56-9db7-ce5dc7095785</documentGUID>
      <operation staticValue="Change" />
      <schemaVersion>31N</schemaVersion>
      <sourceAddress>Global</sourceAddress>
      <version>3.00</version>
      </Control>
    Is it possible to remove the namespace details and Hypens in XI before calling the Webservice.
    Thanks
    Sri

    Kumar,
    While defining MT, delete the name space that is automatically read in XML NameSpace field.
    Go to Q no 12 in the following link:
    /people/michal.krawczyk2/blog/2005/06/28/xipi-faq-frequently-asked-questions
    -Naveen.

Maybe you are looking for

  • Wifi problems still exists?

    I sold my gs60 that had an 870m back in january mainly because i couldnt bare the wifi problem. I really loved the laptop and everything about it but everytime my laptop overheated the wifi would drop from 100mb to 1mb or less at times, monday im thi

  • URGENT HELP REQUIRED: HP PRINTER ONLY WORKING IN BLACK AND WHITE

    Hi - really hoping somone can help..!  Just updated all three Macs to new OSX Mavericks and now both HP printers 940c and 5510c both only print in black and white.  Need to get them working in colour for my daughters school homework!! Have seen all t

  • Strange problem renders MBP Useless / Wont Turn On..

    About two weeks ago, Apple Update installed some updates to my MBP when I shut it down. I left it updating and when I returned the computer screen was black and the standby light which normally fades in and out was just solid white. I searched the in

  • How to send existing excel file through mail

    Hello Friends, I have to send mail with Excel File attachement. i have already exist Excel file and that file i hv to send through mail. so pl help me out for sending existing excel file . i.e. user pickup the exist excel file and that file would be

  • Web Photo album file problem

    I have Dreamweaver 8 and am trying to create a photo album with  Web Photo Album 2.2 but when I try to add a folder of pictures to create an album I get a message of:  No Items Match Your Search.   I know there are .jpg files in the folder.   I have