Home › Forums › DITA and XMetaL Discussion › Custom CSS and PI’s: little big problem › Reply To: Custom CSS and PI’s: little big problem
Reply to: Custom CSS and PI’s: little big problem
September 17, 2012 at 5:45 amHere's a script example of something that might get you close to what you need:
[code]//XMetaL Script Language JScript:
var rng = ActiveDocument.Range;
var nodes = ActiveDocument.getNodesByXpath(“//topic/processing-instruction('mypi')/../title”);
for(i=0;irng.SelectNodeContents(nodes(i));
rng.ContainerStyle=”background-color:green; color:white;”;
}[/code]
Thank you. Have to try this as soon as possible.