W3C home > Mailing lists > Public > www-rdf-interest@w3.org > April 2004

Re: Expressing triples with special characters in URLs

From: Jeremy Carroll <jjc@hplb.hpl.hp.com>
Date: Fri, 02 Apr 2004 20:08:21 +0100
Message-ID: <406DBA25.20103@hplb.hpl.hp.com>
To: Jakob <jakob.voss@s1999.tu-chemnitz.de>
Cc: www-rdf-interest@w3.org

Jakob wrote:
> Hi,
> 
> As far as I do understand the way to express a triple in XML is
> 
> <rdf:Description rdf:about="http://www.mydomain.com/my_subject.html">
>   <predicates:my-predicate 
>      rdf:resource="http://www.mydomain.com/my_object.html"/>
> </rdf:Description>
> 
> Since characters of XML-Tagnames are more restricted than characters in URLs I
> wonder how to express triples where the predicate URL contains special
> characters like ':', '&' and '%'? Its not quite common but possible for some
> nodes (especially in my application ;-)
> 
> Thanks a lot,
>   Jakob Voss
> 

It's OK as long as the predicate ends in a NCName (e.g. a single letter)

_:a http://example.org/x%20y&z "" .

can be written

<rdf:Description>
  <eg:z xmlns:eg="http://example.org/x%20y&amp;"/>
</rdf:Description>

not pretty ... if you have a predicate that does not end in a NCName e.g. 
it ends in a special character or %79 or then it is a known limitation with 
RDF/XML that you can't serialize that.

Jeremy
Received on Friday, 2 April 2004 14:08:44 GMT

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