Page 1 of 1

Automatic population of xs:id attributes

Posted: Mon Sep 21, 2015 10:28 pm
by MaNI
Hello,

Is there some way to configure oXygen to auto populate a specific xs:id attribute when new nodes are added to the document? (For regular XML not DITA, TEI, docbook...)

I've been searching but can't find anything - it seems that for DITA etc. there are ways to set it but I don't understand why this would be DITA specific?

Re: Automatic population of xs:id attributes

Posted: Tue Sep 22, 2015 2:30 pm
by Radu
Hi,

Are you editing the custom XML document in the Text or in the Author editing mode?

Indeed right now we have automatic ID generation only for some vocabularies which are bundled with Oxygen like DITA or Docbook. And this only works in the Author editing mode.
Maybe the easiest way for you to do this would be to define a new code template in the Oxygen Preferences->Editor / Templates / Code Templates page which would insert something like:

Code: Select all

<tagName id="${id}"></tagName>
In the Text editing mode you can press CTRL-SPACE to show all code templates and the code template will be automatically expanded on insertion.
In the Author editing mode you can press ENTER and the code template should also be present there.

Regards,
Radu