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 Newbie -- invoices


>> I'll defer to the business subject matter experts (I'm just an XML
>> geek) but my guess would be to use the generic cbc:Note element to
>> carry supplemental information such as this.

>Right -- but where to put it? Judging from the other uses of cbc:Note,
>it should probably be inside some other element that provides the note
>with some meaning.

Hi Manuzhai

I think your problem is with identifying where elements are defined as being
positioned in the XML tree defined by the whole set of schemas. It's a pity
that this is best helped by commercial software. Say, you want to add a Note
element to an XML instance of UBL. There are defined places in the schema 
structure for each document (invoice, order ,etc) where you may include a
Note element. One is 'at document level' as we say - where it is allowed in the
top part of, say, an invoice. This is where to add something which applies to
the whole document (probably what you need). If there is a Note element
allowed 'at line level' - that is, only applying to a particular document line
(say, invoice line) - then that is where to add a Note that applies just to that line.

I think you may get help by looking at the example XML files for invoices, orders,
etc provided with the small business subset (SBS) as these give you all the more
common places to put the data to start with. If that isn't enough you'll have to
try to navigate the XML trees for the complete UBL documents from the schemas
while paying attention to the defintions, as you seem to have been doing. There 
are various products you can buy to help this but I frequently use the free
Home Edition version of XML Spy (though it doesn't give you the diagrammatic
tree view of the schemas - you may need non-free software for that).

The subset is soon to be released for public review but you can see the files in the
meantime at
http://www.oasis-open.org/committees/download.php/16123/UBL-1-0-SBS-cd2.zip
 - just don't tell anyone ;-) It does have public access of course, as with most UBL
documents, emails, etc

Meanwhile the need for project codes may be addressed with UBL 2.0 and that too
is due for imminent public review - 'watch this space' :-)
I haven't been through all of the new content (I mainly concern myself with the
SBS ) but I would imagine the place such an element might be would be in Item
which is itself in InvoiceLine, etc. The issue of containment of certain UBL elements
within certain other UBL elements is a characteristic of the UBL XML design (and
more generally of UN/CEFACT/ISO CCTS compliant standards); it just means that
you can only include a certain element where the schemas allow. Customising the
schemas to make them allow what they don't allow now is sometimes possible
(according to customisation/xsd derivation rules) but I'd leave that alone if you 
can.

I've given a long answer to a short question so I'll stop :-)

All the best

Stephen Green








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