Re: make anchor names XML IDs

On Mon, 2002-01-28 at 02:15, Irene Vatton wrote:
> > I just selected "In 2000" and
> > did "make target" in Amaya (5.3 gtk on linux)
> > and it made <a name="2000">In 2000</a>.
> > 
> > Then I think it changed it to
> > <a id="_2000" name="2000">
> > which is goofy.
> 
> If you selected an element instead of a simple text Amaya generated
> an id instead of an anchor.
> We decided that policy because many browsers don't support links to id
> and our users want to generate compatible pages.
> In any case if Amaya generated at the same time a name and an id when a
> link has to be generated we have to decide to use either the name or the id.

Perhaps I wasn't clear; I'm not talking about which attribute
Amaya puts the anchor name in. It seems to choose well enough.

I'm talking about the fact that it chose "2000" as an anchor name,
but "2000" is not an XML ID.

Some part of Amaya knows this, because it didn't just copy "2000"
from the name attribute to the id attribute; it added a _.

Please just add the _ in the first place, i.e.
	<a name="_2000">

> > Whatever algorithm Amaya uses to pick
> > anchor names, please fix it to choose
> > XML IDs.
> 
> Amaya looks for the first word longer than 3 characters then checks
> if this name or id is already used in the document.

Please check that it's an XML ID at this point.

> If it's used it
> adds a code at the end and rechecks.
> 
> > -- 
> > Dan Connolly, W3C http://www.w3.org/People/Connolly/
> > 
> > 
> > 
> 
-- 
Dan Connolly, W3C http://www.w3.org/People/Connolly/

Received on Monday, 28 January 2002 07:34:56 UTC