RE: Partial type-assignment and ambiguous RELAX NG schema

Currently all instances in the XQuery data model are assigned a concrete
type name (no union types or abstract types). This means that if you
want partial type-assignment on instances, you have to use the existing
type annotation mechanism and extend it in a compatible way to perform
the annotations. This can be done by annotating the union or abstract
type names and defining the semantics of atomization (fn:data()) and
potentially other operations on them.

XSD allows you to define unions between simple types and unions between
complex types (choice). However only xs:anyType and mixed content types
can serve as a union between simple and complex types.

However, XML Schema always performs a full type-assignment. If your
instance has the type annotation xs:anyType as the most specific type
for example in the PSVI, it is considered to be untyped and gets the
weak type xdt:untypedAny in the data model.

Best regards
Michael

> -----Original Message-----
> From: MURATA Makoto (FAMILY Given) [mailto:EB2M-MRT@asahi-net.or.jp]
> Sent: Wednesday, October 22, 2003 7:59 AM
> To: Michael Rys
> Cc: Jonathan Robie; public-qt-comments@w3.org; MURATA Makoto
> Subject: Re: Partial type-assignment and ambiguous RELAX NG schema
> 
> 
> On Tue, 21 Oct 2003 13:52:06 -0700
> "Michael Rys" <mrys@microsoft.com> wrote:
> 
> > The data model should not allow xs:anyType as an instance type
> > annotation since the instance should be a concrete type and not a
> > general abstract type. However you can certainly use an (anonymous)
> > union type...
> 
> You appear to disagree with Jonathan and Michael.  I thus think the
data
> model spec needs some clarification about partial type-assignment.
Such
> clarification will also ensure that XQuery can be used for RELAX NG
(and
> thus XHTML2 and RDF).
> 
> I plan to use non-deterministic path automata for partial
type-assignment.
> My prototype can already generate a path automaton from the RNG schema
> shown
> in my previous mail.  This path automaton is non-deterministic: it
cannot
> choose
> aWithOptB or aWithB.  Should I then use xs:anyType or the union of
what?
> (W3C XML
> Schema allows the union of simple types, but does it allow the union
of
> complex types?)
> 
> 
> <?xml version="1.0"?>
> <pathAutomaton
> 	xmlns:rng="http://relaxng.org/ns/structure/1.0"
> 	start="#start"
> 	elementDeterministic="false"
> 	attributeDeterministic="true"
> 	simpleValueDeterministic="true">
> 
> <t s="#start" d="#anon0">
> <rng:element>
>   <rng:name ns="">root</rng:name>
> </rng:element></t>
> <t s="#anon0" d="#anon1">
> <rng:element>
>   <rng:name ns="">a</rng:name>
> </rng:element></t>
> <t s="#anon0" d="b">
> <rng:element>
>   <rng:name ns="">a</rng:name>
> </rng:element></t>
> <t s="#anon1" d="#anon2">
> <rng:element>
>   <rng:name ns="">b</rng:name>
> </rng:element></t>
> <t s="b" d="#anon2">
> <rng:element>
>   <rng:name ns="">b</rng:name>
> </rng:element></t>
> <t s="#anon2" d="#data">
> <rng:data datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes"
> type="int"/></t>
> </pathAutomaton>
> 
> 
> Cheers,
> 
> --
> MURATA Makoto (FAMILY Given) <EB2M-MRT@asahi-net.or.jp>
> 
> 

Received on Wednesday, 22 October 2003 12:21:07 UTC