Home › Forums › XMetaL Tips and Tricks › CSS: Hiding Specific PIs and Styling Selected PIs Differently › Reply To: CSS: Hiding Specific PIs and Styling Selected PIs Differently
Reply to: CSS: Hiding Specific PIs and Styling Selected PIs DifferentlyMarch 8, 2014 at 12:39 am
I think granular control like this would require scripting.
Your script could search the entire document for PIs that match your requirements and then set the CSS using Range.ContainerStyle for those you wish to style. The DOM APIs have nodeName and nodeValue properties that return target and data values (when the node is a PI). You could parse those values as strings and ignore any portions that are not relevant. Various different APIs will allow you to find PIs and move a Range object to them (which is required if you want to use ContainerStyle).
You would probably really want to check with your users to see if they require this feature before going through all the trouble it would require to design and code it.