Oxygen XML Framwork - Build dynamic links
Post here questions and problems related to editing and publishing DITA content.
Oxygen XML Framwork - Build dynamic links
Hi,
I used the following CSS rules in my LESS file to dynamically generate links for an element like this:
Element
CSS
However that was before the release of the Release Management domain. Now I'd like to switch to the Release Management domain, but the pendant is slightly more complex:
Now I'd like to have the same link generator, but that would mean, that I'd need to read the value of a different element in a CSS rule of another element. I need to walk from <change-request-id> to <change-request-system>.
tl;dr question: Can I use XPATH expressions in CSS rules (oxy_ Elements)?
I used the following CSS rules in my LESS file to dynamically generate links for an element like this:
Element
Code: Select all
<issue project="project1" number="1234"/>
Code: Select all
*[class ~= "history-d/issue"]:before(5) {
content: "Jira: ";
display: inline-block;
width: 50px;
}
*[class ~= "history-d/issue"]:before(4) {
content: attr(project) "-" attr(number);
link: "http://jira.xxxx.de/browse/" attr(project) "-" attr(number);
color: navy;
display: inline-block;
width: 150px;
float: right;
}
*[class ~= "history-d/issue"]:before(3) {
content: "Projekt: "
oxy_editor(
type, combo,
edit, "project",
editable, true,
values, "project1, project2",
labels, "Project 1, Project 2"
);
display: inline-block;
float: right;
width: 100px;
}
*[class ~= "history-d/issue"]:before(2) {
content: " Nummer: "
oxy_textfield(
edit, "@number",
columns, 4,
values
);
display: inline-block;
float: right;
width: 100px;
}
Code: Select all
<change-request-reference>
<change-request-system>project1</change-request-system>
<change-request-id>1234</change-request-id>
</change-request-reference>
tl;dr question: Can I use XPATH expressions in CSS rules (oxy_ Elements)?
stefan-jung.org – Your DITA/DITA-OT XML consultant
Re: Oxygen XML Framwork - Build dynamic links
Hi Stefan,
You can use our oxy_xpath CSS extension function:
https://www.oxygenxml.com/doc/versions/ ... ction.html
It comes with a penalty hit on the editing side because Oxygen needs to do more computations but DITA topics being small it should not matter much.
Regards,
Radu
You can use our oxy_xpath CSS extension function:
https://www.oxygenxml.com/doc/versions/ ... ction.html
It comes with a penalty hit on the editing side because Oxygen needs to do more computations but DITA topics being small it should not matter much.
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)
- ↳ 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