Partial type-assignment and ambiguous RELAX NG schema

I am wondering if it the data model spec allows partial type-assignment: 
assigning types to some (but not all) of the elements or attributes.  Such
partial type-assignment is particularly useful for RELAX NG schemas,
which are allowed to be ambiguous.

For example, consider a RNG schema (in the compact syntax) as follows.

start = 
  element root {(aWithOptB, aWithB) | (aWithB, aWithOptB)}
aWithB    = element a {b}
aWithOptB = element a {b?}
b = element b {xsd:int}

This schema is ambiguous: it allows two interpretations of
<root><a><b>3</b></a><a><b>4</b></a><root>.  Although this schema is a bit
artificial, it is created by computing the difference of two schemas
by hand (i.e., a schema with optional <b>s and a schema without <b>s).

We cannot uniquely determine the type of the two <a>s in the document, 
but we can determine the type of the two <b>s.  Obviously, they are 
of the type xsd:int.  Does the data type spec allow such partial type 
assignment?  

Cheers,

-- 
MURATA Makoto (FAMILY Given) <EB2M-MRT@asahi-net.or.jp>

Received on Tuesday, 21 October 2003 09:50:08 UTC