[oXygen-user] Generating IDs on DITA maps

Oxygen XML Editor Support (Radu Coravu)
Wed Apr 15 01:53:44 CDT 2015

Hi Mark,

One alternative would be to create those unique IDs for the index.html 
files directly from the XSLT customization possibly using the 
generate-id() function.

When a DITA Map or topic is opened in the Author editing mode you can 
select various elements in it, right click and choose "Generate IDs".

In Oxygen 17 there will be a new action called "XML refactoring" which 
can be applied on all the maps and topics in your project.
This action will be able to apply various operations on all the 
resources. One of the operation is called "Add/Change attribute" and it 
can add a new attribute with a certain name and value to certain 
elements in the XML content. Your post gave us the idea to also expand 
Oxygen editor variables like "${id}" in the values we allow users to set 
for the attributes. In this way, if we manage to add this extra 
improvement before Oxygen 17 is released, this "XML refactoring" tool 
will also be an alternative to your use case.


Radu Coravu
<oXygen/>  XML Editor, Schema Editor and XSLT Editor/Debugger

On 4/14/2015 10:41 PM, Mark Giffin wrote:
> Hi Radu,
> Thanks for the info. My use case is, I am generating XHTML with the DITA
> OT and importing the files into Drupal. My Drupal developer tells me
> that each HTML file needs to have a globally unique ID, and I want to
> put an id in the index.html files that get generated from maps. (I
> notice that the OT does not put an id in index files, even if an id
> exists in the source DITA map. I'll have to fix that.)
> By the way, is there any way in Oxygen to add IDs to a single file? I
> thought I saw something like that in years past.
> Regards,
> Mark
> On 4/14/2015 2:19 AM, Oxygen XML Editor Support (Radu Coravu) wrote:
>> Hi Mark,
>> You could try to edit the new file template used to create DTD-based
>> DITA Maps:
>>> OXYGEN_INSTALL_DIR\frameworks\dita\templates\map\Map.ditamap
>> and set the ID attribute to use the Oxygen-specific "${id}" editor
>> variable which is expanded when the new file template is used,
>> something like:
>>> <?xml version="1.0" encoding="UTF-8"?>
>>> <!DOCTYPE map PUBLIC "-//OASIS//DTD DITA Map//EN" "map.dtd">
>>> <map id="map_${id}">
>>>  <title>DITA Topic Map</title>
>>> </map>
>> We do not have a way for batch generation of IDs. What is your use
>> case? IDs set on a map root element are not that useful in general.
>> Regards,
>> Radu
>> Radu Coravu
>> <oXygen/>  XML Editor, Schema Editor and XSLT Editor/Debugger
>> http://www.oxygenxml.com
>> On 4/14/2015 9:07 AM, Mark Giffin wrote:
>>> Is there a way to get Oxygen to generate an ID for a new DITA map? It
>>> already does this for topics.
>>> Also, is there a way to batch generate IDs for a whole group of XML
>>> files, like those in a DITA map? I see info on things like "Managing
>>> ID/IDREFS" in the help, but that seems to apply to something else.
>>> Thanks,
>>> Mark
>>> _______________________________________________
>>> oXygen-user mailing list
>>> http://www.oxygenxml.com/mailman/listinfo/oxygen-user
>> _______________________________________________
>> oXygen-user mailing list
>> http://www.oxygenxml.com/mailman/listinfo/oxygen-user

More information about the oXygen-user mailing list