[xsd-users] multiple namespace prefix problem

Hing Liu hing.liu at gmail.com
Sun Jul 2 05:36:20 EDT 2017


Hi Expert,

I got a multiple namespace (due to xsd definition are in two different
namespaces) and I can only remove one of the "prefix" through the use of:

xml_schema::namespace_infomap map;

like this:

map[""].name = "http://www.ird.gov.hk/AEOI/crs/v1";

However, some classes are located in "
http://www.ird.gov.hk/AEOI/aeoitypes/v1" and result the following:

<Address legalAddressType="OECD301"
xmlns:*p1*=*"http://www.ird.gov.hk/AEOI/aeoitypes/v1
<http://www.ird.gov.hk/AEOI/aeoitypes/v1>*">
              <*p1*:CountryCode>AF</p1:CountryCode>
              <*p1*:AddressFree>
                <*p1*:Line>Line1</p1:Line>
                <*p1*:Line>Line2</p1:Line>
                <*p1*:Line>Line3</p1:Line>
              </*p1*:AddressFree>
            </Address>

I want to remove the "p1" and make it appear like:

<Address legalAddressType="OECD301">
              <CountryCode xmlns="*http://www.ird.gov.hk/AEOI/aeoitypes/v1
<http://www.ird.gov.hk/AEOI/aeoitypes/v1>*">AF</CountryCode>
              <AddressFree xmlns="*http://www.ird.gov.hk/AEOI/aeoitypes/v1
<http://www.ird.gov.hk/AEOI/aeoitypes/v1>*">
                <Line>Line1</Line>
                <Line>Line2</Line>
                <Line>Line3</Line>
              </AddressFree>
            </Address>

How can I remove the prefix "p1"?

Thanks,
Hing


More information about the xsd-users mailing list