[tei-council] rowing back on <mixedContent>

Sebastian Rahtz sebastian.rahtz at it.ox.ac.uk
Fri Jul 4 12:00:04 EDT 2014


On 4 Jul 2014, at 16:47, Lou Burnard <lou.burnard at retired.ox.ac.uk> wrote:

> 
> I believe that the same restrictions as to where textNode is permitted  
> apply also in W3C schema. So this is not just a matter of retaining 
> compatibility with old fashiooned DTD language, as you seem to imply. Do 
> you have evidence to the contrary?
> 
not entirely.

if you take this schema

a = element a { (x | y )+ | ( text | b | c)+ }
b = element b { text }
c = element c { text }
x = element x { text }
y = element y { text }
start =a

then RelaxNG does what you expect. Trang translates it to 

  <xs:element name="a">
    <xs:complexType mixed="true">
      <xs:choice>
        <xs:choice maxOccurs="unbounded">
          <xs:element ref="x"/>
          <xs:element ref="y"/>
        </xs:choice>
        <xs:choice minOccurs="0" maxOccurs="unbounded">
          <xs:element ref="b"/>
          <xs:element ref="c"/>
        </xs:choice>
      </xs:choice>
    </xs:complexType>
  </xs:element>

which sort of fudges the issue. I am not sure whether XSD can model
it or not.

> My view is that providing a special case "mixed content" element is a 
> good way of distinguishing a feature we provide solely for compatibility 
> across all existing schema processors from the more general but not so 
> widely implemented cases. Those who "just" want mixed content can have 
> it without having to figure out how to do it using the rather more 
> verbose method
> in pure pure odd.

by that argument we’d keep @allowText on <content>, and have a Schematron
which says that any use of <textNode> and @allowText in the same <content>
is not allowed.
--
Sebastian Rahtz      
Director (Research) of Academic IT
University of Oxford IT Services
13 Banbury Road, Oxford OX2 6NN. Phone +44 1865 283431

Não sou nada.
Nunca serei nada.
Não posso querer ser nada.
À parte isso, tenho em mim todos os sonhos do mundo.



More information about the tei-council mailing list