- From: MURATA Makoto (FAMILY Given) <EB2M-MRT@asahi-net.or.jp>
- Date: Tue, 21 Oct 2003 23:46:43 +0900
- To: Jonathan Robie <jonathan.robie@datadirect.com>
- Cc: public-qt-comments@w3.org
Jonathan,
Thanks for your quick reply.
> Every element or attribute node in the data model has a type annotation.
> This type annotation may name a very general type, such as xs:anyType, or
> it may convey that a node is untyped, e.g. xdt:untypedAny. Would assigning
> a very general type meet your needs?
This is fine to me. Is it possible to provide an informative appendix
for such ambiguous RELAX NG schemas?
> >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?
>
> You could assign the nearest common root type to the two <a>s, which may be
> as general as xs:anyType. I don't know what you want to do with this data,
> so I can't tell if this is adequate. If the types are atomic types, then
> assigning a very general type and relying on XQuery's implicit casts could
> do the trick.
For example, I would like to write a query
<imageCollection>
{
for $a in doc("http://www.example.com/root.xml")/root/a
where op:numeric-equal($a/b, 10)
return
$a/b
}
</imageCollection>
.
Static analysis should not cause a type error. The output schema
should be as follows.
start = element imageCollection {b*}
b = element b {xsd:int}
Cheers,
--
MURATA Makoto (FAMILY Given) <EB2M-MRT@asahi-net.or.jp>
Received on Tuesday, 21 October 2003 10:50:51 UTC