Skip to content

Commit

Permalink
Add possible Schematron documentation checks
Browse files Browse the repository at this point in the history
This is the product of the meeting and spike where we pair-programmed
and came up with example Schematron rules for tentative editorial
standards that can be used for reviews of models and embedded docs as
part of usnistgov#801.

Co-authored-by: Chris Compton <[email protected]>
Co-authored-by: Rene Rene Tshiteya <[email protected]>
Co-authored-by: Wendell Piez <[email protected]>
  • Loading branch information
4 people committed Oct 11, 2022
1 parent d3309d3 commit 767605b
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions src/utils/schematron/oscal-documentation.sch
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<?xml version="1.0" encoding="UTF-8"?>
<sch:schema xmlns:sch="http://purl.oclc.org/dsdl/schematron" queryBinding="xslt2"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:m="http://csrc.nist.gov/ns/oscal/metaschema/1.0"
xmlns:nm="http://csrc.nist.gov/ns/metaschema"
xmlns:sqf="http://www.schematron-quickfix.com/validator/process"
xmlns:oscal="http://csrc.nist.gov/ns/oscal/1.0">

<sch:ns uri="http://csrc.nist.gov/ns/oscal/metaschema/1.0" prefix="m"/>
<sch:ns uri="http://csrc.nist.gov/ns/metaschema" prefix="nm"/>

<sch:pattern>
<sch:rule context="m:description">
<sch:assert role="error" test="ends-with(.,'.')" id="description-ends-with-dot">Description should end with a period.</sch:assert>
<sch:assert role="error" test="string-length(.) gt 6" id="description-long-enough">Description is too short.</sch:assert>
</sch:rule>
</sch:pattern>
</sch:schema>

0 comments on commit 767605b

Please sign in to comment.