Skip to content

Commit

Permalink
Schematron now reports duplicate definitions in a Metaschema as an er…
Browse files Browse the repository at this point in the history
  • Loading branch information
wendellpiez authored and david-waltermire committed Aug 26, 2019
1 parent 58d9de3 commit d80479c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion build/metaschema/lib/metaschema-check.sch
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,8 @@
<sch:pattern>

<sch:rule context="m:define-assembly | m:define-field | m:define-flag">
<sch:assert role="warning" test="count(key('definition-by-name',@name)) = 1">Definition for '<sch:value-of select="@name"/>' is not unique in this metaschema module (only the last one found will be used)</sch:assert>
<!-- $compleat assembles all definitions from all modules (in metaschema-compose.xsl) -->
<sch:assert test="count(key('definition-by-name',@name,$compleat)) = 1">Definition for '<sch:value-of select="@name"/>' is not unique in this metaschema module.</sch:assert>
<sch:assert test="exists(m:formal-name)">formal-name missing from <sch:name/></sch:assert>
<sch:assert test="exists(m:description)">description missing from <sch:name/></sch:assert>
<sch:assert test="empty(self::m:define-assembly) or exists(m:model)">model missing from <sch:name/></sch:assert>
Expand Down

0 comments on commit d80479c

Please sign in to comment.