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: Re: [ubl-dev] UBL schema validation



Thanks a lot, Stephen.

Your sample works properly. At least, now I don't have to specify the 
schema locations for each namespace.

I've never seen any schema with such amount of different namespaces. 
It's a little complex to create the XML doc but I can understand it's 
the price for flexibility (not very good friends, flexibility and 
simplicity)

Thanks again
Jorge


Stephen Green wrote:

>Hi again Jorge,
>
>Again I replied too quickly and didn't
>see the problems you were having with
>schemaLocations and I hope the example
>I sent helps. It should work without all
>those schemaLocation entries, just
>
>xsi:schemaLocation="urn:oasis:names:specification:ubl:schema:xsd:Invoice-1.0
>http://docs.oasis-open.org/ubl/cd-UBL-1.0/xsd/maindoc/UBL-Invoice-1.0.xsd";
>
>should be sufficient.
>
>All the best
>
>Steve
>
>----- Original Message ----- 
>From: "Stephen Green" <stephen_green@seventhproject.co.uk>
>To: <ubl-dev@lists.oasis-open.org>
>Sent: Tuesday, July 05, 2005 3:09 PM
>Subject: Re: [ubl-dev] UBL schema validation
>
>
>  
>
>>Hi Jorge
>>
>>That is the way UBL 1.0 is designed. It is to allow
>>polymorphic schema customization and versioning.
>>The problem is that there is more work in building
>>instances, as you seem to be finding.
>>
>>My attached example shows that you can in fact
>>leave out the top level and other document schema
>>prefixes (the default namespace) but that doesn't help
>>a lot I suppose.
>>
>>All the best
>>
>>Stephen Green
>>
>>----- Original Message ----- 
>>From: "Jorge Ortiz Claver" <jorge.ortiz@tirea.es>
>>To: <ubl-dev@lists.oasis-open.org>
>>Sent: Tuesday, July 05, 2005 3:00 PM
>>Subject: [ubl-dev] UBL schema validation
>>
>>
>>    
>>
>>>Hi,
>>>
>>>I´ve 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 it´s 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: I´m 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:CoreComponentParame
>  
>
>>ters-1.0"
>>    
>>
>xmlns:cbc="urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponent
>  
>
>>s-1.0"
>>    
>>
>xmlns:cac="urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateCompo
>  
>
>>nents-1.0"
>>    
>>
>xmlns:udt="urn:oasis:names:specification:ubl:schema:xsd:UnspecializedDatatyp
>  
>
>>es-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>
>>>
>>>
>>>
>>>      
>>>
>>--------------------------------------------------------------------------
>>    
>>
>--
>  
>
>>----
>>
>>
>>    
>>
>>>---------------------------------------------------------------------
>>>To unsubscribe, e-mail: ubl-dev-unsubscribe@lists.oasis-open.org
>>>For additional commands, e-mail: ubl-dev-help@lists.oasis-open.org
>>>      
>>>
>
>
>
>  
>
>>---------------------------------------------------------------------
>>To unsubscribe, e-mail: ubl-dev-unsubscribe@lists.oasis-open.org
>>For additional commands, e-mail: ubl-dev-help@lists.oasis-open.org
>>    
>>
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: ubl-dev-unsubscribe@lists.oasis-open.org
>For additional commands, e-mail: ubl-dev-help@lists.oasis-open.org
>
>
>  
>



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