forked from usnistgov/OSCAL
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add possible Schematron documentation checks
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]> Add CI/CD checking of Schematron doc standards checking. Always zip and upload Schematron validation results for potential debug.
- Loading branch information
1 parent
ef62215
commit ef8fa01
Showing
3 changed files
with
69 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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> |