Hi Scott,
Something like this should work:
Code: Select all
/* Glossary formatting*/
*[class ~= "glossentry/glossentry"] > *[class ~= "glossentry/glossterm"]:before {
content: oxy_xpath("ancestor::*[contains(@class, ' glossentry/glossentry ')]//*[contains(@class, ' glossentry/glossAcronym ')]/text() | ancestor::*[contains(@class, ' glossentry/glossentry ')]//*[contains(@class, ' glossentry/glossAbbreviation ')]/text()") " \2014 " !important;
font-family: 'Arial Unicode MS Bold', 'Arial Bold', sans-serif;
font-weight: bold;
font-style: normal;
}
So what were the problems with your original oxy_xpath?
1) It used simple quotes around its contents but there were other simple quotes inside the XPath expression. So I replaced those simple quotes with double quotes.
2) The current context of the oxy_xpath is the glossterm, so an XPath like this ".//" means match all descendants of "glossterm" which does not match anything. So you need to use something like "ancestor::*[contains(@class, ' glossentry/glossentry ')]//" to match all desdendants of "glossentry ".
3) Your CSS selector did not match anything. After you publish to HTML, in the output folder there is a file called something like
mapName.merged.html. You can open the HTML document and look at its structure, this will give you a more clear idea about what to match. You can also use the CSS inspector to see if you have properly matched nodes. You can also use our XPath view to run XPaths on the HTML structure to make sure the XPath properly selects content.
4) When you use "or" in an XPath expression the entire expression starts returning a boolean value. You should use "|" instead.
https://www.oxygenxml.com/doc/versions/ ... e_css.html
Regards,
Radu