schematron icon indicating copy to clipboard operation
schematron copied to clipboard

Placeholder in abstract pattern replaced with wrong value

Open dmj opened this issue 6 years ago • 0 comments

Running iso_abstract_expand.xsl on the following Schematron:

<schema xmlns="http://purl.oclc.org/dsdl/schematron">
  <pattern abstract="true" id="abstract">
    <rule context="$ab">
      <assert test="$a"/>
    </rule>
  </pattern>
  <pattern is-a="abstract" id="instance">
    <param name="a" value="x"/>
    <param name="ab" value="yz"/>
  </pattern>
  <properties/>
</schema>

Creates a Schematron where the character sequence '$a' in '$ab' was replaced with the value of the placeholder '$a'.

<schema xmlns="http://purl.oclc.org/dsdl/schematron">
  <!--Suppressed abstract pattern abstract was here-->
  <!--Start pattern based on abstract abstract--><pattern id="instance">
    <rule context="xb">
      <assert test="x"/>
    </rule>
  </pattern>
  <properties/>
</schema>

What happes is that iso_abstract_expand.xsl mistakenly recognizes the '$a' in '$ab' as placeholder $a.

dmj avatar Jan 24 '19 14:01 dmj