Re: RDFa in SKOS Reference

On 15 Dec 2008, at 12:07, Alistair Miles wrote:

>
> Please help!
>
> The XHTML + RDFa doctype now in the SKOS Reference Editors' draft is
> causing me a real headache.
>
> First, amaya (9.55), the editor I normally use for w3 tech reports,
> crashes when it tries to load the document with XHTML + RDFa doctype.
>
> Amaya has no problem if the doctype is reverted to XHTML 1.0
> transitional, but then it strips out all the RDFa attributes it
> doesn't recognise.
>
> Second, OxygenXML (which I use as an alternative to amaya) cannot
> validate the document for a number of reasons.
>
> If I leave the doctype as is and try to validate against the DTD then
> I get validation errors for each of the xmlns:... attributes. This is
> not Oxygen's fault, as described well at
> http://www.oxygenxml.com/forum/topic2603.html. That link also has a
> couple of workarounds, but I had problems with both.
>
> If I try the workaround where you add implied attribute definitions to
> the DTD doctype, e.g.
>
> <?xml version="1.0" encoding="UTF-8"?>
> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML+RDFa 1.0//EN"
>     "http://www.w3.org/MarkUp/DTD/xhtml-rdfa-1.dtd"[
>     <!ATTLIST html xmlns:foaf CDATA #IMPLIED>
>     <!ATTLIST html xmlns:dc CDATA #IMPLIED>
>     ]>
> <html xmlns="http://www.w3.org/1999/xhtml"
>     xmlns:foaf="http://xmlns.com/foaf/0.1/"
>     xmlns:dc="http://purl.org/dc/elements/1.1/" xml:lang="en">
>
> then Oxygen validates fine, but the W3C validator no longer recognises
> the doctype correctly, but tries to validate as XHTML 1.0
> transitional.
>
> If I try to associate an XML schema, e.g.
>
> <?xml version="1.0" encoding="UTF-8"?>
> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML+RDFa 1.0//EN"
>        "http://www.w3.org/MarkUp/DTD/xhtml-rdfa-1.dtd">
> <html xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> xsi:schemaLocation="http://www.w3.org/1999/xhtml http://www.w3.org/ 
> MarkUp/SCHEMA/xhtml-rdfa-1.xsd"
> xmlns:con="http://www.w3.org/2000/10/swap/pim/contact#"
> xmlns="http://www.w3.org/1999/xhtml"
> xmlns:rec="http://www.w3.org/2001/02pd/rec54#"
> xmlns:dct="http://purl.org/dc/terms/"
> xmlns:mat="http://www.w3.org/2002/05/matrix/vocab#"
> xmlns:xsd="http://www.w3.org/2001/XMLSchema#"
> xmlns:owl="http://www.w3.org/2002/07/owl#"
> xmlns:doc="http://www.w3.org/2000/10/swap/pim/doc#"
> xmlns:org="http://www.w3.org/2001/04/roadmap/org#">
> <head>
>   <meta http-equiv="content-type" content="text/html;  
> charset=UTF-8" />
>   <title>SKOS Simple Knowledge Organisation System Reference,  
> Editors' Draft
>   1 October 2008 $Revision: 1.38 $</title>
>   <meta name="generator" content="Amaya 9.54, see http://www.w3.org/ 
> Amaya/" />
>   <link href="extras.css" rel="stylesheet" type="text/css" />
>   <link href="http://www.w3.org/StyleSheets/TR/base" rel="stylesheet"
>   type="text/css" />
>   <script type="text/javascript" src="extras.js"></script>
> </head>
>
> then the script tag at the end of the head section causes the
> following validation error:
>
> [Xerces] cvc-complex-type.3.2.2: Attribute 'xml:space' is not  
> allowed to appear in element 'script'.
>
> I found a suggestion this is something to do with saxon, but If I try
> validating using LIBXML instead of SaxonSA then I get:
>
> [LIBXML]  parser error : Entity 'mdash' not defined
>
> which I gather is a bug in libxml.
>
> This is a mess!
>
> I need to get some work done, so I'm going to use a text editor, and
> rely on the W3C markup validation service to report any errors. Any
> other suggestions warmly welcomed.

Nasty :-(. I have to admit that I've been using emacs to make recent  
changes (since the addition of the RDFa stuff) so I haven't come  
across this as an issue. The W3C validator was happy with the latest  
version of the doc, so I guess you should be able to use that.

Bleeding edge technologies, eh?

	Sean

--
Sean Bechhofer
School of Computer Science
University of Manchester
sean.bechhofer@manchester.ac.uk
http://www.cs.manchester.ac.uk/people/bechhofer

Received on Monday, 15 December 2008 12:36:57 UTC