Reading DITA-OT variables (en.xml) in Author mode CSS
Post here questions and problems related to editing and publishing DITA content.
-
- Posts: 6
- Joined: Wed Jan 21, 2015 12:29 pm
Reading DITA-OT variables (en.xml) in Author mode CSS
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
-
- Posts: 9472
- Joined: Fri Jul 09, 2004 5:18 pm
Re: Reading DITA-OT variables (en.xml) in Author mode CSS
Hi Jonas,
I would do that something like:
So that I can compose the xpath expression using the oxy_concat function and calling other Oxygen functions to get the attribute value and to compute an absolute URL relative to the CSS.
Regards,
Radu
I would do that something like:
Code: Select all
*[class ~= "topic/data"][name='disclaimer'][value]{
content:
oxy_editor(
type, text,
edit, "@value",
editable, true),
": "
oxy_xpath(
oxy_concat("doc('", oxy_url("../../DITA-OT/plugins/myPDFPlugin/Customization/common/vars/en.xml"), "')//*[@id='", attr(value), "- dt']/text()")
);
}
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
Return to “DITA (Editing and Publishing DITA Content)”
Jump to
- Oxygen XML Editor/Author/Developer
- ↳ Feature Request
- ↳ Common Problems
- ↳ DITA (Editing and Publishing DITA Content)
- ↳ Artificial Intelligence (AI Positron Assistant add-on)
- ↳ SDK-API, Frameworks - Document Types
- ↳ DocBook
- ↳ TEI
- ↳ XHTML
- ↳ Other Issues
- Oxygen XML Web Author
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Content Fusion
- ↳ Feature Request
- ↳ Common Problems
- Oxygen JSON Editor
- ↳ Feature Request
- ↳ Common Problems
- Oxygen PDF Chemistry
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Feedback
- ↳ Feature Request
- ↳ Common Problems
- Oxygen XML WebHelp
- ↳ Feature Request
- ↳ Common Problems
- XML
- ↳ General XML Questions
- ↳ XSLT and FOP
- ↳ XML Schemas
- ↳ XQuery
- NVDL
- ↳ General NVDL Issues
- ↳ oNVDL Related Issues
- XML Services Market
- ↳ Offer a Service