From a75cddc5155fe7c4ec079c3faf1181b2acbea8db Mon Sep 17 00:00:00 2001 From: Wendell Piez Date: Wed, 2 Jun 2021 00:24:07 -0400 Subject: [PATCH] Further work on docs redesign (#147) * Addressing several small display and linking glitches in docs generation * Docs generation revamp Reworked reference and other pages to sketch - #128 and others --- toolchains/xslt-M4/compose/make-model-map.xsl | 4 +- .../xslt-M4/document/common-reference.xsl | 74 +++++++- .../xslt-M4/document/hugo-css-emulator.xsl | 18 +- .../xslt-M4/document/json/object-map-html.xsl | 2 +- .../document/json/object-reference-html.xsl | 172 +++++++++++++----- .../xslt-M4/document/xml/element-map-html.xsl | 2 +- .../document/xml/element-reference-html.xsl | 54 ++++-- toolchains/xslt-M4/metapath/docs-metapath.xsl | 6 +- .../xslt-M4/write-hugo-metaschema-docs.xpl | 14 +- 9 files changed, 263 insertions(+), 83 deletions(-) diff --git a/toolchains/xslt-M4/compose/make-model-map.xsl b/toolchains/xslt-M4/compose/make-model-map.xsl index 3b0bce441..c9f6efbf5 100644 --- a/toolchains/xslt-M4/compose/make-model-map.xsl +++ b/toolchains/xslt-M4/compose/make-model-map.xsl @@ -15,7 +15,9 @@ - + + + diff --git a/toolchains/xslt-M4/document/common-reference.xsl b/toolchains/xslt-M4/document/common-reference.xsl index 6045e955d..4d0833913 100644 --- a/toolchains/xslt-M4/document/common-reference.xsl +++ b/toolchains/xslt-M4/document/common-reference.xsl @@ -10,10 +10,73 @@ + + + + + + + +
+ +
+
+
+ + + + +

+ OSCAL model + + +

+
+ + +

+ XML namespace + + + + +

+
+ + +

+ JSON Base URI + + + + +

+
+ + + + catalog + profile + component + ssp + poam + assessment-plan + assessment-results + + + + + + +

Schema version: { . }

+
+ + + @@ -34,73 +65,132 @@
- - - -

Schema version: { . }

-
- + + -
-
-
+ + +
+ { if (exists(parent::map)) then 'definition' else 'instance' }-header +
- + toc{ $level} head { @key } - +

+ +

+ +

+ +

+
-
+
- -

See { @_tree-json-id } in the object map.

-
+ + - - - + + + + + +
+ + Properties ({ count( $mine )}) + + +
+
-
+
- + + + + +
+

(array member)

+

+ +

+

+ +

+ +
+ + + +
+ + +
+

(array member or singleton)

+

+ +

+

+ +

+ +
+ + + +
+ + + + + + (global definition) + + + + + { @as-type } + + - + +

-\->

An object { formal-name } { $array-of/name()}s

- +

-\->

A { name(.) } { formal-name }

- -
+

-\-> +
--> - + +

@@ -130,12 +220,12 @@ - + -\-> - - + -\->

@@ -144,15 +234,11 @@
-
- +
--> + + + - - - - - - - - diff --git a/toolchains/xslt-M4/document/xml/element-map-html.xsl b/toolchains/xslt-M4/document/xml/element-map-html.xsl index 370c3b1b3..1134cb3e7 100644 --- a/toolchains/xslt-M4/document/xml/element-map-html.xsl +++ b/toolchains/xslt-M4/document/xml/element-map-html.xsl @@ -74,7 +74,7 @@ div.OM-map p { margin: 0ex }
- + diff --git a/toolchains/xslt-M4/document/xml/element-reference-html.xsl b/toolchains/xslt-M4/document/xml/element-reference-html.xsl index 3ccdcbf9f..bc7340e60 100644 --- a/toolchains/xslt-M4/document/xml/element-reference-html.xsl +++ b/toolchains/xslt-M4/document/xml/element-reference-html.xsl @@ -8,7 +8,44 @@ exclude-result-prefixes="#all"> + + + + xml/reference + json/reference + xml/outline + + ../../../datatypes + + + + +

+ XML Schema + oscal_{$file-map(string(.))}_schema.xsd +

+
+ + +

+ JSON to XML converter + oscal_{$file-map(string(.))}_json-to-xml-converter.xsl (How do I use the converter to convert OSCAL JSON to XML?) +

+
+ + + + +
+
+ Remarks + +
+
+
+
+ @@ -16,10 +53,6 @@ - xml/reference - json/reference - xml/outline - ../ @@ -29,21 +62,10 @@
-
- - - -

Schema version: { . }

-
- @@ -125,7 +147,7 @@ - + diff --git a/toolchains/xslt-M4/metapath/docs-metapath.xsl b/toolchains/xslt-M4/metapath/docs-metapath.xsl index 1c77f795f..946a08bb8 100644 --- a/toolchains/xslt-M4/metapath/docs-metapath.xsl +++ b/toolchains/xslt-M4/metapath/docs-metapath.xsl @@ -8,6 +8,8 @@ + + diff --git a/toolchains/xslt-M4/write-hugo-metaschema-docs.xpl b/toolchains/xslt-M4/write-hugo-metaschema-docs.xpl index b2c1c7fed..5e2c414d8 100644 --- a/toolchains/xslt-M4/write-hugo-metaschema-docs.xpl +++ b/toolchains/xslt-M4/write-hugo-metaschema-docs.xpl @@ -104,9 +104,10 @@ - - - + + + + @@ -177,9 +178,10 @@ - - - + + + +