Reading DITA-OT variables (en.xml) in Author mode CSS
Posted: Tue Aug 25, 2015 7:27 pm
Dear oXygen team,
in my DITA-OT PDF plugin, I use the Customization/common/vars/en.xml file to add legal content.
The generation of legal content is triggered by data elements in the map file, for example: <data name="disclaimer" value="t001dis102"/>
As the value provides only an ID, I want to show a description of the legal content in Author mode. The description would be something like "Disclaimer on xxx" and is already available in the en.xml file.
I managed this in the css file:
But I did not succeed to generalize it. I tried to use other variables inside the oxy_xpath expression, but it did not work.
I want to do the following:
Best regards,
Jonas
in my DITA-OT PDF plugin, I use the Customization/common/vars/en.xml file to add legal content.
The generation of legal content is triggered by data elements in the map file, for example: <data name="disclaimer" value="t001dis102"/>
As the value provides only an ID, I want to show a description of the legal content in Author mode. The description would be something like "Disclaimer on xxx" and is already available in the en.xml file.
I managed this in the css file:
Code: Select all
*[class ~= "topic/data"][name='disclaimer'][value='t001dis102']{
content:
oxy_editor(
type, text,
edit, "@value",
editable, true,
);
": "
oxy_xpath(
"doc('file:/T:/myDITAFramework/DITA-OT/plugins/myPDFPlugin/Customization/common/vars/en.xml')//*[@id='t001dis102- dt']/text()"
);
;
}
I want to do the following:
- Generalize the statement for any @value attribute. I need to reuse the @value attribute of the data element in my oxy_xpath expression.
- As we are sharing our framework via SVN, I need to access en.xml with an relative path (from the css file or from the framework directory). The following did not work:
- doc('../DITA-OT/plugins/myPDFPlugin/Customization/common/vars/en.xml') --> relative from CSS
- doc('${env(myDITAFramework)}/DITA-OT/plugins/myPDFPlugin/Customization/common/vars/en.xml') --> using environment variable
- using catalog files
- using URL in SVN repository (authentification problems)
Best regards,
Jonas