W3C home > Mailing lists > Public > public-rif-wg@w3.org > March 2009

Re: [ISSUE-37] New proposal on RIF interoperation with XML data and XML Schemas

From: Michael Kifer <kifer@cs.sunysb.edu>
Date: Tue, 17 Mar 2009 17:31:52 -0400
To: Christian de Sainte Marie <csma@ilog.fr>
Cc: RIF WG <public-rif-wg@w3.org>
Message-ID: <20090317173152.3b320fc9@kiferdesk>


On Tue, 17 Mar 2009 18:46:25 +0100
Christian de Sainte Marie <csma@ilog.fr> wrote:

> Michael Kifer wrote:
> > 
> > As Bijan said, it is dangerous (inelegant, in my view) to conflate types and
> > element names. [...]
> 
> Oh, you meant that the name of a type could be the same as the name of an element of a different type. Something like:
> 
> <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
> ...
> <xs:complexType name="A">
>    some content
> </xs:complexType>
> ...
> <xs:complexType name="B">
>    some completely different content
> </xs:complexType>
> ...
> <xs:element name="A" type="B"/>
> <xs:element name="B" type="A"/>
> ...
> </xs:schema>
> 
> According to (the current version of) my proposal, ?x#A would match the A elements (of type B) as well as the B element (of type A)...
> 
> Ohmygosh! I did not think of that.
> 
> Yuk! You are right, that's disgusting! (The current version of) my proposal is horribly flawed. Sigh!
> 
> :-(

This is part of the problem. In the above case the class should be something
like a function of both A and B (ie, A||B and B||A).
But more generally, an element can have an anonymous type.
Also, are you assuming that an xml doc is always associated with an XML schema?
If not, then things become too hairy to contemplate :-)
In that case, I think, only Gary's proposal or equivalent (eg,
XPath-based methods) would work.

michael
Received on Tuesday, 17 March 2009 21:32:29 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 2 June 2009 18:34:03 GMT