W3C home > Mailing lists > Public > www-amaya@w3.org > January to March 2008

Re: Fwd: Most popular invalid documents on www.w3.org (2008-01-24 at 10:56 GMT)

From: Laurent Carcone <carcone@w3.org>
Date: Sat, 26 Jan 2008 14:48:34 +0100
Message-ID: <479B3A31.20803@w3.org>
To: Amy van der Hiel <amy@w3.org>
Cc: www-amaya@w3.org
Amy van der Hiel a écrit :
>
> Hi Laurent,
>
> Tim's main page was listed as invalid document and so I was trying to 
> fix it.
> <http://www.w3.org/People/Berners-Lee/  >
>
> The validator rejects the use of rdf, I think.  The DTD was HTML 4.01 
> Transitional and I tried changing it to  XHTML 1.0 Transitional but 
> still kept getting errors for the RDF, specifically the first referrer 
> to foaf.
>
> <rdf:RDF xmlns=http://xmlns.com/foaf/0.1/
>     xmlns:con=http://www.w3.org/2000/10/swap/pim/contact#
>     xmlns:dc=http://purl.org/dc/elements/1.1/
>     xmlns:geo=http://www.w3.org/2003/01/geo/wgs84_pos#
>     xmlns:rdf=http://www.w3.org/1999/02/22-rdf-syntax-ns#
>     xmlns:s=http://www.w3.org/2000/01/rdf-schema#>
>         <Person
>             rdf:about=http://www.w3.org/People/Berners-Lee/card#i 
> s:label=Tim
>             Berners-Lee>
>             <con:homePage rdf:resource=""></con:homePage>
>             <made rdf:resource=""></made>
>         </Person>
>     </rdf:RDF>

Hello Amy,

I'm not an expert of RDF, and I don't know if there is a Doctype that 
allows to validate RDF embedded within (X)HTML (I think no one of the 
doctypes proposed by Amaya allows to validate such a document).
Looking at the RDF/XML Syntax Specification [1] and section 9 "Using 
RDF/XML with HTML and XHTML" [2], I read :

"The recommended approach is to not embed RDF/XML in HTML/XHTML but 
rather to use |<link>| element in the |<head>| element of the HTML/HTML 
to point at a separate RDF/XML document. This approach has been used for 
several years by the Dublin Core Metadata Initiative (DCMI) 
<http://www.dublincore.org/> on its Web site.

To use this technique, the |<link>| element |href| should point at the 
URI of the RDF/XML content and the |type| attribute should be used with 
the value of |"application/rdf+xml"|, the proposed MIME type for 
RDF/XML, see Section 4 
<http://www.w3.org/TR/rdf-syntax-grammar/#section-MIME-Type>"

I made a test on a local copy of Tim's page, I put the RDF elements in a 
separate file (see attachement) and add a link in the head section (from 
the source view)
 <link rel="alternate" type="application/rdf+xml" title="RDF Version" 
href="test.rdf">
It passes the validation

Maybe there are other ways to validate such a document. From the section 
9, there is a link about this problem :RDF in HTML: Approaches [3].
I made some tests but haven't found other solution. But, as I said, I'm 
not an expert on RDF :)

Hope this helps

Thanks,
Laurent Carcone

[1] http://www.w3.org/TR/rdf-syntax-grammar/
[2] http://www.w3.org/TR/rdf-syntax-grammar/#section-rdf-in-HTML
[3] http://infomesh.net/2002/rdfinhtml/
>
> I also see that his other page for Kids is also invalid though this 
> isn't related to use of rdf, I don't think.
> <http://www.w3.org/People/Berners-Lee/Kids.html>

Thanks for your help, Frederic.
>
> Can you please advise me as to which DTD I should set as the standard 
> when using amaya or what changes you see, if any, which would fix this?
>
> Thanks very much.
> Amy
>
>




Received on Saturday, 26 January 2008 13:48:53 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 14:53:39 UTC