[oXygen-user] ID a selection of tags?

Oxygen XML Editor Support support at oxygenxml.com
Wed Oct 10 03:08:05 CDT 2012


Hi,

There is a way to do this in the Author mode for DITA documents, but it 
doesn't have the exact granularity that you want.

1. In the Author mode (Document > Edit mode > Author) go to main menu > 
DITA > ID Options and add there the element name or class value for the 
elements that you want the ID for. In your case, for "uicontrol" you can 
add the class: "ui-d/uicontrol". You may want to remove other 
elements/class values found there if your selection intersects any of them.
Regarding the ID Pattern, this allows 3 macros:
 - ${localName} which is the local name of the element (e.g. "uicontrol")
 - ${id} which is a compact unique identifier (e.g. "jjk_yfv_vh")
 - ${uuid} which is a universally unique identifier (e.g. 
"eb7b7697-e8ea-4156-814b-1db622155a97").
I recommend the compact unique identifier (e.g. "ui_${id}")

2. To assign the IDs, select the region that contains all the elements 
involved, right click on the selection and from the contextual menu use 
the "Generate IDs".

Let me know if you need additional assistance.

Regards,
Adrian

Adrian Buza
oXygen XML Editor and Author Support

Tel: +1-650-352-1250 ext.202
Fax: +40-251-461482
support at oxygenxml.com
http://www.oxygenxml.com


KAATMAN Matthew wrote:
> Is there a way to highlight a group of tags and automatically assign IDs?
>
> I have a collection of ~60 uicontrols in a topic.
>
>   <p><uicontrol>4</uicontrol></p>
>   <p><uicontrol>12</uicontrol></p>
>   <p><uicontrol>24</uicontrol></p>
>   <p><uicontrol>60 Sec Prime</uicontrol></p>
>   <p><uicontrol>1000</uicontrol></p>
>   <p><uicontrol>A</uicontrol></p>
>   <p><uicontrol>ABCDE</uicontrol></p>
>   <p><uicontrol>Add</uicontrol></p>
>
> I'd like to autoassign an id based on the text something like id="ui_4". 
>
> Maybe a prefix and suffix field that I could populate where prefix = ui_ and suffix = <text>.
>
> Before I reinvent the wheel, I was curious if oxygen had a mechanism to do this.
>
> I think I can do this fairly easily with a regex replace if that's the best method.
>
> Thanks!
> Matt
>
> AVIS : Ce courrier et ses pieces jointes sont destines a leur seul destinataire et peuvent contenir des informations confidentielles appartenant a bioMerieux. Si vous n'etes pas destinataire, vous etes informe que toute lecture, divulgation, ou reproduction de ce message et des pieces jointes est strictement interdite. Si vous avez recu ce message par erreur merci d'en prevenir l'expediteur et de le detruire, ainsi que ses pieces jointes.
> NOTICE: This message and attachments are intended only for the use of their addressee and may contain confidential information belonging to bioMerieux. If you are not the intended recipient, you are hereby notified that any reading, dissemination, distribution, or copying of this message, or any attachment, is strictly prohibited. If you have received this message in error, please notify the original sender immediately and delete this message, along with any attachments.
>
>
> _______________________________________________
> oXygen-user mailing list
> oXygen-user at oxygenxml.com
> http://www.oxygenxml.com/mailman/listinfo/oxygen-user
>
>   



More information about the oXygen-user mailing list