rdf:li and rdfs:subClassOf="rdfs:Container"

Hi. I hope you all don't mind another syntax question. This one's related to
RDF Schemas. I want to make sure that my parser behaves well with whatever
schema layer is added on top of it.

The RDF M&S Formal Grammar states that containers can only contain property
attributes of the form rdf:_n or member attributes of the form rdf:li. It
also states that containers must be of type rdf:Bag, Seq, or Alt. The note
in Section 3.2, though, states that RDF Schema defines a mechanism to
declare subclasses of these containers and that production [18] (as listed
in Section 3.2) should be extended to include these additional subclasses.

Given that a low-level RDF parser won't know the subclasses of
rdfs:Container (nor is it even possible) should the grammar be restricting
the rdf:_n and rdf:li properties to containers? Note that it doesn't
necessarily say that you can't have a rdf:_n or rdf:li on a description but
both of the RDF parsers that I've been studying (SiRPAC and Megginson's
RDFFilter) either ignores them or throws an error.

Since it's possible for me to declare foo:Bar as a subClassOf
rdfs:Container, all RDF parsers will have to somehow know that foo:Bar is
one of the permissible container types. Or, they will have to allow rdf:_n
and rdf:li properties on all resources. Whether or not that passes
validation at a higher level is up to that higher level and not the lower
level parser. Sound reasonable?

That doesn't really break the syntax but my next example does. In Section
2.3.2 of RDF Schema, it states that "A class may be a subclass of more than
one class." The schema serialization in Appendix A shows that rdf:Bag, Seq,
and Alt each contain only one subClassOf property. So everything's cool. But
what if I decide that my foo:Bar class is also a subClassOf baz:Quux which
is NOT a subClassOf rdfs:Container?

Now, I would expect that since instances of foo:Bar are not just containers
but also baz:Quux's, that I would be able to do something like this:

<foo:Bar about="..." foo:predicate="...">
  <rdf:li resource="..."/>
  ...
</foo:Bar>

Unfortunately, production [18] in Section 3.2 of the M&S and it's
accompanying note say that since foo:Bar is a subClassOf rdfs:Container, it
really needs to follow the rules for rdf:Bag, Seq, and Alt which means that
it can't have an about attribute nor can it have any property attributes
other than rdf:_n.

Additionally, RDF M&S Section 3.2 states that "Container resources may have
other properties in addition to the membership properties and the type
property." But the grammar states that the only property elements that a
container can have are members (as described in production [6.28]). Yes, I
realize that you could always include an rdf:Description element elsewhere
in your document with an about attribute equal to the container's ID but
that's hardly intuitive.

I imagine that when the Formal Grammar was defined, the possibility that
classes might be subclasses of both containers and non-containers wasn't
considered. I can't find anything in RDF Schema that precludes this. Should
it be restricted (I'd say no) or should the grammar be loosened just a tad
so it's not as restrictive with regards to containers.

Why can't a container have an about attribute?

Comments?

Jason.

Received on Sunday, 1 October 2000 19:23:45 UTC