I would like to highlight certain parts of XML documents after using multiple validation techniques. Locating XSD validation failures in the XML poses no problem, the erroneous lines can be tracked. However, some validation steps are done by Schematron assert and report statements. When I send back the current XPath location when the assert/report statement was fired by using diagnostic elements I can only get back the root even when the context is very specific for the statement.
Is there any way to get either line number or XPath string to locate where the Schematron assert statement was fired?