[
Lists Home |
Date Index |
Thread Index
]
Hi Jeni,
On Tue, 2003-07-15 at 12:19, Jeni Tennison wrote:
> Hi Eric,
>
> > I have recently written (with much help from Murata Makoto) a
> > chapter dedicated to Relax NG, ambiguous and non-deterministic
> > models proposing a distinction between determinism and unambiguity
> > and showing some more examples:
> >
> > http://books.xmlschemata.org/relaxng/RngBookAssignment.html
>
> Nice chapter!
Thanks!
> On the "what to do about ambiguity" front, you mention
> adding an except pattern and using explicit disambiguation rules. A
> third option would be to use type systems that support you saying
> "this value is *both* X and Y".
>
> For instance, you give the example:
>
> element foo { xs:boolean | xs:integer }
>
> If you have: <foo>3</foo>, the XPath 2.0 type system will happily say
> that <foo> is of type xs:integer, and of type xs:decimal (since all
> xs:integers are xs:decimals).
>
> If you had: <foo>1</foo>, you could have a type system that says that
> <foo> is of type xs:boolean, and of type xs:integer, and of type
> xs:decimal.
>
> You can think of this as multiple inheritance (a new, anonymous, type
> is inherited from both xs:boolean and xs:integer, and the <foo>
> element ends up either being a xs:boolean or an xs:integer, or this
> new anonymous type). A language that used such a type system would
> have to use the usual methods for disambiguation (such as those you
> list in your chapter) in situations where polymorphic operators or
> functions were used with such a type.
Yes, that'd be a nice thing to investigate. I *suspect* that it would be
more complicated to report by schema processors but I haven't done
enough work in implementing type assignment to be 100% sure.
I'll add this as a third option for sure!
> But anyway... one thing you mentioned in your chapter but I wondered
> if you could expand on was the impact of ambiguity and non-determinism
> on guided editing. I'd always thought that it was non-determinism that
> made guided editing hard (and that this was one of the reasons XSD
> didn't support non-deterministic content models), but you seem to
> suggest that it's ambiguity that causes the problem. Could you explain
> a bit more?
Yes, I think that I should elaborate more on the impact on existing
tools. I'll do some tests with xmloperator [1] which AFAIK is the only
XML editor using Relax NG for guided editing and add my conclusions to
the chapter!
[1] http://www.xmloperator.net/
Thanks
Eric
> Cheers,
>
> Jeni
>
> ---
> Jeni Tennison
> http://www.jenitennison.com/
>
>
> -----------------------------------------------------------------
> The xml-dev list is sponsored by XML.org <http://www.xml.org>, an
> initiative of OASIS <http://www.oasis-open.org>
>
> The list archives are at http://lists.xml.org/archives/xml-dev/
>
> To subscribe or unsubscribe from this list use the subscription
> manager: <http://lists.xml.org/ob/adm.pl>
--
Tired to type XML tags?
http://wikiml.org
------------------------------------------------------------------------
Upcoming Schema languages tutorial (registration open):
- August 4th (Montreal, Canada) http://makeashorterlink.com/?U28A217A4
------------------------------------------------------------------------
Eric van der Vlist http://xmlfr.org http://dyomedea.com
(W3C) XML Schema ISBN:0-596-00252-1 http://oreilly.com/catalog/xmlschema
------------------------------------------------------------------------
|