W3C home > Mailing lists > Public > www-amaya@w3.org > April to June 2004

Re: Annotation highlight PB with unique id

From: Jose Kahan <jose.kahan@w3.org>
Date: Thu, 24 Jun 2004 14:05:21 +0200
To: "Meunier, Jean-Luc" <Jean-Luc.Meunier@xrce.xerox.com>
Cc: "'www-amaya@w3.org'" <www-amaya@w3.org>
Message-ID: <20040624120521.GA14831@inrialpes.fr>

Hello Jean-Luc,

On Wed, Jun 23, 2004 at 05:03:16PM +0200, Meunier, Jean-Luc wrote:
> Oups, I forgot to attach my two test files.

It was easier to understand the problem this way.

> I'm surprised by the behavior of the annotation mechanism when annotated elements have an 'id'. 
> 
> In this case, two issues: 
> 1 - the  annotation symbol (the little orange pen) doesn't appear close to the selection but rather on top left point of the document.

This is a double bug. It's a bug in your xml document because an
XML id attribute has to start with a letter, "_" or ":" , not with a 
digit (see the XML spec). If you change the ids to be conformant, then 
it'll work.

It's a bug in Amaya because it detects that your XML file is wrong,
but doesn't stop and give you a warning, it just continues and
generates the annotation.


> 2 - In the list of annotations (from the "View:show links" menu), if I click the left-part of the annotation, then the whole document is highlighted instead of
> the selected part. 

I think this is related to 1. too because I can't reproduce it.

> In absence of id, the highlight works fine and the little pen is properly positionated. 
> 
> My personal problem is that I'm interested in getting xpointer values referring to the element's id rather than expressions like: xpointer(/A[1]/C[1]).
> Actually, I probably can compute one from the other. Any hints on how to do this easily? 

I think that using IDs is the best solution if you want to have
fine-grained annotations of documents whose structure may change with
time. This way you won't loose them. There's a special Amaya function
to help generate ID values:

	Links / Add/Remove IDs

It may be useful or not to you, depending on your context.

Hope this helps,

-jose
Received on Thursday, 24 June 2004 08:05:44 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Thursday, 20 September 2007 14:24:37 GMT