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. 



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

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 20:01:09 UTC