RE: Schema issue: Order dependence of submission child elements

Leigh pointed out that the page I referenced is full of broken links.

However, for those sufficiently interested, the ISO Spec for NVDL can 
be downloaded here: 

http://standards.iso.org/ittf/PubliclyAvailableStandards/c038615_ISO_IEC_19757-4_2006(E).zip 
as a PDF.

A description of Oxygen's support is here:

http://www.oxygenxml.com/onvdl.html


and as it is so short, here is the NVDL (distributed with Oxygen) that 
describes how XForms (as defined in XML Schema) and XHTML (as defined 
in RNG) are combined:

<rules xmlns="http://purl.oclc.org/dsdl/nvdl/ns/structure/1.0"
  xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0">
  <namespace ns="http://www.w3.org/1999/xhtml">
    <a:documentation>We begin with XHTML sections.</a:documentation>
    <validate schema="../../frameworks/xhtml/relaxng/xhtml.rng">
      <a:documentation>This action invokes the XHTML 
schema.</a:documentation>
      <mode>
        <namespace ns="http://www.w3.org/2002/xforms">
          <a:documentation>XForms in XHTML</a:documentation>
          <validate schema="../../frameworks/xforms/XForms-Schema.xsd">
            <a:documentation>The first action invokes the XForms schema 
for XForms in XHTML.</a:documentation>
            <mode>
              <namespace ns="http://www.w3.org/2002/xforms">
                <a:documentation>XForms in ... in *XForm* in 
XHTML</a:documentation>
                <attach message="Attaching a descendant XForms 
section."/>
              </namespace>
              <namespace ns="http://www.w3.org/1999/xhtml">
                <a:documentation>XHTML in ... in *XForm* in 
XHTML</a:documentation>
                <unwrap message="Skipping a descedant XHTML section."/>
              </namespace>
            </mode>
            <context path="instance">
              <a:documentation>Allow anything inside XForm instance 
element</a:documentation>
              <mode>
                <anyNamespace>
                  <allow/>
                </anyNamespace>
              </mode>
            </context>
          </validate>
          <unwrap>
            <a:documentation>This action skip XForms in 
XHTML.</a:documentation>
            <mode>
                <namespace ns="http://www.w3.org/2002/xforms">
                <a:documentation>XForms in ... in XForms in 
*XHTML*</a:documentation>
                <unwrap message="Skipping a descendant XForms 
section."/>
              </namespace>
              <namespace ns="http://www.w3.org/1999/xhtml">
                <a:documentation>XHTML in ... in XForms in 
*XHTML*</a:documentation>
                <attach message="Attaching a descendant XHTML 
section."/>
              </namespace>
            </mode>
            <context path="instance">
              <a:documentation>Skip content inside XForms instance 
element.</a:documentation>
              <mode>
                <anyNamespace>
                  <unwrap/>
                </anyNamespace></mode>
            </context>
          </unwrap>
        </namespace>        
        <namespace ns="http://www.xsmiles.org/*">
          <a:documentation>Allow XSmiles extensions in 
XHTML.</a:documentation>
          <allow/>
        </namespace>
      </mode>         
    </validate>
  </namespace>
</rules>

All the best

MarkS 

On Fri, 27 Jul 2007 18:46:17 +0100, Mark Seaborne wrote:
> 
> To go off at a slight tangent, Related to RNG is NVDL (Namespace-based 
> Validation Dispatching Language) http://www.nvdl.org/ , which, as I'm 
> sure you all know, allows you to define how to combine XML vocabularies 
> that reside in different namespaces. What you might not know, is that 
> the Oxygen XML editor supports NVDL _and_ comes with a sample NVDL 
> document that combines XHTML and XForms, thus giving you a very nice 
> XForms editor for the cost of an extra processing instruction. I guess 
> the compound document folk have already looked at this though. 
> 
> MarkS
> 
> On Fri, 27 Jul 2007 10:36:31 -0700, Klotz, Leigh wrote:
>> 
>> I raised the issue again at the Amsterdam F2F and we decided to stay
>> with XML Schema for XForms 1.1.
>> For XForms 1.2/2.0 though we should consider both allowing RNG to be
>> used in the model and describing XForms itself using RNG.
>> Micah Dubinko did an RNG for XForms 1.0, and I've updated it since, but
>> haven't published it again.  I should get around to it though!
>> 
>> Leigh.
>> P.S. Did you see this, which I found about via Robin Cover's newsletter:
>> Ten Reasons to Model XML with RELAX NG , Not W3C XML Schema
>> Alex Brown, Griffin Brown Weblog
>> http://www.griffinbrown.co.uk/blog/PermaLink,guid,9aebb083-a961-42b1-974
>> 8-a57e06a0f19a.aspx 
>> 
>> -----Original Message-----
>> From: public-forms-request@w3.org [mailto:public-forms-request@w3.org]
>> On Behalf Of Erik Bruchez
>> Sent: Friday, July 27, 2007 1:13 AM
>> To: Forms WG (new)
>> 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 Friday, 27 July 2007 19:23:08 UTC