Re: Schema issue: Order dependence of submission child elements

Thanks for pointing this out, but it distracts from the point at hand, 
which is that I am also asserting it is easy to do in W3C schema and am 
challenging those who claimed otherwise to explain why it is hard.

Part of the problem here is that the updates to XForms 1.1 schema are many 
weeks late now, but there has been no indication whether this is because 
there is some aspect of the new XForms 1.1 content that is hard to capture 
in schema (aside from the obvious stuff that we don't express in any 
schema language, like validating whether a string contains a legal XPath 
expression).

John M. Boyer, Ph.D.
STSM: Lotus Forms Architect and Researcher
Chair, W3C Forms Working Group
Workplace, Portal and Collaboration Software
IBM Victoria Software Lab
E-Mail: boyerj@ca.ibm.com 

Blog: http://www.ibm.com/developerworks/blogs/page/JohnBoyer





Erik Bruchez <ebruchez@orbeon.com> 
Sent by: public-forms-request@w3.org
07/27/2007 01:13 AM
Please respond to
ebruchez@orbeon.com


To
"Forms WG (new)" <public-forms@w3.org>
cc

Subject
Re: Schema issue: Order dependence of submission child elements







I don't have a solution, not being an absolute schema specialist, but it 
always feels good to point out that with Relax NG, this is extremely 
easy to do and you don't even have to look up a tutorial or a spec! It 
would look like this and be immediately understandable by even somebody 
who has never written any Relax NG:

<interleave>
     <optional>
         <element name="resource">...</element>
     </optional>
     <optional>
         <element name="method">...</element>
     </optional>
     <zeroOrMore>
         <element name="header">...</element>
     </zeroOrMore>
</interleave>

-Erik

John Boyer wrote:
> 
> The issue of ordered children of submission came up on the Wednesday 
> telecon.
> 
> On the telecon it was stated that it was hard in XML schema to specify 
> child elements that were both optional and in a required order.
> 
> I preserved this aspect of submission in the current editor's draft 
> because I do not understand why it is hard, whereas I can easily see it 
> being harder to write a schema that says the child is optional but could 

> appear anywhere in the list of child elements.  It is easy to see how to 

> do it if the schema also allows the child to appear any number of times, 

> but this is not what we want.
> 
> Isn't it just a case of saying that the submission has a resource 
> element with minoccurs=0 then a method element with minoccurs=0 then a 
> header element with minoccurs=0 and maxoccurs=unbounded?
> 
> Is there an easy way to say "In any order, one or zero resource plus one 

> or zero method plus zero or more header"? 
> 
> Cheers,
> John M. Boyer, Ph.D.
> STSM: Lotus Forms Architect and Researcher
> Chair, W3C Forms Working Group
> Workplace, Portal and Collaboration Software
> IBM Victoria Software Lab
> E-Mail: boyerj@ca.ibm.com 
> 
> Blog: http://www.ibm.com/developerworks/blogs/page/JohnBoyer
> 


-- 
Orbeon Forms - Web Forms for the Enterprise Done the Right Way
http://www.orbeon.com/

Received on Tuesday, 31 July 2007 18:47:57 UTC