W3C home > Mailing lists > Public > www-p3p-policy@w3.org > April 2006

Re: # in data ref/def

From: Rigo Wenning <rigo@w3.org>
Date: Sun, 2 Apr 2006 23:52:26 +0200
To: "Ja Nee" <brijnaald@gmail.com>
Cc: www-p3p-policy@w3.org
Message-Id: <200604022352.36866@rigo>
Am Wednesday 29 March 2006 14:03, sprach Ja Nee:
> I have a question about the usage of the # in a data-ref
>
> You can define a data element as:
>
> <DATA-DEF name="car" structref="#vehicle"/>
>
> If you refer to it you do it as follows:
> <DATA-REF name="#car"/>
>
> So I noticed in every example that in the DEF-part no # is used. In
> the REF-part, it is always used.

This follows the XML notation. An id/anchor of XML is defined by giving it a 
name, thus name="car". But the reference to it follows the URI notation in 
RFC 3986. The # indicates the so called "fragment identifier". This means 
that the anchor is in the same document/hierarchy. So #car just identifies 
just a fragment of the new data structure defined in <DATA-DEF..
>
> Am I correct in this? Is there a 'formal' reason about this (I have to
> explain it in a paper)?

The formal reason is the XML Specification and the URI RFC. You'll find the 
answers there. 

Best, 

Rigo

Received on Sunday, 2 April 2006 21:52:49 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 17 January 2012 12:13:11 GMT