Skip to content

Commit

Permalink
Metaschema XSLT Inspector (usnistgov#73)
Browse files Browse the repository at this point in the history
Several months of work building InspectorXSLT using test-driven-development.
Also includes considerable work on XSpec support including XProc and Saxon runtimes, scripts and CI/CD support.

---------

Co-authored-by: A.J. Stein <[email protected]>
  • Loading branch information
wendellpiez and aj-stein-nist committed Jun 6, 2024
1 parent 04a4a4c commit 9597e80
Show file tree
Hide file tree
Showing 9 changed files with 4,917 additions and 2 deletions.
65 changes: 65 additions & 0 deletions src/schema-gen/InspectorXSLT/testing/OSCAL-INSPECTOR-XSLT.xpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
<?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="1.0"
xmlns:metaschema="http://csrc.nist.gov/ns/metaschema/1.0" type="metaschema:OSCAL-INSPECTOR-XSLT"
name="OSCAL-INSPECTOR-XSLT">

<!-- Purpose: Produces an Inspector XSLT for the OSCAL Catalog metaschema -->
<!-- Input: is hard-wired to a current copy of the metaschema on Github -->
<!-- Output: Writes artifacts to the file system, in 'current' subdirectory -->

<!-- &&& &&& &&& &&& &&& &&& &&& &&& &&& &&& &&& &&& &&& &&& &&& &&& &&& &&& -->
<!-- Ports -->

<p:input port="METASCHEMA" primary="true">
<p:document
href="https://raw.githubusercontent.com/usnistgov/OSCAL/main/src/metaschema/oscal_catalog_metaschema.xml"/>
</p:input>

<p:input port="parameters" kind="parameter"/>

<!-- ports for diagnostics
<p:serialization port="OUT_inspector-xslt" indent="true" method="xml" encoding="us-ascii" omit-xml-declaration="false"/>
<p:output port="OUT_inspector-xslt">
<p:pipe port="OUT_inspector-xslt" step="produce-inspector"/>
</p:output>
<p:serialization port="OUT_inspector-xslt-PATCHED" indent="true" method="xml" encoding="us-ascii" omit-xml-declaration="false"/>
<p:output port="OUT_inspector-xslt-PATCHED" primary="true">
<p:pipe port="result" step="patch-inspector"/>
</p:output>-->


<!-- &&& &&& &&& &&& &&& &&& &&& &&& &&& &&& &&& &&& &&& &&& &&& &&& &&& &&& -->
<!-- Import (subpipeline) -->

<p:import href="../../METASCHEMA-INSPECTOR-XSLT.xpl"/>

<!-- &&& &&& &&& &&& &&& &&& &&& &&& &&& &&& &&& &&& &&& &&& &&& &&& &&& &&& -->
<!-- Pipeline -->

<metaschema:METASCHEMA-INSPECTOR-XSLT name="produce-inspector">
<p:with-option name="xslt-test" select="'skip'"/>
</metaschema:METASCHEMA-INSPECTOR-XSLT>

<p:store href="current/oscal-catalog_inspector-RAW.xsl" indent="true" method="xml"
encoding="us-ascii">
<p:input port="source">
<p:pipe port="OUT_inspector-xslt" step="produce-inspector"/>
</p:input>
</p:store>

<p:xslt name="patch-inspector">
<p:input port="source">
<p:pipe port="OUT_inspector-xslt" step="produce-inspector"/>
</p:input>
<p:input port="stylesheet">
<p:document href="../generator/oscal-inspector-fixup.xsl"/>
<!--<p:document href="../common/no-op.xsl"/>-->
</p:input>
</p:xslt>

<p:store href="current/oscal-catalog_inspector.xsl" indent="true" method="xml"
encoding="us-ascii"/>

</p:declare-step>
Original file line number Diff line number Diff line change
Expand Up @@ -88,4 +88,4 @@
</p:input>
</p:xslt>

</p:declare-step>
</p:declare-step>
2,360 changes: 2,360 additions & 0 deletions src/schema-gen/InspectorXSLT/testing/current/computer_inspector.xsl

Large diffs are not rendered by default.

Large diffs are not rendered by default.

889 changes: 889 additions & 0 deletions src/schema-gen/InspectorXSLT/testing/current/tiny_inspector.xsl

Large diffs are not rendered by default.

Loading

0 comments on commit 9597e80

Please sign in to comment.