Skip to Content
0
Former Member
Oct 28, 2008 at 05:45 PM

Extra namespace declerations at nodes

20 Views

Hi all

I want to get rid of the namespace declerations at node levels , My file is liek this

<?xml version="1.0" encoding="utf-8"?>

http://rep.oio.dk/ubl/xml/schemas/0p71/maindoc/" xmlns:com=" http://rep.oio.dk/ubl/xml/schemas/0p71/common/" xmlns=" http://rep.oio.dk/ubl/xml/schemas/0p71/pie/">

http://rep.oio.dk/ubl/xml/schemas/0p71/common/" schemeID="N/A">0018000562

2008-10-02http:// 2008-10-02" target="_blank">rep.oio.dk/ubl/xml/schemas/0p71/common/">2008-10-02>

PIEhttp:// PIE" target="_blank">rep.oio.dk/ubl/xml/schemas/0p71/common/">PIE>

USDhttp:// USD" target="_blank">rep.oio.dk/ubl/xml/schemas/0p71/maindoc/">USD>

http://rep.oio.dk/ubl/xml/schemas/0p71/common/" schemeID="EAN">5790001330217

http://rep.oio.dk/ubl/xml/schemas/0p71/common/">

<com:BuyersOrderID>sdfsdfsd</com:BuyersOrderID>

<com:IssueDate>2008-09-30</com:IssueDate>

</com:ReferencedOrder>

http://rep.oio.dk/ubl/xml/schemas/0p71/common/">

<com:ID schemeID="EAN">5790001330217</com:ID>

<com:PartyName>

<com:Name>Fred the sold to party</com:Name>

</com:PartyName>

<com:BuyerContact>

<com:ID>contact person from ARLA</com:ID>

<com:Name>contact person from ARLA</com:Name>

</com:BuyerContact>

</com:BuyerParty>

http://rep.oio.dk/ubl/xml/schemas/0p71/common/">

<com:ID schemeID="EAN">5790001330217</com:ID>

<com:PartyName>

<com:Name>Fred the sold to party</com:Name>

</com:PartyName>

<com:Contact>

<com:ID>ARLA contact person</com:ID>

<com:Name>ARLA contact person</com:Name>

</com:Contact>

<com:Address>

<com:ID>Levering</com:ID>

<com:Street>14 Easy street</com:Street>

<com:CityName>north Andover</com:CityName>

<com:PostalZone>0184500</com:PostalZone>

<com:Country>

<com:Code>NL</com:Code>

</com:Country>

</com:Address>

</com:DestinationParty>

http://rep.oio.dk/ubl/xml/schemas/0p71/common/">

<com:ID schemeID="EAN">Vendor's EAN number not implemented</com:ID>

<com:PartyName>

<com:Name>APV SYSTEMS US COMMERCIAL</com:Name>

</com:PartyName>

<com:PartyTaxScheme>

<com:CompanyTaxID schemeID="CVR">24730018</com:CompanyTaxID>

</com:PartyTaxScheme>

</com:SellerParty>

http://rep.oio.dk/ubl/xml/schemas/0p71/common/">

<com:TaxTypeCode>VAT</com:TaxTypeCode>

<com:TaxAmounts>

<com:TaxableAmount currencyID="USD">101.53</com:TaxableAmount>

<com:TaxAmount currencyID="DKK">60.00</com:TaxAmount>

</com:TaxAmounts>

<com:CategoryTotal>

<com:RateCategoryCodeID>VAT</com:RateCategoryCodeID>

<com:RatePercentNumeric>25</com:RatePercentNumeric>

<com:TaxAmounts>

<com:TaxableAmount currencyID="USD">101.53</com:TaxableAmount>

<com:TaxAmount currencyID="DKK">60.00</com:TaxAmount>

</com:TaxAmounts>

</com:CategoryTotal>

</com:TaxTotal>

http://rep.oio.dk/ubl/xml/schemas/0p71/common/">

<com:LineExtensionTotalAmount currencyID="USD">101.53</com:LineExtensionTotalAmount>

<com:ToBePaidTotalAmount currencyID="USD">101.53</com:ToBePaidTotalAmount>

</com:LegalTotals>

http://rep.oio.dk/ubl/xml/schemas/0p71/common/">

<com:ID>000010</com:ID>

<com:InvoicedQuantity unitCode="ST" unitCodeListAgencyID="n/a">1.000</com:InvoicedQuantity>

<com:LineExtensionAmount currencyID="DKK">1000.00</com:LineExtensionAmount>

<com:Item>

<com:ID schemeID="n/a">DS1234</com:ID>

<com:Description>Test material for STO</com:Description>

<com:BasePrice>

<com:PriceAmount currencyID="DKK">1000.00</com:PriceAmount>

</com:BasePrice>

</com:Item>

<com:BasePrice>

<com:PriceAmount currencyID="DKK">1000.00</com:PriceAmount>

<com:BaseQuantity unitCode="ST" unitCodeListAgencyID="n/a">1.000</com:BaseQuantity>

</com:BasePrice>

</com:InvoiceLine>

</Invoice>

You could notice that some nodes are with namespace decleration

" http://rep.oio.dk/ubl/xml/schemas/0p71/common/">"

I would like it to be just as

<com:InvoiceLine>

Any quick tricks ? I got response son this to write an XSLT constructing the whole message with out extra namespace declerations. Hoping for any tricks to get rid of this extra namespace deleration.

Thank you