Hi Martin,
Le dimanche 30 octobre 2005 à 20:46 +0000, Martin Bryan a écrit :
> Eric
>
> My take on this is that what.content is wrong:
What do you mean by wrong?
If you mean "uncommon" or "not easy to describe with tools such as W3C
XML Schema" I agree that this content is "wrong".
Personally, I try to avoid using terms such as "wrong" that carry a
judgment except when something is really against the spec (for instance
when a document isn't well formed).
Here, I don't really think that we can say that this is wrong!
> > what.content =
> > element foo1 {
> > element bar1 {empty}? &
> > element baz1 {empty}? &
> > element bat {empty}?
> > } | element foo2 {
> > element bar2 {empty}? &
> > element baz2 {empty}? &
> > element bat {empty}?
> > }
>
> The question you are really asking is "what.foo1" and "what.foo2" (note the
> namespace/qualification). The options are not a model, but a list of tokens
> that are element names in the original schema, so they should be defined as
> attributes, not elements.
>
> So we seem to be talking about something like:
>
> what.content = element what.foo1 {attribute element.name (bar1|baz1|bat)} |
> element what.foo2 {attribute element.name (bar2|baz2|bat)}
This would be against the principles of a "QBE" where we try to express
as much as possible by providing examples.
Furthermore, you would need to specify namespaces for these element
names and that could lead either to very long names or to QNames which
are an horror.
Note also that would be a list of either "bar1", "baz1" or "bat" (in the
first case) and we wouldn't be able (with RNG only) to specify that we
want at most one of each of them and avoid getting (for instance):
<foo1 element.name="bar1 bar1 bat"/>
Eric
--
Le premier annuaire des apiculteurs 100% XML!
http://apiculteurs.info/
------------------------------------------------------------------------
Eric van der Vlist http://xmlfr.org http://dyomedea.com
(ISO) RELAX NG ISBN:0-596-00421-4 http://oreilly.com/catalog/relax
(W3C) XML Schema ISBN:0-596-00252-1 http://oreilly.com/catalog/xmlschema
------------------------------------------------------------------------
--
DSDL members discussion list
To unsubscribe, please send a message with the
command "unsubscribe" to dsdl-discuss-request@dsdl.org
(mailto:dsdl-discuss-request@dsdl.org?Subject=unsubscribe)
Received on Wed Nov 2 09:51:39 2005
This archive was generated by hypermail 2.1.8 : Wed Nov 02 2005 - 18:13:01 UTC