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!
OK, not wrong, just misguided :-)
Seriously, what you are after are the set of nametokens that are valid at a
particular point. What your example is trying to do is to define a model
that is valid at a particular point. I am not convinced that defining a
model is valid in this context.
> > what.content =
> > element foo1 {
> > element bar1 {empty}? &
> > element baz1 {empty}? &
> > element bat {empty}?
> > } | element foo2 {
> > element bar2 {empty}? &
> > element baz2 {empty}? &
> > element bat {empty}?
> > }
My main point is the following:
> 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)}
You state:
>This would be against the principles of a "QBE" where we try to express
as much as possible by providing examples.
Eaxmples of what: matching models or matching instance constructs?
For matching instance constructs XPath is ideal (foo1/bar1 | foo1/baz1 |
foo1/bat). It also maps easily to XSLT.
Why do you think you need a model definition in your example?
>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.
Again XPath solves this easily, without needing a model.
>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"/>
Tokens are, admittedly a problem when you want to distinguish between
sequences and & groups. But your example (after correction and extension)
of:
<what.foo1 element.name="bar1 bar1 bat" type="sequence"/>
would be valid if I replaced type="sequence" with type="and".
So would:
<what.match element.name="foo1/bar1 foo1/bar1 foo1/bat" type="and"/>
Martin
-- 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 19:06:08 2005
This archive was generated by hypermail 2.1.8 : Thu Nov 03 2005 - 16:03:01 UTC