Oxygen XML Framwork - Build dynamic links
Posted: Tue Mar 08, 2016 11:39 am
				
				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)?