Auto-generate ${uuid} with same value in 2 places
Posted: Wed Dec 21, 2022 5:17 pm
Hello Team ,
We have our custom doc templates where set a custom id to new topics , I do that using addCustomEditorVariablesResolver function based on this
code :https://github.com/digicademy/CustomUUI ... nsion.java.
this works fine where every time when we creat new topic the new UUID generated and assigned as id.
here we have another requirement , we wanted the same UUID to placed for title
and the title is something should always starts with TITLE_${customUUID}
so here topic id is F503DC44-9A8F-4043-92D1-6B95CD92D003
then title id we need TITLE_F503DC44-9A8F-4043-92D1-6B95CD92D003 (same UUID)
would you please help us here.
We have our custom doc templates where set a custom id to new topics , I do that using addCustomEditorVariablesResolver function based on this
code :https://github.com/digicademy/CustomUUI ... nsion.java.
Code: Select all
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE topic PUBLIC "-//COMPANY//DTD myCustom DITA Topic//EN" "myCustomTopic.dtd">
<topic id="${customUUID}" format="dita" type="topic">
<title></title>
<body></body>
</topic>
here we have another requirement , we wanted the same UUID to placed for title
and the title is something should always starts with TITLE_${customUUID}
Code: Select all
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE topic PUBLIC "-//COMPANY//DTD myCustom DITA Topic//EN" "myCustomTopic.dtd">
<topic id="${customUUID}" format="dita" type="topic">
<title id="TITLE_${customUUID}"></title>
<body></body>
</topic>
then title id we need TITLE_F503DC44-9A8F-4043-92D1-6B95CD92D003 (same UUID)
would you please help us here.