[RSS-DEV] validating foaf and using trustweb

Dan Brickley danbri at w...
Wed Nov 20 16:29:11 UTC 2002

Hi there,

On Wed, 20 Nov 2002, Bill Kearney wrote:

> I'm curious about an error message from the validator:
> http://www.w3.org/RDF/Validator/
> When I validate this:
> http://www.ideaspace.net/users/wkearney/foaf2.xrdf
> I get this warning message:
> Warning: {W108} Not an XML Name: '#wkearney99'[Line = 42, Column = 38]
> What does this mean? And should I care? What's the right way to express this
> otherwise?

The problem is this:
<foaf:knows rdf:ID="#wkearney99" />

rdf:ID most usually appears on XML elements that stand for nodes in the
RDF graph, and takes as its value things that are XML Names. So the parser
is complaining because the value you give begins with the '#' character
which isn't allowed in XML Name.

A second error is that you've used rdf:ID on an element that stands for an
edge (ie. property) in the RDF graph. You can do this in RDF, but it means
that you're giving an ID to your use of the RDF statement that the
property is being used in (ie. 'reification').

The correct usage for your app would be:

<foaf:knows rdf:resource="#wkearney99" />

This might seem complex, but has a close analogy in HTML:

<a name="wkearney99">Information about Bill</a>

<a href="#wkearney99">A link to Bill</a>

Hope this helps,


ps. spec reference:

2.14 Abbreviating URIs - rdf:ID and xml:base
7.2.35 Production rdf-id
An attribute ·string-value· matching any legal [XML-NS] token NCName
NCName ::= (Letter | '_') (NCNameChar)*

> -Bill Kearney
> To unsubscribe from this group, send an email to:
> rss-dev-unsubscribe at egroups.com
> Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/

More information about the foaf-dev mailing list