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

 


Help: OASIS Mailing Lists Help | MarkMail Help

ubl message

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


Subject: Re: [ubl] Discussion of RELAX-NG/W3C Schema normativeness in SBSC work


At 2005-05-18 12:47 +0100, Mavis Cournane wrote:
>the questions you pose are interesting. To help my understanding, could 
>you explain a little more about the nature of the support files you are 
>talking about? Could you give me an example.

Sure!  For SBSC we've created a number of XML, HTML and text files ... here 
is a snapshot from last month:

   http://lists.oasis-open.org/archives/ubl-sbsc/200504/msg00012.html

In the package are what we call "the XPath files" that are XML instances 
describing element and attribute name and type information, from which we 
derive the text report, HTML report and sample instance.  The core of all 
of the reports are these XPath files.

For ease of creating the agreed-upon reports, the XPath file vocabulary was 
designed with a particular attribute signaling the presence of text.  When 
absent, there must otherwise be one or more element children following the 
set of attribute children.  These two components of the vocabulary are 
mutually exclusive:  an element has either a text attribute or one or more 
element children.

Because the files can be very (very!) large, it was decided not to use an 
element child signal for the presence of text, since this would require 
forward lookahead to complete the information about the element (having the 
attribute available when processing the element ensures all the information 
is complete without examining children).  While easy for XSLT acting on the 
structure, the XPath files for full UBL 1.0 files are many tens of 
megabytes in size, so the programs we are using in SBSC are Python programs 
using a SAX streaming interface to the data.  Such an interface doesn't 
have lookahead.

So, I have the co-occurrence constraint to express in the document model: 
either the text="" attribute (which must be empty) or one or more <element> 
child elements that follow zero or more <attribute> child elements, but not 
both and not neither.

Since you can't say this in W3CSchema-speak, all you can say is that the 
text attribute is optional and the <element> children are optional ... but 
you cannot constrain the instance to have those be mutually exclusive and 
one of them mandatory.

I hope this helps understand the issue.

. . . . . Ken

--
World-wide on-site corporate, govt. & user group XML/XSL training.
G. Ken Holman                 mailto:gkholman@CraneSoftwrights.com
Crane Softwrights Ltd.          http://www.CraneSoftwrights.com/o/
Box 266, Kars, Ontario CANADA K0A-2E0    +1(613)489-0999 (F:-0995)
Male Breast Cancer Awareness  http://www.CraneSoftwrights.com/o/bc
Legal business disclaimers:  http://www.CraneSoftwrights.com/legal



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