RE: Annotation highlight PB with unique id

Hi Jose,

Thanks for the explanations! (esp. very good to know that an XML id attribute has to start with a letter, "_" or ":") 
It actually works fine now.


-----Original Message-----
From: [] On Behalf Of Jose Kahan
Sent: jeudi 24 juin 2004 14:06
To: Meunier, Jean-Luc
Cc: ''
Subject: Re: Annotation highlight PB with unique id

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,


Received on Thursday, 24 June 2004 08:22:53 UTC