[relaxng-user] A question on content models

K. Ari Krupnikov ari at lib.aero
Wed Sep 24 07:46:54 ICT 2003


James,

Thanks for setting up this list, and for answering so promptly.

James Clark <jjc at jclark.com> writes:

> > The master file has declarations like
> >   <define name="class.filter">
> >     <notAllowed/>
> >   </define>
> 
> For sets of attributes, use <empty/> instead of <notAllowed/>
> 
> <define name="i18n.attributes">
>    <empty/>
> </define>

This may become a FAQ. What's the difference between empty and
notAllowed in this context? Are they ever interchangeable? Would it
mean the same if I said this?

  <define name="class.filter">
    <empty/>
  </define>

> > Individual files usually say something like
> >   <define combine="choice" name="class.reader">
> >     <element name="switch">
> >       <!-- CM -->
> >     </element>
> >   </define>
> 
> Then use combine="interleave" instead of combine="choice".

For attributes or in general? Again, this may be a FAQ, what's the
difference between "choice" and "interleave" in this context? Is

<define name="a" combine="interleave">
  <!-- -->
</define>

the same as

<oneOrMore>
  <define name="a" combine="choice">
    <!--  -->
  </define>
</oneOrMore>
  


Ari.


More information about the relaxng-user mailing list