OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

ubl-dev message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]


Subject: UBL schema validation



Hi,

Ive tried to compose an Invoice document but in order to make schema 
validation works I have to specified all the namespaces prefixs for each 
element and all the namespaces definition and schema locations. As you 
can see in the attached document its a kind of crazy ...

Is it the only way to make it work? Please, could someone send me an 
UBL1.0 Invoice sample?

Thanks in advance,
Jorge

P.S: Im using Xerces 2-6-2 for schema validation.
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>

<ubl:Invoice
	xmlns="urn:oasis:names:specification:ubl:schema:xsd:Invoice-1.0"
	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
	xmlns:ubl="urn:oasis:names:specification:ubl:schema:xsd:Invoice-1.0"
	xmlns:ccts="urn:oasis:names:specification:ubl:schema:xsd:CoreComponentParameters-1.0"
	xmlns:cbc="urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-1.0"
	xmlns:cac="urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-1.0"
	xmlns:udt="urn:oasis:names:specification:ubl:schema:xsd:UnspecializedDatatypes-1.0"
	xmlns:sdt="urn:oasis:names:specification:ubl:schema:xsd:SpecializedDatatypes-1.0"
	xmlns:cur="urn:oasis:names:specification:ubl:schema:xsd:CurrencyCode-1.0"
	xsi:schemaLocation="urn:oasis:names:specification:ubl:schema:xsd:Invoice-1.0 UBL-Invoice-1.0.xsd
	urn:oasis:names:specification:ubl:schema:xsd:CoreComponentParameters-1.0 ../common/UBL-CoreComponentParameters-1.0.xsd
	urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-1.0 ../common/UBL-CommonBasicComponents-1.0.xsd
	urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-1.0 ../common/UBL-CommonAggregateComponents-1.0.xsd
	urn:oasis:names:specification:ubl:schema:xsd:UnspecializedDatatypes-1.0 ../common/UBL-UnspecializedDatatypes-1.0.xsd
	urn:oasis:names:specification:ubl:schema:xsd:SpecializedDatatypes-1.0 ../common/UBL-SpecializedDatatypes-1.0.xsd
	urn:oasis:names:specification:ubl:schema:xsd:CurrencyCode-1.0 ../codelist/UBL-CodeList-CurrencyCode-1.0.xsd 
	">

  <ubl:ID>567899/89913123</ubl:ID>
  <ubl:GUID>2</ubl:GUID>
  <cbc:IssueDate>2004-10-12</cbc:IssueDate>
  <ubl:InvoiceTypeCode>OR</ubl:InvoiceTypeCode>
  <ubl:InvoiceCurrencyCode>EUR</ubl:InvoiceCurrencyCode>
  <ubl:PricingCurrencyCode>EUR</ubl:PricingCurrencyCode>

  <cac:OrderReference>
    <cac:BuyersID>Referencia CS</cac:BuyersID>
    <cac:SellersID>Referencia EA</cac:SellersID>
    <cac:GUID>CAS/01011/1/5</cac:GUID>
  </cac:OrderReference>

  <ubl:AdditionalDocumentReference>
    <cac:ID>1</cac:ID>
    <cac:GUID>1</cac:GUID>
  </ubl:AdditionalDocumentReference>

  <cac:BuyerParty>
    <cac:AdditionalAccountID>M0031</cac:AdditionalAccountID>
    <cac:Party>
      <cac:PartyIdentification>
        <cac:ID>A012345678</cac:ID>
      </cac:PartyIdentification>
      <cac:PartyName>
        <cbc:Name>Entidad 2</cbc:Name>
      </cac:PartyName>
    </cac:Party>
  </cac:BuyerParty>

  <cac:SellerParty>
    <cac:AdditionalAccountID>280014</cac:AdditionalAccountID>
    <cac:Party>
      <cac:PartyIdentification>
        <cac:ID>R876543210</cac:ID>
      </cac:PartyIdentification>
      <cac:PartyName>
        <cbc:Name>Entidad 1</cbc:Name>
      </cac:PartyName>
      <cac:Address>
        <cbc:StreetName>Paseo de la Castellana</cbc:StreetName>
        <cbc:BuildingNumber>261</cbc:BuildingNumber>
        <cbc:CityName>Madrid</cbc:CityName>
        <cbc:PostalZone>28046</cbc:PostalZone>
        <cbc:Region>28</cbc:Region>
        <cac:AddressLine>
          <cbc:Line>Sin complemento</cbc:Line>
        </cac:AddressLine>
      </cac:Address>
    </cac:Party>
    <cac:AccountsContact>
      <cbc:Telephone>917277000</cbc:Telephone>
    </cac:AccountsContact>
  </cac:SellerParty>

  <cac:PaymentMeans>
     <cac:PaymentMeansCode>42</cac:PaymentMeansCode>
     <cbc:DuePaymentDate>2005-10-12</cbc:DuePaymentDate>
     <cac:PayeeFinancialAccount>
	<cac:ID>2038-2100-17-013456789</cac:ID>
     </cac:PayeeFinancialAccount>
  </cac:PaymentMeans>

  <cac:LegalTotal>
    <cbc:TaxInclusiveTotalAmount amountCurrencyID="EUR">1000.000</cbc:TaxInclusiveTotalAmount>
  </cac:LegalTotal>

  <cac:InvoiceLine>
    <cac:ID>1</cac:ID>
    <cbc:InvoicedQuantity quantityUnitCode="A">1</cbc:InvoicedQuantity>
    <cbc:LineExtensionAmount amountCurrencyID="EUR">500.00</cbc:LineExtensionAmount>
    <cac:PaymentTerms>
      <cac:SettlementPeriod>
        <cbc:StartDateTime>2004-01-01T00:00:00</cbc:StartDateTime>
        <cbc:EndDateTime>2004-02-02T00:00:00</cbc:EndDateTime>
      </cac:SettlementPeriod>
    </cac:PaymentTerms>
    <cac:Item>
      <cac:StandardItemIdentification>
        <cac:ID>020006</cac:ID>
      </cac:StandardItemIdentification>
    </cac:Item>
  </cac:InvoiceLine>
  <cac:InvoiceLine>
    <cac:ID>2</cac:ID>
    <cbc:InvoicedQuantity quantityUnitCode="A">1</cbc:InvoicedQuantity>
    <cbc:LineExtensionAmount amountCurrencyID="EUR">500.00</cbc:LineExtensionAmount>
    <cac:PaymentTerms>
      <cac:SettlementPeriod>
        <cbc:StartDateTime>2004-11-12T00:00:00</cbc:StartDateTime>
        <cbc:EndDateTime>2004-11-12T00:00:00</cbc:EndDateTime>
      </cac:SettlementPeriod>
    </cac:PaymentTerms>
    <cac:Item>
      <cac:StandardItemIdentification>
        <cac:ID>020008</cac:ID>
      </cac:StandardItemIdentification>
    </cac:Item>
  </cac:InvoiceLine>
</ubl:Invoice>



[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]