Schematron / schematron

Schematron "skeleton" - XSLT implementation
MIT License
93 stars 45 forks source link

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

Open dmj opened 4 years ago

dmj commented 4 years ago

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.