xpath - Schematron assert statement had been fired; where did that happen in the document? -


i highlight parts of xml documents after using multiple validation techniques. locating xsd validation failures in xml poses no problem, erroneous lines can tracked. however, validation steps done schematron assert , report statements. when send current xpath location when assert/report statement fired using diagnostic elements can root when context specific statement.

is there way either line number or xpath string locate schematron assert statement fired?

in svrl (schematron validation report language) report there 'location' attribute returns context of assert/report statement. last bit of path can collected utilizing diagnostic elements , returning current node. way cleaning report text , combining diagnostic still possible save user lengthy error messages , getting parts can used assemble xpath of fired assert/report statement.

<sch:diagnostics>     <sch:diagnostic id="testdiagnostic">         <sch:name path="."/>     </sch:diagnostic> </sch:diagnostics>  <sch:rule context="//element1[element2/element3 = 'trial text']/element4">     <sch:assert test="element5[@name = 'trial text2' , @type = 'trial text3']" diagnostics="testdiagnostic">test feedback.</sch:assert> </sch:rule> 

Comments

Popular posts from this blog

gridview - Yii2 DataPorivider $totalSum for a column -

java - Suppress Jboss version details from HTTP error response -

Sass watch command compiles .scss files before full sftp upload -