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.
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com
Post by Mark GiffinHi 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
Post by Oxygen XML Editor Support (Radu Coravu) Hi Mark,
You could try to edit the new file template used to create DTD-based
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,
<?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
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