W3C home > Mailing lists > Public > www-annotation@w3.org > January to June 2001

Re: Annotea JavaScript client for IE

From: Matthew Wilson <matthew@mjwilson.demon.co.uk>
Date: Wed, 30 May 2001 19:46:51 +0100
Message-Id: <4.3.2.7.1.20010530193944.00b27990@pop3.demon.co.uk>
To: Marja-Riitta Koivunen <marja@w3.org>, "Claus Augusti" <caugusti@formatvorlage.de>, <www-annotation@w3.org>
At 11:51 30/05/01 -0400, Marja-Riitta Koivunen wrote:
>I'm really happy about this work. This is just great!
>
>At 02:00 PM 5/30/01 +0200, Claus Augusti wrote:
> >Hi Manos,
> >
> >>
> >> Apologies for the possibly naive question, but I am still too busy to
> >> study the annotea systems in depth so...
> >> In the hypothetical situation of using browser sniffing and providing
> >> the relative code (in IE's case, yours) will there be any problems on
> >> different browsers annotating the same documents?
> >Yes, during testing I discovered some problems that I didn't expect. It's
> >about implicit elements, which are inserted by the Browser while parsing the
> >doc, e.g. Amaya adds a <tbody> to a table body, even if it's not explicitly
> >there, IE doesn't. Practically this means, that you can't annotate a table's
> >content element if the path doesn't contain an id attribute defining element
> >before tbody. Actually this makes selection level annotations pretty useless
> >on not properly coded documents. Any ideas? On the other side, I assume this
> >situation not to occur very often, which other elements could be inserted
> >implicitly?

Annozilla gets away with it because the DOM methods say that there is a 
TBODY element even if there is not one in the document. I raised this issue 
on the list a while ago because I thought it needed clarification.

>I'll ask about this from the Amaya team. My personal view is that the
>document is invalid without tbody and it is helpful that it corrects it
>when I update the document, but I don't think Amaya should add it to
>XPointers until it really is in the document.

I haven't looked at how the IE client works, but in Annozilla, I use the 
DOM to work out an XPointer for the selected text. (Actually this is not in 
a released version yet, it will be in the next version...) Consequently I 
am at the mercy of whatever the DOM methods return.

An HTML document can be valid with a <table> but no <tbody> - in fact I 
think they can even miss out <html>, <head> and <body>, and all of these 
will be implicitly created. I had thought that the DOM specs mandate this 
behaviour, but having a quick look now I can't find a reference to this. 
I'm sure it's in one of the W3C specs though.

(In a working draft of DOM requirements 
http://www.w3.org/TR/2001/WD-DOM-Requirements-20010419/ there is:
Implied elements are exposed even if not explicitly defined in the document 
(e.g., HTML, HEAD, BODY).

(Section 2.1.2 item 3).)


>We are also trying to find out what the opinion of the involved working
>groups are about using XPointer with HTML documents.
>
>Marja

This is why I think the Annotea specs need to say more than "we use 
XPointers to define the annotated section".

Matthew
Received on Wednesday, 30 May 2001 14:47:04 GMT

This archive was generated by hypermail 2.2.0 + w3c-0.30 : Friday, 25 March 2005 11:19:17 GMT