schematron icon indicating copy to clipboard operation
schematron copied to clipboard

Validation stylesheet fails to run if assertion test contains literal curly brackets

Open dmj opened this issue 5 years ago • 0 comments

Example:

<s:schema xmlns:s="http://purl.oclc.org/dsdl/schematron" xmlns="http://www.w3.org/1999/xhtml" queryBinding="xslt2">
  <s:ns prefix="c" uri="http://www.w3.org/ns/xproc-step"></s:ns>
  <s:pattern>
    <s:rule context="/">
      <s:assert test="result">Root element is not 'result'.</s:assert>
      <s:assert test="result/text()='}text{'">The text child of result is not 'text'.</s:assert> 
    </s:rule>
  </s:pattern>
</s:schema>

It is the report generation part: It creates a validation stylesheet that contains a literal copy of the @test attribute. The XSL processor interprets the curly brackets as AVTs.

dmj avatar Apr 06 '20 12:04 dmj