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

 


Help: OASIS Mailing Lists Help | MarkMail Help

relax-ng message

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


Subject: RE: [Fwd: Question about complexType with unordered child elementswith at least one child element]


My guess below. Jing does not complain. But it also doesn't complain about
multiple instances of optional children or zero children of <whatever>,
perhaps only because Jing is not reporting an error on non-matches? I
believe the syntax 'says' what you want it to say, nonetheless. -Mike

<grammar xmlns="http://relaxng.org/ns/structure/0.9"
datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes">

<start>
 <element name="whatever">
  <ref name="ApplicationRequest"/>
 </element>
</start>

<define name="ApplicationRequest">
 <interleave>
  <oneOrMore>
  <optional>
   <element name="PermissionRequestSet">
    <data type="string"/>
   </element>
  </optional>
  <optional>
   <element name="LocationRequestSet">
    <data type="string"/>
   </element>
  </optional>
  <optional>
   <element name="MapRequestSet">
    <data type="string"/>
   </element>
  </optional>
  <optional>
   <element name="InfoRequestSet">
    <data type="string"/>
   </element>
  </optional>
  <optional>
   <element name="GeoCodeRequestSet">
    <ref name="GeoCodeRequestSet"/>
   </element>
  </optional>
  <optional>
   <element name="GeoItemsRequestSet">
    <data type="string"/>
   </element>
  </optional>
  <optional>
   <element name="RouteRequestSet">
    <data type="string"/>
   </element>
  </optional>
  </oneOrMore>
 </interleave>
</define>

<define name="GeoCodeRequestSet">
 <element name="something">
  <text/>
 </element>
</define>

</grammar>

-Mike

-----Original Message-----
From: Eric van der Vlist [mailto:vdv@dyomedea.com]
Sent: Thursday, June 21, 2001 2:35 AM
To: relax-ng-comment@lists.oasis-open.org
Subject: [Fwd: Question about complexType with unordered child elements
with at least one child element]


I don't thing it's possible to capture this with RELAX NG either and I
was wondering if it's something that might be useful.

The condition to capture is "in the following sequence (or interleave)
of optional items, I want to be sure that there is at least one of these
items".

Or maybe I have missed something and it's already possible with RELAX
NG?

Eric
--
Pour y voir plus clair dans la nebuleuse XML...
                                          http://dyomedea.com/formation/
------------------------------------------------------------------------
Eric van der Vlist       http://xmlfr.org            http://dyomedea.com
http://xsltunit.org      http://4xt.org           http://examplotron.org
------------------------------------------------------------------------



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


Powered by eList eXpress LLC