Re: Error when trying to create annotations ?

At 01:33 AM 7/28/2003 +0200, Claus wrote:

>Hi again,
>
>Some trial + error revealed that this happens because I use plain html as
>body -- not xhtml.
>By adding "xmlns='http://www.w3.org/1999/xhtml'" to the html tag -- in my
>inline body -- things went well.

I'm not sure I entirely believe this.

There were two problems in the RDF/XML that you included
in your first message [1].  These were related but separate
XML syntax issues, and obscurely identified in the SAX parser errors.

In the two r:type elements you omitted the namespace identifier
for the 'resource' attribute.  Omission of a namespace qualifier
on an RDF attribute when the element itself had an explicit
namespace qualifier was accepted at one time by some parsers
but only due to a misinterpretation of how XML namespaces were
expected to integrate.

All RDF attributes require a namespace identifier, either by using
the default namespace or an explicit namespace prefix.

The second problem was similar to the first; the html elements
also needed a namespace identifier, which your patch supplies.

Only after fixing both of these do I see that
http://annotest.w3.org/annotations accepts a POST of your
example.  (BTW, I also had to unwrap the line that the mailer
wrapped at "<\n/body>" -- I got an internal server error with the \n
in that position; I think this is a bug.)

[1] http://lists.w3.org/Archives/Public/www-annotation/2003JulDec/0019.html

>Is this mandatory? Maybe I have misread the document
>(http://www.w3.org/2002/12/AnnoteaProtocol-20021219) but it sounds to me as
>this is just an option (mentioned in section 2.1.2).

This particular error actually had nothing to do with whether Annotea
requires only XHTML in annotation bodies.  This is a more
subtle question.  RDF requires that anything inside an
rdf:parseType='Literal' be well-formed XML.  Strictly speaking,
HTML is not well-formed XML though it can be made to look
like it is.  But once you do that, you might as well be using XHTML.

In principle, any XML can be used for the body of an Annotation.
That's why we include the http:ContentType property in our
embedded body as well.

>Regards,
>Claus Ljunggren

Received on Wednesday, 30 July 2003 14:01:56 UTC