Customized ID Generation
Posted: Wed Feb 05, 2020 12:15 am
Oxygen's UI allows us to configure a single pattern to use for all the listed elements in the ID Options dialog. According to the API docs, there's a generateUniqueIDFor method in the DefaultUniqueAttributesRecognizer class, which can be extended to override behavior. Since it's not available in the UI, we'd like to use one pattern for topic-level elements (topic,troubleshooting, reference, task, concept) to include a prefix representing the short-name for the relevant product followed by a logical name for the content. We use a constellation of Git submodules to pull in reused content that's needed for a "host" document.
For other block and inline elements, we'd prefer to leave off such a product-short-name and indicate the element name as the prefix followed by a logical name. We have a custom editor variable for this purpose, named "product-short-name", which is usually the acronym for the product. If we extend the above class, can we access any custom editor variable values within the generateUniqueIDFor method using a corresponding method?
I'd like one our devs to branch into Oxygen extension writing. They already know XSLT, Ant, Python, and Java somewhat. I'm having difficulty reaching the maven repo for the sdk for 21.1.0.2, even with maven proxies defined in my settings.xml, so it would a help if you had an existing sample or could offer a skeletal piece of code to do this. Javascript would be easier.
For other block and inline elements, we'd prefer to leave off such a product-short-name and indicate the element name as the prefix followed by a logical name. We have a custom editor variable for this purpose, named "product-short-name", which is usually the acronym for the product. If we extend the above class, can we access any custom editor variable values within the generateUniqueIDFor method using a corresponding method?
I'd like one our devs to branch into Oxygen extension writing. They already know XSLT, Ant, Python, and Java somewhat. I'm having difficulty reaching the maven repo for the sdk for 21.1.0.2, even with maven proxies defined in my settings.xml, so it would a help if you had an existing sample or could offer a skeletal piece of code to do this. Javascript would be easier.