[relaxng-user] Trang handling of (text|element) content

James Clark jjc at jclark.com
Sat Oct 25 04:05:40 ICT 2003


On Sat, 2003-10-25 at 07:36, J. David Eisenberg wrote:

> One example is a document that consists of one or more lists.
> A list consists of one or more items. Each item consists of text
> or a list.

> 1) Can I write an XML Schema that will do exactly the same thing that
>    the Relax NG does?

IIRC, no.  Content models in XSD have atoms that match elements.

> 3) I'm sure Trang's output is reasonable, but I don't understand the
>    reasoning.  Any simple explanations?

When some RELAX NG schema cannot be translated exactly into XML Schema,
Trang approximates by generalizing: it finds some XML Schema that allows
everything that the RELAX NG allows, even if some things forbidden by
the RELAX NG are not forbidden by the XML Schema.

James




More information about the relaxng-user mailing list