IBM webMethods Hybrid Integration

IBM webMethods Hybrid Integration

Join this online group to communicate across IBM product users and experts by sharing advice and best practices with peers and staying up to date regarding product enhancements.

 View Only
  • 1.  How to remove Prefix from XSD to DocumentType

    Posted Sat January 23, 2010 04:10 AM

    Hi all,

    I have an XSD. Its sample namespace is.

    When I create a document type from this XSD. The document type values are containing bb in front of each field. But I want to generate an XML which do not contain bb in front of the fields.

    Now it is this way,

    bb:name
    bb:age
    bb:location

    But I want an xml which has

    name
    age
    location

    Can you please suggest how to remove namespace. I do not want to change the XSD.

    Please help.


    #webMethods
    #Integration-Server-and-ESB
    #Flow-and-Java-services


  • 2.  RE: How to remove Prefix from XSD to DocumentType

    Posted Sat January 23, 2010 12:31 PM

    Hi David

    I don’t think you can remove the namespace prefix without changing the XSD. The namespace prefix is a part of the element name now. For example:
    “bbb:Customer” is not the same as “Customer”, as these two elements may belong to difference namespaces.
    You can try to change the element names manually in Developer, but I am not sure if this will work. Another workaround you can use is to define your own data format (canonical or internal), and then map the XSD format into this before doing any further mapping/transformations.

    Regards,

    Hido


    #webMethods
    #Integration-Server-and-ESB
    #Flow-and-Java-services


  • 3.  RE: How to remove Prefix from XSD to DocumentType

    Posted Sun January 24, 2010 02:25 PM

    It can be done by using elementFormDefault=“unqualified” in the schema definition but this would require updating the XSD.

    <schema xmlns=“XML Schema
    xmlns:bb=“http://www.xxxxxx
    targetNamespace=“http://www.xxxxxxelementFormDefault=“unqualified”>


    #webMethods
    #Flow-and-Java-services
    #Integration-Server-and-ESB


  • 4.  RE: How to remove Prefix from XSD to DocumentType

    Posted Sat January 30, 2010 09:24 AM

    Yup, that would be the easiest way of doing it if your XSD only contains one name space. However this will not work if your XSD refers to, or imports, elements from another schema which are defined by a namespace prefix.


    #webMethods
    #Flow-and-Java-services
    #Integration-Server-and-ESB


  • 5.  RE: How to remove Prefix from XSD to DocumentType

    Posted Thu March 25, 2010 09:20 PM

    I had to remove xmlns:bb=“http://www.xxxxxx
    targetNamespace="http://www.xxxxxx to get this loaded right interestingly

    RK


    #Flow-and-Java-services
    #webMethods
    #Integration-Server-and-ESB


  • 6.  RE: How to remove Prefix from XSD to DocumentType

    Posted Wed March 31, 2010 07:05 PM

    convert your document to XML values by using documentToXMLValues, next call transformer service pub.string.replace and map the xml values to inString search for bb: replace with just leave it blank next map the output value back to xml values and XMLValuesToDocument buildin service.

    HTH


    #webMethods
    #Flow-and-Java-services
    #Integration-Server-and-ESB


  • 7.  RE: How to remove Prefix from XSD to DocumentType

    Posted Mon September 27, 2010 10:55 AM

    Thank you for this post it is work in my environment

    Bye


    #Integration-Server-and-ESB
    #Flow-and-Java-services
    #webMethods


  • 8.  RE: How to remove Prefix from XSD to DocumentType

    Posted Thu August 25, 2011 04:09 PM

    You need to do this for all imported schemas as well.
    Thanks for the tip.


    #webMethods
    #Flow-and-Java-services
    #Integration-Server-and-ESB