W3C home > Mailing lists > Public > www-rdf-logic@w3.org > August 2001

RE: QName URI Scheme Re-Visited, Revised, and Revealing (was RE : De dicated, Standardized URI Scheme for QNames?)

From: <Patrick.Stickler@nokia.com>
Date: Wed, 22 Aug 2001 13:38:45 +0300
Message-ID: <2BF0AD29BC31FE46B78877321144043114BFA6@trebe003.NOE.Nokia.com>
To: Patrick.Stickler@nokia.com, sean@mysterylights.com
Cc: www-rdf-interest@w3.org, www-rdf-logic@w3.org
> Thus, all together, with no loss of lexical distinction:
> 
>    <foo:bar xmlns:foo="urn:abc:foo" foo:bar="..." bas="...">
> 
>    qn:{urn:abc:foo}bar            (element)
>    qn:{urn:abc:foo}@bar           (global attribute)
>    qn:{urn:abc:foo}bar@bas        (per-element attribute)

Of course, being bound to the "Moral" ideal of backwards
compatibility, adopting any alternate (default) mapping
function is not acceptable.

Therefore, to round out this discussion, I'll point out
that my other proposal of a direct mapping construct can
address qname partitions when they are significant to
the knowledge being defined. I.e.


    rdfm:Map              a mapping declaration
    rdfm:resource         the URI of an RDF resource
    rdfm:namespace        the URI of a namespace
    rdfm:name             a namespace qualified name
    rdfm:value            a literal CDATA value in the XML instance
    rdfm:property         the URI of an RDF property serving as context for
                             literal CDATA values in the XML instance
    rdfm:pattern          a regular expression pattern matching CDATA
                             in the XML instance
    rdfm:type             either 'element' or (global) 'attribute'

1. Element and Global Attribute Semantically Equivalent (no rdfm:type
specified)

   <rdfm:Map
    rdfm:resource  ="urn:partax:(foo(bar))"
    rdfm:namespace ="urn:partax:(foo)"
    rdfm:name      ="bar"
   />

   <rdf:RDF ... xmlns:foo="urn:partax:(foo)">
      <rdf:Description ID="X">
         <foo:bar>bas</foo:bar>
      </rdf:Description>
   </rdf:RDF>

   [X, urn:partax:(foo(bar)), "bas"]

2. Element and Global Attribute Semantically Different (rdfm:type specified)

   <rdfm:Map
    rdfm:resource  ="urn:partax:(foo(bar))"
    rdfm:namespace ="urn:partax:(foo)"
    rdfm:name      ="bar"
    rdfm:type      ="element"
   />

   <rdfm:Map
    rdfm:resource  ="urn:partax:(foo(boo))"
    rdfm:namespace ="urn:partax:(foo)"
    rdfm:name      ="bar"
    rdfm:type      ="attribute"
   />

   <rdf:RDF ... xmlns:foo="urn:partax:(foo)">
      <rdf:Description ID="X" foo:bar="xyz">
         <foo:bar>bas</foo:bar>
      </rdf:Description>
   </rdf:RDF>

   [X, urn:partax:(foo(bar)), "bas"]
   [X, urn:partax:(foo(boo)), "xyz"]

Frankly, I don't know why anyone would want to do anything like #2, but
if the XML NS allows such a distinction, RDF should IMO preserve it...

--

If no mappings are defined, then folks get the (unsafe and indistinct)
mapping as presently defined by the RDF spec. But, if mappings are
defined, then all conformant RDF parsers will apply them to provide
safe and fully distinct mappings between QNames and URIs.

Thus this original proposal is fully backwards compatible and also solves
all
of the QName to URI mapping problems identified to date (and provides
some lexical level data type validation to boot ;-)

(though personally, I'd prefer to see the qn URI scheme adopted...)

Cheers,

Patrick

--
Patrick Stickler                      Phone:  +358 3 356 0209
Senior Research Scientist             Mobile: +358 50 483 9453
Software Technology Laboratory        Fax:    +358 7180 35409
Nokia Research Center                 Video:  +358 3 356 0209 / 4227
Visiokatu 1, 33720 Tampere, Finland   Email:  patrick.stickler@nokia.com
 
Received on Wednesday, 22 August 2001 06:39:01 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 7 December 2009 10:52:40 GMT