[
Lists Home |
Date Index |
Thread Index
]
- From: Aleksi Niemelä <aleksi.niemela@cinnober.com>
- To: "'xml-dev@xml.org'" <xml-dev@xml.org>
- Date: Thu, 10 Feb 2000 17:14:53 +0100
From: Bob Kline [mailto:bkline@rksystems.com]:
I'd like to try and make sure that people aren't ignoring his request
because they think no one else is interested in the answer. I'm
interested, and have a number of cases which would benefit significantly
from the modification he proposes.
Me:
While I see need for non-restrictive ANY I have needs to restrict ANY a
little bit. I think I asked this before Y2K or after that, and got some
response. But I have to say I'm facing this problem again and again.
Basically I like to write *by hand* in a shorthand form for two reasons.
It's much easier to read and understand and quite much faster to type. So I
like this:
<foo>
<bar>
<bar_childs/>
</bar>
<cuz/>
</foo>
instead of:
<foo>
<foo_child_type_object named="bar">
<bar_childs/>
</foo_child_type_object>
<foo_child_type_object named="cuz"/>
</foo>
Yup, I know I could use XSLT to translate between these forms but I feel
it's really an overkill. Think about slim servlet reading user's typing and
responding on that: first it performs XSL Transformation just to be able to
check correctness.
It should be dead simple to write proper schema for the first one (I can't
recall can you say maxOccurs for any, or do you have to make a container for
<bar> and <cuz> - wrapping is going to kill the user even more):
<element name="foo">
<type>
<any maxOccurs="*"/>
<type>
</element>
And schema for the latter is easy too:
<element name="foo">
<type>
<element name="foo_child_type_object" type="foo_child_type"
maxOccurrs="*"/>
<type>
</element>
What I would like to say is "expect any well-formed XML which is correct
according [some type definition | maybe other schema]":
<element name="foo">
<type>
<any type="foo_child_type" maxOccurs="*"/>
<type>
</element>
How come I can't specify anything for any, even in the case where we really
know what foo_child_typed elements should contain. Doesn't anybody else hit
his head on this wall?
- Aleksi
|