W3C home > Mailing lists > Public > public-rdf-in-xhtml-tf@w3.org > January 2009

Re: Validation issue with the xsi namespace

From: Toby A Inkster <tai@g5n.co.uk>
Date: Wed, 28 Jan 2009 00:18:12 +0000
Message-Id: <8EAA7ED8-8281-4B6E-ADE0-1E23EC80A845@g5n.co.uk>
Cc: RDFa <public-rdf-in-xhtml-tf@w3.org>
To: Stephane Corlosquet <stephane.corlosquet@deri.org>

On 27 Jan 2009, at 17:09, Stephane Corlosquet wrote:

> So far I understand that the xsd and xsi namespaces should be  
> defined as
> follows:
> xmlns:xsd="http://www.w3.org/2001/XMLSchema"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"


> How about the following elements using expanded URIs, are they wrong?
> <size rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">10</ 
> size>
> "System Infrastructure"^^<http://www.w3.org/2001/XMLSchema#string>

These are correct. See http://www.w3.org/TR/xmlschema-2/#built-in- 
datatypes where it says that each datatype "foo" has a URI of <http:// 

> To put the question differently, is there any situation where it makes
> sense to define
>  xmlns:xsd="http://www.w3.org/2001/XMLSchema#"

Yes, RDF.

What you've got to remember is that when people are using XML  
schemas, they are specifically trying to use certain elements and  
attributes defined by the XML schema specs. Thus they have to use the  
XML schema namespaces.

When XSD is used in RDF, people are not trying to do that. They are  
not trying to use the elements or attributes defined in the XML  
schema specs at all. They don't want to use XML schema. They just  
want to reference the URIs for the datatypes. The hash is needed to  
reference them in RDF.

In RDFa, it is proper to use:

   <span property="dc:title" datatype="xsd:string"

However, it is equally proper to use:

   <span property="dc:title" datatype="xsd:ring"


   <span property="dc:title" datatype="xsd:LSchema#string"

All three are considered equivalent.

 > Or are these 'mistakes' due to semweb bad habits?

They are not mistakes in the sense of accidentally using the wrong  
URI. It was arguably a mistake for RDFa and RDF/XML to use XML  
namespaces for prefix binding in the first place though, as it causes  
this kind of confusion. In XML, namespace URIs are opaque identifying  
strings, so have to match the published string character-by- 
character; in RDF, they're not opaque identifiers and can point to  
any partial URI which the author wishes to use as a prefix. In XML, a  
namespace URI is the full URL of a particular resource; in RDF it is  

It helps if you stop thinking of RDF/XML as a type of XML and instead  
think of it as an entirely different format which just happens to  
make some level of sense to XML parsers. Thus while xmlns in RDF  
might look like it should act the same as xmlns in XML, it does not.

Toby A Inkster
Received on Wednesday, 28 January 2009 00:18:59 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:50:30 UTC