generated from usnistgov/opensource-repo
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Now with complete pipeline producing OSCAL from PDF via HTML and NISO…
… STS intermediates
- Loading branch information
1 parent
92dd0fd
commit 7e61f51
Showing
13 changed files
with
992 additions
and
106 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
<?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:GRAB-FM6-22" | ||
name="GRAB-FM6-22"> | ||
|
||
<!-- =+=+=+=+= HOUSE RULES HALL PASS - remove this comment when the file is committed to the repo =+=+=+=+= --> | ||
|
||
<!-- For samples and boilerplate see file ../projects/xproc-doc/xproc-snippets.xml --> | ||
|
||
<!-- https://rdl.train.army.mil/catalog-ws/view/100.ATSC/3110F413-E915-47C1-85AA-DD4065C654C3-1274570636396/fm6_22.pdf --> | ||
|
||
<p:variable name="FM_6-22" select="'https://rdl.train.army.mil/catalog-ws/view/100.ATSC/3110F413-E915-47C1-85AA-DD4065C654C3-1274570636396/fm6_22.pdf'"/> | ||
|
||
<!-- p:file-copy not working on remote PDF --> | ||
<p:load href="{$FM_6-22}" message="[GRAB-FM6-22] Loading fm6_22.pdf ..."/> | ||
<p:store href="lib/fm6_22.pdf" message="[GRAB-FM6-22] Saving fm6_22.pdf"/> | ||
|
||
</p:declare-step> |
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,37 @@ | ||
<?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:GRAB-RESOURCES" | ||
name="GRAB-RESOURCES"> | ||
|
||
|
||
<!-- Purpose: update local copies of some OSCAL resources from its release repository --> | ||
|
||
<!-- RNG for NISO STS is here: https://niso-sts.org/downloadables/RNGs/v1-2/NISO-STS-interchange-1-2-MathML3-RNG.zip | ||
See decision tree at https://niso-sts.org/DTDs-XSDs-RNGs-1-2.html | ||
--> | ||
<p:variable name="download-path" select="'https://github.com/usnistgov/OSCAL/releases/download/v1.1.2'"/> | ||
|
||
<!-- A $prefix is used to tag messages, expected to match the process type --> | ||
<p:variable name="prefix" select="'[' || 'GRAB-RESOURCES' || ']'"/> | ||
|
||
<p:for-each message="{$prefix} Saving resources in ./lib ..."> | ||
<!-- iterating over each 'resource' as a discrete document node --> | ||
<p:with-input> | ||
<p:document href="{$download-path}/oscal_catalog_schema.xsd"/> | ||
<!--<p:document href="{$download-path}/oscal_profile_schema.xsd"/>--> | ||
</p:with-input> | ||
<p:variable name="filename" select="p:document-property(.,'base-uri') ! replace(.,'.*/','')"/> | ||
|
||
<!-- No exception handling since a failed load often produces a result | ||
making it difficult to anticipate what a failure looks like - --> | ||
<!-- NB - A Schematron error comes back as soon as this is out of line with /*/@type i.e. the file name | ||
- starting the @message with { $prefix } silences the error, but please reset $prefix --> | ||
|
||
<p:store message="{$prefix} ... saving { $filename }" | ||
href="lib/{ $filename }"/> | ||
</p:for-each> | ||
|
||
</p:declare-step> |
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
Oops, something went wrong.