[tei-council] Should Roma be doing this?

James Cummings James.Cummings at it.ox.ac.uk
Wed Feb 6 01:23:33 EST 2013


Gosh, interesting. I think if there is a default value then it 
should be impossible to have a closed valList without that being 
included.  I don't think it should automatically include it...but 
simply raise an error when processing such an ODD.

But this is just a gut feeling,

-James

On 05/02/13 23:38, Martin Holmes wrote:
> I have an ODD file containing this:
>
>              <elementSpec ident="list" mode="change">
>                  <attList>
>                     <attDef ident="type" mode="change" usage="opt">
>                        <valList mode="add" type="closed">
>                           <valItem ident="ordered"/>
>                           <valItem ident="unordered"/>
>                        </valList>
>                     </attDef>
>
>                  </attList>
>               </elementSpec>
>
> When I run Roma and generate an RNG schema, it has this:
>
>         <optional>
>           <attribute
> xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0"
> name="type" a:defaultValue="simple">
>             <a:documentation>describes the form of the
> list.</a:documentation>
>             <choice>
>               <value>ordered</value>
>               <a:documentation/>
>               <value>unordered</value>
>               <a:documentation/>
>             </choice>
>           </attribute>
>         </optional>
>
> Note the default value of "simple". With this schema, the following
> becomes invalid:
>
> <list>
>
> because the processor assumes the default value of "simple" in the
> absence of the attribute (even though the attribute is optional), and
> because "simple" is not in the list of allowed values, the element is
> invalid. At least, I presume that's what's happening.
>
> Should this be the case? Or should Roma detect when a default value is
> not included in the list of allowed values in the ODD, and discard it?
>
> Cheers,
> Martin
>


-- 
Dr James Cummings, James.Cummings at it.ox.ac.uk
Academic IT Services, University of Oxford


More information about the tei-council mailing list