users@jaxb.java.net

Re: Duplicated namespace declaration from output xml

From: Son Nguyen <sontrang91_at_gmail.com>
Date: Mon, 20 Oct 2008 11:13:40 -0700 (PDT)

Here is a partial information of my xsd for the address type:

<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
 xmlns:SIDBusCm="http://www.tmforum.org/NGOSS/SID/Business/7.0/Common"
 xmlns:SIDBusCu="http://www.tmforum.org/NGOSS/SID/Business/7.0/Customer">
   <xs:import
namespace="http://www.tmforum.org/NGOSS/SID/Business/7.0/Customer"
schemaLocation="SIDBusinessViewCustomer.xsd"/>
   <xs:import
namespace="http://www.tmforum.org/NGOSS/SID/Business/7.0/Common"
schemaLocation="SIDBusinessViewCommon.xsd"/>
     
 
   <xs:complexType name="InitiateAddress">
      <xs:complexContent>
         <xs:extension base="SIDBusCm:GeographicAddress">
            <xs:sequence>
               <xs:element name="locality" type="xs:anySimpleType"
minOccurs="0"/>
               <xs:element name="postcode" type="xs:anySimpleType"
minOccurs="0"/>
               <xs:element name="geoText1" type="xs:anySimpleType"
minOccurs="0"/>
               <xs:element name="GeoCode1" type="xs:anySimpleType"
minOccurs="0"/>
               <xs:element name="GeoCode2" type="xs:anySimpleType"
minOccurs="0"/>
               <xs:element name="addressLine"
type="SIDBusCm:CompoundLocalAddress" minOccurs="0" maxOccurs="unbounded"/>
            </xs:sequence>
         </xs:extension>
      </xs:complexContent>
   </xs:complexType>
           
</xs:schema>

Thanks,



Son Nguyen wrote:
>
> Hi,
> I have this problem when I use jaxb to create output xml. My output xml
> looks like this:
>
> <data>
> <instanceData>
> <individual>
> <homeAddress>
> <LocalAddress xsi:type="ns3:CompoundLocalAddress"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> xmlns:ns3="http://www.tmforum.org/NGOSS/SID/Business/7.0/Common">
> <positionNr xsi:type="xs:int"
> xmlns:xs="http://www.w3.org/2001/XMLSchema">1</positionNr>
> <fullAddress xsi:type="xs:string"
> xmlns:xs="http://www.w3.org/2001/XMLSchema">7783 SOUTH 73 RD
> STREET</fullAddress>
> </LocalAddress>
> <LocalAddress xsi:type="ns3:CompoundLocalAddress"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> xmlns:ns3="http://www.tmforum.org/NGOSS/SID/Business/7.0/Common">
> <positionNr xsi:type="xs:int"
> xmlns:xs="http://www.w3.org/2001/XMLSchema">2</positionNr>
> <fullAddress xsi:type="xs:string"
> xmlns:xs="http://www.w3.org/2001/XMLSchema"></fullAddress>
> </LocalAddress>
> </homeAddress>
> </individual>
> </instanceData>
> </data>
>
> There are duplicate namespace declaration on the output. How can I set it
> to be delcared only one time?
>
> Thanks,
>

-- 
View this message in context: http://www.nabble.com/Duplicated-namespace-declaration-from-output-xml-tp20069914p20075599.html
Sent from the java.net - jaxb users mailing list archive at Nabble.com.