QNames As Anonymous First Class Objects

Has anyone done any previous work on modelling QNames as anonymous
first class objects, by taking definitions from the non-normative
namespace partitions section of the XMLNS recommendation [1]? It would
seem to me that this is a pretty obvious and logical thing to do,
although I did some searching through the archives, and only found
stuff from July such as [2]. Perhaps Jon will have some comments on
this.

Basically, you can model the QNames easily in RDF is you simply create
a set of expansions, which are all sub classes of ":QName". These are
as defined in the XMLNS specification, and are ":ExpEType" and
":ExpAName". Further to that, you have the other predicates which are
":type", ":ns", (and for ":ExpAName") ":eltype", and ":elns". This
allows us to refer to QNames with ease.

Take for example the <title> element in the XHTML namespace. In RDF,
this has the QName:-

   [ a :ExpEType; :type "title";
     :ns "http://www.w3.org/1999/xhtml" ] .

Taking the example from the XMLNS specification:-

 <section xmlns="urn:com:books-r-us">
   <title>Book-Signing Event</title>
   <signing>
     <author title="Mr" name="Vikram Seth" />
     <book title="A Suitable Boy" price="$22.95" />
   </signing>
  </section>

this has the QNames:-

[ a :ExpEType; :type "section"; :ns "urn:com:books-r-us" ] .
[ a :ExpEType; :type "title"; :ns "urn:com:books-r-us" ] .
[ a :ExpEType; :type "signing"; :ns "urn:com:books-r-us" ] .
[ a :ExpEType; :type "author"; :ns "urn:com:books-r-us" ] .
[ a :ExpAName; :name "title"; :eltype "author"; :elns
"urn:com:books-r-us" ] .
[ a :ExpAName; :name "name"; :eltype "author"; :elns
"urn:com:books-r-us" ] .
[ a :ExpEType; :type "book"; :ns "urn:com:books-r-us" ] .
[ a :ExpAName; :name "title"; :eltype "book"; :elns
"urn:com:books-r-us" ] .
[ a :ExpAName; :name "price"; :eltype "book"; :elns
"urn:com:books-r-us" ] .

This makes associations such as:-

 [ a :ExpEType; :type "label"; :ns "http://example.org/#" ]
   daml:equivalentTo
     [ a :ExpEType; :type "title"; :ns
"http://www.w3.org/1999/xhtml" ] .

remarkably trivial.

Here's a short, non-complete (missing cardinalities) schema for the
terms:-

   :QName daml:unionOf (:ExpEType :ExpAName) .
   :ns rdfs:domain :QName; rdfs:range rdfs:Literal .
   :type rdfs:domain :ExpEType; rdfs:range rdfs:Literal .
   :name rdfs:domain :ExpAName; rdfs:range rdfs:Literal .
   :eltype rdfs:domain :ExpAName; rdfs:range rdfs:Literal .
   :elns rdfs:domain :ExpAName; rdfs:range rdfs:Literal .

Although I'm not sure what namespace one would use for these terms.

BTW, going by this, it doesn't bother me too much that the
concatenation mechanism is so different from the QNames mechanism,
because the dataset of triples that is generated from XML RDF is not
the same as the expanded element types and attribute names that you
get from parsing the document tree as XML. Also, it is clearly
possible to map QNames into triples.

cf. [3], which is when I got started on this rant.

[1] http://www.w3.org/TR/1999/REC-xml-names-19990114/#ns-expnames
[2] http://lists.w3.org/Archives/Public/www-rdf-interest/2000Jul/0045
[3] "21:36:09" onwards in
http://ilrt.org/discovery/chatlogs/rdfig/2001-06-18.txt

--
Kindest Regards,
Sean B. Palmer
@prefix : <http://webns.net/roughterms/> .
:Sean :hasHomepage <http://purl.org/net/sbp/> .

Received on Monday, 18 June 2001 19:35:18 UTC