Boris Goldowsky wrote:
> On Mon, 2011-03-14 at 10:46 +0100, Hussein Shafie wrote: 
>> Given the fact that all elements
>> eventually have unique, automatically generated IDs, is it really
>> important for an author to have access to these IDs, immediately, in
>> real time. I mean, the author inserts a new element and must be
>> immediately be able to use its unique, automatically generated ID, to
>> create a cross-reference for example.
>>
>> If the answer is no, then a validateHook can automatically generate
>> automatic IDs and also can automatically fix duplicate IDs.
> 
> We have this same issue, and would strongly support a change in
> copy/paste that avoided creating duplicate IDs.

We do not plan to implement this feature because:

1) In the vast majority of use cases, IDs are meaningful identifiers,
carefully specified by hand. Therefore, duplicate IDs detected by the
validator are expected to be fixed by hand.

2) More and more documents types (DITA, XHTML5) no longer use true IDs,
in which case such feature does not help at all.

Why don't you replace the stock paste command by a specific paste
command (of course, also called "paste")?

If you have problems in doing this, then please report this as a bug.



> 
> We also already have a validateHook that automatically generates IDs.  I
> see how it could be extended to change one of any pair of duplicate IDs
> found, but I think that half the time it would remove the wrong one --
> that is, if there is a link or reference to the ID (and there very often
> is, in our case), then you want to make sure that the original one
> maintains its ID and thus remains the target of the link, and that the
> new copy gets a new ID.  I am not sure how validateHook could ensure
> that?  Any ideas would be welcome.
> 

That's right, unless you have some custom heuristics, half the time, the
validateHook will indeed replace the wrong ID.



 
--
XMLmind XML Editor Support List
[email protected]
http://www.xmlmind.com/mailman/listinfo/xmleditor-support

Reply via email to