W3C home > Mailing lists > Public > public-grddl-comments@w3.org > April to June 2007

RE: issue-dbooth-10: Does an XML namespace necessarily imply semantics?

From: Booth, David (HP Software - Boston) <dbooth@hp.com>
Date: Fri, 25 May 2007 12:15:49 -0400
Message-ID: <EBBD956B8A9002479B0C9CE9FE14A6C202B1643A@tayexc19.americas.cpqcorp.net>
To: <public-grddl-comments@w3.org>
Cc: "Jeremy Carroll" <jjc@hpl.hp.com>, "McBride, Brian" <brian.mcbride@hp.com>

While I was preparing the message below, DanC replied to Jeremy's query
on this, saying that the WG and TAG had considered this question, and an
XML namespace on the root element *does* imply a certain set of
semantics:
http://lists.w3.org/Archives/Public/public-grddl-wg/2007May/0071.html

FWIW, I agree with the TAG's position on this, so the only remaining
question for the GRDDL WG is whether the GRDDL spec should include a
warning about this.  Actually, I think the best approach might be to
include a brief explanation of this in the GRDDL primer.

David Booth, Ph.D.
HP Software
+1 617 629 8881 office  |  dbooth@hp.com
http://www.hp.com/go/software
 

> -----Original Message-----
> From: public-grddl-comments-request@w3.org 
> [mailto:public-grddl-comments-request@w3.org] On Behalf Of 
> Booth, David (HP Software - Boston)
> Sent: Friday, May 25, 2007 11:50 AM
> To: public-grddl-comments@w3.org
> Cc: Jeremy Carroll; McBride, Brian
> Subject: issue-dbooth-10: Does an XML namespace necessarily 
> imply semantics?
> 
> 
> This is a personal comment -- not on behalf of HP.  
> 
> This is the formal submission of the comment Jeremy already 
> sent to the
> WG on my behalf:
> http://lists.w3.org/Archives/Public/public-grddl-wg/2007May/0061.html
>   
> Does an XML namespace necessarily imply a certain set of semantics?
> Suppose Freddy at example.org defines a convenient XML schema for
> writing a person's legal residence ("a:primaryAddress") a 
> vacation home
> address ("a:secondaryAddress"), such as:
> 
> <a:root xmlns:a="http://example.org/AddressSchema.xml">
>   <a:primaryAddress>25 Park St, Rochester, NY</a:primaryAddress>
>   <a:secondaryAddress>88 Spring St, Salem, MA</a:secondaryAddress>
> </a:root>
> 
> Freddy makes the XML schema definition downloadable from the namespace
> URI, and separately provides prose documentation to his users 
> explaining
> the meaning and purpose of a:primaryAddress and a:secondaryAddress in
> his application.  In essence, Freddy's app treats this document as
> though it had made the following assertions:
> 
>   foo:_lucy foo:legalResidence "25 Park St, Rochester, NY".
>   foo:_lucy foo:vacationAddress "88 Spring St, Salem, MA".
> 
> Later, Ralph needs a schema for billing and shipping addresses and he
> notices that Freddy's AddressSchema has the exact form he needs:
> a:primaryAddress could represent the billing address and
> a:secondaryAddress could represent the shipping address.  In other
> words, Ralph wishes to reuse the syntax only.  (This is analogous to
> implementation inheritance in OO programming.)  Raph notes that an XML
> schema only defines the structure of a document -- not the 
> semantics --
> and the namespace spec does not seem to say anything about 
> the semantics
> of a namespace either.  Ralph reuses Freddy's schema by reference, and
> provides separate prose documentation to his users explaining that the
> syntax (only) of Freddy's schema is being reused but the semantics are
> to be the semantics specified by Ralph.  Example:
> 
> <a:root xmlns:a="http://example.org/AddressSchema.xml">
>   <a:primaryAddress>123 Winter St, Palo Alto, CA</a:primaryAddress>
>   <a:secondaryAddress>444 El Camino, San Diego, 
> CA</a:secondaryAddress>
> </a:root>
> 
> In essence, Ralph's app treats this document as though it had made the
> following assertions:
> 
>   fum:_desi fum:billingAddress "123 Winter St, Palo Alto, CA".
>   fum:_desi fum:shippingAddress "444 El Camino, San Diego, CA".
> 
> Later Freddy decides to update his XML schema document at
> http://example.org/AddressSchema.xml to declare a GRDDL transformation
> in the namespace document such that the above example would be GRDDL
> transformed to RDF.  Ralph may have no knowledge of GRDDL and may be
> unaware of this change, but suddenly Ralph's documents gain the
> semantics of Freddy's documents according to the GRDDL spec.
> Questions
> Was Ralph wrong to re-use Freddy's namespace and syntax schema while
> imparting his own semantics to that schema?  If so, what spec forbids
> this?  (Presumably this is a question for the W3C TAG.)
> 
> My own view at present is that a namespace should be viewed 
> as implying
> the semantics that its owner declares, regardless of whether GRDDL is
> used.  Hence, Ralph should not give his document different semantics
> than Freddy somehow specifies via his namespace document.  If Freddy's
> semantics are not clear to Ralph, then Ralph should not use Freddy's
> namespace, due to the risk of guessing wrong.
> 
> However, since I do not at present see anything in the 
> namespace spec or
> the WebArch that forbids this kind of syntax-only reuse, perhaps the
> GRDDL spec should address the possibility of its allowance.  
> If so, what
> should the GRDDL spec say?
> 
> Option 1: Add some warning text in the spec.  This might include
> suggesting that GRDDL aware agents check last modified times 
> on docs and
> namespace docs, but this does not seem like it would be reliable.
> 
> Option 2: Record a postponed issue (possibly to be referred 
> to the TAG).
> 
> At present I think either option would be okay.
> 
> 
> David Booth, Ph.D.
> HP Software
> +1 617 629 8881 office  |  dbooth@hp.com
> http://www.hp.com/go/software
> 
> 
Received on Friday, 25 May 2007 16:18:29 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 8 January 2008 14:11:43 GMT