Skip to content

Commit

Permalink
Further nice enhancements and corrections
Browse files Browse the repository at this point in the history
  • Loading branch information
wendellpiez committed May 23, 2024
1 parent bf8327f commit 0a541d0
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 7 deletions.
16 changes: 12 additions & 4 deletions profile-resolution/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -108,17 +108,25 @@ Actually three variant subpipelines are provided, each for a different use case.

### Running the pipeline locally using its XSLT driver

### Calling the driver stylesheet in from a remote location
If you have run the [setup/GRAB-PROFILE-RESOLVER-XSLT.xpl](setup/GRAB-PROFILE-RESOLVER-XSLT.xpl) pipeline successfully, you have copies of the XSLT needed for profile resolution, and can execute it locally.

### Running the pipeline as a sequence of discrete transformation steps
(Or if you acquire copies for yourself, of course.)

The pipeline [src/apply-profile-resolver.xpl](rc/apply-profile-resolver.xpl) executes this transformation sequence using the top-level [lib/resolver-xslt/oscal-profile-RESOLVE.xsl](lib/resolver-xslt/oscal-profile-RESOLVE.xsl) XSLT.

### Calling the driver stylesheet in from a remote location

The pipeline [src/apply-remote-profile-resolver.xpl](rc/apply-remote-profile-resolver.xpl) calls the same XSLT from its Github repository home, to be delivered to the pipeline at runtime.

## Credits for contributors
### Running the pipeline as a sequence of discrete transformation steps

This pipeline runs XSLT distributed by the OSCAL team, originally developed by Wendell Piez, with subsequent testing and development by Amanda Galtman.
Alternatively, the pipeline [src/apply-profile-resolver-stepwise.xpl](src/apply-profile-resolver-stepwise.xpl) executes profile resolution as a chain of transformations, not a single call on an XSLT to execute an internal pipeline.

This is expected to be useful for debugging and analysis, as well as a demonstration of composition in XSLT and XProc working together.

## Contributors

The software runs XSLT distributed by the OSCAL team, originally developed by Wendell Piez, with further testing and development by Amanda Galtman.


started 20240523
Expand Down
1 change: 1 addition & 0 deletions profile-resolution/src/apply-profile-resolver-stepwise.xpl
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
</p:xslt>
<p:xslt name="metadata" message="{$prefix} -- tagging metadata">
<p:with-input port="stylesheet" href="../lib/resolver-xslt/oscal-profile-resolve-metadata.xsl"/>
<p:with-option name="parameters" select="map { 'uuid-method': 'random-xslt' }"/>
</p:xslt>
<p:xslt name="merge" message="{$prefix} -- structuring result catalog">
<p:with-input port="stylesheet" href="../lib/resolver-xslt/oscal-profile-resolve-merge.xsl"/>
Expand Down
1 change: 1 addition & 0 deletions profile-resolution/src/apply-profile-resolver.xpl
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@

<p:xslt name="resolve">
<p:with-input port="stylesheet" href="{$xslt}"/>
<p:with-option name="parameters" select="map { 'uuid-method': 'random-xslt' }"/>
</p:xslt>

</p:declare-step>
6 changes: 3 additions & 3 deletions profile-resolution/src/apply-remote-profile-resolver.xpl
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
<?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:cx="http://xmlcalabash.com/ns/extensions"
<p:declare-step version="3.0" xmlns:p="http://www.w3.org/ns/xproc"
xmlns:c="http://www.w3.org/ns/xproc-step"
xmlns:ox="http://csrc.nist.gov/ns/oscal-xproc3"
type="ox:apply-remote-profile-resolver"
name="apply-remote-profile-resolver">
Expand All @@ -20,6 +19,7 @@

<p:xslt name="resolve">
<p:with-input port="stylesheet" href="{ $xslt }"/>
<p:with-option name="parameters" select="map { 'uuid-method': 'random-xslt' }"/>
</p:xslt>

</p:declare-step>
1 change: 1 addition & 0 deletions template/GRAB-RESOURCES.xpl
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
<resource dir="oscal-converters">oscal_catalog_xml-to-json-converter.xsl</resource>
<resource dir="oscal-converters">oscal_catalog_json-to-xml-converter.xsl</resource>
<resource dir="oscal-schemas">oscal_catalog_schema.xsd</resource>
<resource dir="oscal-schemas">oscal_profile_schema.xsd</resource>
<resource dir="oscal-schemas">oscal_catalog_schema.json</resource>
</download>
</p:inline>
Expand Down

0 comments on commit 0a541d0

Please sign in to comment.