Skip to content

Commit

Permalink
Link repairs; further validation protection enhancements
Browse files Browse the repository at this point in the history
  • Loading branch information
wendellpiez committed Aug 15, 2024
1 parent 3194e53 commit 00e3b79
Show file tree
Hide file tree
Showing 10 changed files with 16 additions and 13 deletions.
11 changes: 7 additions & 4 deletions testing/VALIDATION-FILESET-READYCHECK.xpl
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<p:declare-step xmlns:p="http://www.w3.org/ns/xproc" xmlns:c="http://www.w3.org/ns/xproc-step" version="3.0"
xmlns:ox="http://csrc.nist.gov/ns/oscal-xproc3" type="ox:VALIDATION-FILESET-READYCHECK"
name="VALIDATION-FILESET-READYCHECK">
xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
name="VALIDATION-FILESET-READYCHECK">

<!-- For PRE-VALIDATING the validation (House Rules) file set -->

Expand All @@ -28,14 +29,16 @@
message="[VALIDATION-FILESET-READYCHECK] Attempting to validate { base-uri(/*) } against { $schematron-path }">
<p:with-input port="schema" href="{$schematron-path}"/>
</p:validate-with-schematron>
<p:filter select="//svrl:failed-assert/svrl:text | //svrl:successful-report/svrl:text" xmlns:svrl="http://purl.oclc.org/dsdl/svrl">
<p:filter select="//svrl:failed-assert/svrl:text | //svrl:successful-report/svrl:text" >
<p:with-input port="source" pipe="report@fileset-validate"/>
</p:filter>
</p:for-each>

<p:wrap-sequence wrapper="report"/>

<p:identity name="final" message="[VALIDATION-FILESET-READYCHECK] Validation run complete"/>

<p:string-replace match="svrl:text" replace="'[[--- HOUSE RULES FAIL ---]] ' || string(.)"/>

<p:identity name="final" message="[VALIDATION-FILESET-READYCHECK] Validation run complete: file sets all checked"/>

</p:declare-step>

2 changes: 1 addition & 1 deletion testing/xproc3-house-rules.sch
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@
<sch:rule context="/*">
<sch:assert role="warning" test="base-uri(.) = $listed-uris or comment()[1]/(contains(.,'HALLPASS') and contains(.,'FILESET_XPROC3_HOUSE-RULES.xpl') )">file <sch:value-of select="$filename"/> isn't listed in validation set maintained in FILESET_XPROC3_HOUSE-RULES.xpl - should it be? (But expect CI/CD errors if a listed XProc is not also committed to the branch.)</sch:assert>

<sch:let name="unexpected-prefixes" value="in-scope-prefixes(.)[not(.=('','p','c','ox','xml','xsl','x','xs','html'))]"/>
<sch:let name="unexpected-prefixes" value="in-scope-prefixes(.)[not(.=('','p','c','ox','xml','xsl','x','xs','html','svrl','xvrl'))]"/>
<sch:report test="$unexpected-prefixes => exists()">We want to see only 'p', 'c' and 'ox', 'xsl' and 'x' namespace prefixes assigned at the top of an XProc (so far, for this repository): this file has <sch:value-of select="$unexpected-prefixes => string-join(', ')"/></sch:report>
<sch:assert sqf:fix="sqf-make-version-3" test="@version = '3.0'">Expecting XProc 3.0, not <sch:value-of select="@version"/></sch:assert>
</sch:rule>
Expand Down
2 changes: 1 addition & 1 deletion tutorial/PRODUCE-TUTORIAL-MARKDOWN.xpl
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@
<p:with-input port="insertion">
<p:inline>
<blockquote>
<p><i>Warning:</i> this Markdown file will be rewritten under continuous deployment (CD): edit the source in <a href="../../{substring-after($path,$project-uri)}">{substring-after($path,$project-uri)}</a>.</p>
<p><i>Warning:</i> this Markdown file will be rewritten under continuous deployment (CD): edit the source in <a href="../../..{substring-after($path,$project-uri)}">{substring-after($path,$project-uri)}</a>.</p>
<p>To create a persistent copy (for example, for purposes of annotation) save this file out elsewhere, and edit the copy.</p>
</blockquote>
</p:inline>
Expand Down
2 changes: 1 addition & 1 deletion tutorial/sequence/Lesson01/setup_101.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

> *Warning:* this Markdown file will be rewritten under continuous deployment (CD): edit the source in [/tutorial/source/setup/setup_101_src.html](../..//tutorial/source/setup/setup_101_src.html).
> *Warning:* this Markdown file will be rewritten under continuous deployment (CD): edit the source in [/tutorial/source/setup/setup_101_src.html](../../../tutorial/source/setup/setup_101_src.html).
>
To create a persistent copy (for example, for purposes of annotation) save this file out elsewhere, and edit the copy.
Expand Down
2 changes: 1 addition & 1 deletion tutorial/sequence/Lesson01/setup_102.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

> *Warning:* this Markdown file will be rewritten under continuous deployment (CD): edit the source in [/tutorial/source/setup/setup_102_src.html](../..//tutorial/source/setup/setup_102_src.html).
> *Warning:* this Markdown file will be rewritten under continuous deployment (CD): edit the source in [/tutorial/source/setup/setup_102_src.html](../../../tutorial/source/setup/setup_102_src.html).
>
To create a persistent copy (for example, for purposes of annotation) save this file out elsewhere, and edit the copy.
Expand Down
2 changes: 1 addition & 1 deletion tutorial/sequence/Lesson01/setup_599.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

> *Warning:* this Markdown file will be rewritten under continuous deployment (CD): edit the source in [/tutorial/source/setup/setup_599_src.html](../..//tutorial/source/setup/setup_599_src.html).
> *Warning:* this Markdown file will be rewritten under continuous deployment (CD): edit the source in [/tutorial/source/setup/setup_599_src.html](../../../tutorial/source/setup/setup_599_src.html).
>
To create a persistent copy (for example, for purposes of annotation) save this file out elsewhere, and edit the copy.
Expand Down
2 changes: 1 addition & 1 deletion tutorial/sequence/Lesson02/unpack_101.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

> *Warning:* this Markdown file will be rewritten under continuous deployment (CD): edit the source in [/tutorial/source/unpack/unpack_101_src.html](../..//tutorial/source/unpack/unpack_101_src.html).
> *Warning:* this Markdown file will be rewritten under continuous deployment (CD): edit the source in [/tutorial/source/unpack/unpack_101_src.html](../../../tutorial/source/unpack/unpack_101_src.html).
>
To create a persistent copy (for example, for purposes of annotation) save this file out elsewhere, and edit the copy.
Expand Down
2 changes: 1 addition & 1 deletion tutorial/sequence/Lesson02/unpack_102.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

> *Warning:* this Markdown file will be rewritten under continuous deployment (CD): edit the source in [/tutorial/source/unpack/unpack_102_src.html](../..//tutorial/source/unpack/unpack_102_src.html).
> *Warning:* this Markdown file will be rewritten under continuous deployment (CD): edit the source in [/tutorial/source/unpack/unpack_102_src.html](../../../tutorial/source/unpack/unpack_102_src.html).
>
To create a persistent copy (for example, for purposes of annotation) save this file out elsewhere, and edit the copy.
Expand Down
2 changes: 1 addition & 1 deletion tutorial/sequence/Lesson02/unpack_599.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

> *Warning:* this Markdown file will be rewritten under continuous deployment (CD): edit the source in [/tutorial/source/unpack/unpack_599_src.html](../..//tutorial/source/unpack/unpack_599_src.html).
> *Warning:* this Markdown file will be rewritten under continuous deployment (CD): edit the source in [/tutorial/source/unpack/unpack_599_src.html](../../../tutorial/source/unpack/unpack_599_src.html).
>
To create a persistent copy (for example, for purposes of annotation) save this file out elsewhere, and edit the copy.
Expand Down
2 changes: 1 addition & 1 deletion tutorial/sequence/Lesson03/oscal-convert_101.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

> *Warning:* this Markdown file will be rewritten under continuous deployment (CD): edit the source in [/tutorial/source/oscal-convert/oscal-convert_101_src.html](../..//tutorial/source/oscal-convert/oscal-convert_101_src.html).
> *Warning:* this Markdown file will be rewritten under continuous deployment (CD): edit the source in [/tutorial/source/oscal-convert/oscal-convert_101_src.html](../../../tutorial/source/oscal-convert/oscal-convert_101_src.html).
>
To create a persistent copy (for example, for purposes of annotation) save this file out elsewhere, and edit the copy.
Expand Down

0 comments on commit 00e3b79

Please sign in to comment.