Reset ID/IDREF when pasting

Are you missing a feature? Request it's implementation here.
Pascale
Posts: 33

Reset ID/IDREF when pasting

Mon Sep 29, 2014 6:38 pm

Would be nice to have the following improvement:
- when pasting an element that contains sub-elements with IDs and sub-elements with IDREF (in the sense of the XML ID and IDREF datatype), could you please reset all the IDs and the corresponding IDREFs so that the cross-references are preserved in the pasted XML and there is no "duplicate ID" error/conflict with the original copy.

Thanks,
Pascale
Radu
Posts: 5208

Re: Reset ID/IDREF when pasting

Tue Sep 30, 2014 8:18 am

Hi Pascale,

In some of the XML vocabularies like DITA, Docbook, TEI for which we have out of the box document type configurations available this removal of IDs when copy/pasting in the Author visual editing mode is done by implementing a special Java extension.
For example you can look in our Author SDK at how the ro.sync.ecss.extensions.dita.id.DITAUniqueAttributesRecognizer is implemented and how it is used from the ro.sync.ecss.extensions.dita.DITAExtensionsBundle.

We could try to also provide a default implementation for this ID attributes removal functionality which would remove all attributes defined as ID-type in the schema. So I will add an improvement request for this.

Regarding IDREFS, the functionality we currently implemented for DITA, Docbook, will not remove them automatically (it only removes IDs) but you can create your own custom Java extension which also tries to remove IDREFS when they refer to IDs in the same copied content. But I don't think we can do this automatically because even if the IDREFs were not removed, they would end up pointing to IDs defined in the original content and it depends whether users would find this useful or not.

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com

Return to “Feature Request”

Who is online

Users browsing this forum: No registered users and 1 guest