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

On Wed, 18 Mar 2009 10:25:01 +0100
Christian de Sainte Marie <csma@ilog.fr> wrote:

> Michael Kifer wrote:
> > 
> > But more generally, an element can have an anonymous type.
> 
> </chair>
> What is the problem, if an element, say, A, has an anonymous type?

You seem to have answered this below.

The above should be read in the context in which it was written.
If you reflect XML elt sets in RIF as classes you need to be able to find class
names that are sufficiently differentiating.
If you have names for types then you can combine element name and type name to
construct a suitable class name. If the type is anonymous then there is no
simple way of doing this.

> ?x#A selects all the elements named A, and, if there is no type named A, omly
> the elements named A (keeping the substitution groups aside, ofr the sake of
> that discussion). If there are several elements named A, with different
> types, then you select them all. And, so, what, as long as it selects only
> elements named A, nothing else? If this is not what you want to do, you do
> not use ?x#A in that case.
> 
> The big problem with my current proposal is that exactly the same construct
> can have two different meanings (select by element name and select by type
> name) and there is no way to distinguish between them.
> 
> What you seem to point out, if I understand correctly, is that my current
> proposal, also, lacks the expressive power to discriminate between elements
> with the same name and different (possibly anonymous) types.
> 
> That is a different kind of flaw, I think: first, the level of expressiveness
> that is useful is arguable (that is a point where the 80-20 rules apply in
> standards; and that is what I had in mind, when I refered to that rule in an
> earlier email); second, new constructs can be added, if expressive power need
> be increased.
> 
> > Also, are you assuming that an xml doc is always associated with an XML
> > schema?
> 
> No, I do not assume that an XML doc is always associated with a schema. I
> require that you have at least one of: an XML instance doc, a DTD or an XML
> schema. Only if you import a non-XML/RDF/OWL data document, do I require that
> it is associated with a DTD or a Schema.
> 
> > If not, then things become too hairy to contemplate :-)
> 
> Why is that?
> 
> I would say, to the contrary, that that big flaw in my proposal does not
> apply to the case where you have only an XML data document, with no schema
> associated: in that case, you cannot select elements by type, but only by
> name...
> 
> What am I missing, this time?


If you do not have a schema or DTD then you have no way to differentiate
between elements that happen to have the same name but different
structure. I mean conceptually differentiate. So, you are again having a
naming problem.

> > In that case, I think, only Gary's proposal or equivalent (eg,
> > XPath-based methods) would work.
> 
> No, this is exactly the case where Gary's proposal does not apply: Gary's
> proposal is about mapping schema components to RIF frames. It requires an
> XML schema.

I do not think schema is needed in his case. Basically the same method can
map instance docs.

> My proposal maps components of a (possibly virtual) XML instance document on
> RIF constructs. It does not require an XML schema (it requires at least one
> of an XML instance document, a DTD or an XML schema).

I mean the part that deals with classes in your proposal has a problem when
schema is not available (and in some cases when it is available, too).



	--michael 

Received on Wednesday, 18 March 2009 23:22:58 UTC