Thanks for the idea. Our schema uses RelaxNG, though, so it would be a big 
change to switch to XSD. The text matching enhancement that was requested would 
not, by itself, be enough motivation.


From: Robert Leif []
Sent: Friday, March 09, 2018 11:45 PM
To: Amanda Galtman <>;
Subject: RE: [oXygen-user] CSS background color based on text matches

Hi Amanda
Can you use XSD1.1 instead of Schematron?
Thank you.
Robert C. Leif, Ph.D.<>

From: oXygen-user 
On Behalf Of Amanda Galtman
Sent: Friday, March 9, 2018 10:47 AM
Subject: [oXygen-user] CSS background color based on text matches


We've had a request from an author to make the formatting in the Author view 
indicate when the text of a certain element type does not match the text of 
something else found inside the same topic. I can do this via Oxygen CSS, but I 
am concerned that the processing slows down the opening of large documents. I'm 
not convinced that CSS is a good way to address the underlying requirement 
about helping authors detect when something does not have a textual match as 
expected (e.g., maybe Schematron or a build warning would be more appropriate).

Before I give up, though, I wanted to see if anyone had specific ideas or 
techniques I might have overlooked.

Here's an example of variations I tried that work too slowly in large 
documents, just to give you the flavor.

/*  true => 255*1 => white
*  false => 255*0 => yellow */
refentry[role="function"] literal  {
background-color: oxy_xpath(
"concat('rgb(255,255,', 255 * number(. = ancestor::refentry//term or .='') , 


refentry[role="function"] literal {
background-color: oxy_xpath(
"if (exists(text()) and not(some $n in 
ancestor::refentry/refsect1[@role=('inputs','outputs')]//term satisfies 
string($n)=.)) then ('yellow') else ('')",
oXygen-user mailing list

Reply via email to