Skip to content

Commit

Permalink
Refining markdown export
Browse files Browse the repository at this point in the history
  • Loading branch information
wendellpiez committed Aug 31, 2017
1 parent 6f1deab commit 1f9fd9a
Show file tree
Hide file tree
Showing 3 changed files with 79 additions and 126 deletions.
32 changes: 16 additions & 16 deletions OSCAL-dev.xpr
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<scenarioAssociation-array>
<scenarioAssociation>
<field name="url">
<String>working/doc/schema/oscal-oscal.xml</String>
<String>working/lib/XSLT/html-to-markdown.xsl</String>
</field>
<field name="scenarioIds">
<list>
Expand Down Expand Up @@ -38,6 +38,21 @@
</list>
</field>
</scenarioAssociation>
<scenarioAssociation>
<field name="url">
<String>working/doc/schema/oscal-oscal.xml</String>
</field>
<field name="scenarioIds">
<list>
<String>Run schema production pipeline</String>
</list>
</field>
<field name="scenarioTypes">
<list>
<String>XPROC</String>
</list>
</field>
</scenarioAssociation>
<scenarioAssociation>
<field name="url">
<String>working/SP800-53/SP800-53-OSCAL-refined.xml</String>
Expand Down Expand Up @@ -203,21 +218,6 @@
</list>
</field>
</scenarioAssociation>
<scenarioAssociation>
<field name="url">
<String>working/lib/XSLT/html-to-markdown.xsl</String>
</field>
<field name="scenarioIds">
<list>
<String>Run schema production pipeline</String>
</list>
</field>
<field name="scenarioTypes">
<list>
<String>XPROC</String>
</list>
</field>
</scenarioAssociation>
<scenarioAssociation>
<field name="url">
<String>working/lib/util/utility.xq</String>
Expand Down
165 changes: 55 additions & 110 deletions working/doc/schema/oscal-tag-library.md
Original file line number Diff line number Diff line change
@@ -1,114 +1,59 @@


[OSCAL: The Open Security Controls Assessment Language](#)

[OSCAL namespace](#oscal-namespace)

[OSCAL organization](#oscal-organization)

[Interoperability with other data formats](#interoperability-with-other-data-formats)

[Controls and control components](#controls-and-control-components)

[&lt;catalog> Catalog](#catalog-catalog)

[&lt;collection> Collection](#collection-collection)

[&lt;control> Control](#control-control)

[&lt;subcontrol> Control extension](#subcontrol-control-extension)

[&lt;prop> Property](#prop-property)

[&lt;param> Parameter](#param-parameter)

[&lt;part> Part](#part-part)

[&lt;link> Link](#link-link)

[Functional elements](#functional-elements)

[&lt;insert> Parameter insertion](#insert-parameter-insertion)

[&lt;withdrawn> Withdrawn](#withdrawn-withdrawn)

[Declarations elements](#declarations-elements)

[&lt;declarations> Declarations](#declarations-declarations)

[&lt;declare-prop> Property declaration](#declare-prop-property-declaration)

[&lt;declare-p> Paragraph declaration](#declare-p-paragraph-declaration)

[&lt;declare-part> Part declaration](#declare-part-part-declaration)

[&lt;declare-link> Link declaration](#declare-link-link-declaration)

[&lt;singleton> Singleton constraint](#singleton-singleton-constraint)

[&lt;required> Requirement constraint](#required-requirement-constraint)

[&lt;identifier> Identifier constraint](#identifier-identifier-constraint)

[&lt;regex> Regular expression constraint](#regex-regular-expression-constraint)

[&lt;value> Value constraint](#value-value-constraint)

[&lt;autonum> Autonumbered (generated) value](#autonum-autonumbered-(generated)-value)

[&lt;inherit> Inherited value](#inherit-inherited-value)

[&lt;desc> Parameter description](#desc-parameter-description)

[Structural elements](#structural-elements)

[&lt;section> Section](#section-section)

[&lt;group> Group](#group-group)

[&lt;title> Title](#title-title)

[&lt;references> References](#references-references)

[&lt;ref> Reference](#ref-reference)

[&lt;std> Standard](#std-standard)

[&lt;citation> Citation](#citation-citation)

[Prose](#prose)

[&lt;p> Paragraph](#p-paragraph)

[&lt;pre> Preformatted text](#pre-preformatted-text)

[&lt;ol> Ordered List](#ol-ordered-list)

[&lt;ul> Unordered list](#ul-unordered-list)

[&lt;li> List item](#li-list-item)

[&lt;em> Emphasis](#em-emphasis)

[&lt;i> Italics](#i-italics)

[&lt;b> Bold](#b-bold)

[&lt;a> Anchor](#a-anchor)

[&lt;q> Quoted text](#q-quoted-text)

[&lt;code> Code](#code-code)

[&lt;sup> Superscript](#sup-superscript)

[&lt;sub> Subscript](#sub-subscript)

[&lt;span> Span](#span-span)

[Structural constraints](#structural-constraints)

[Order of items inside controls](#)
> * [OSCAL: The Open Security Controls Assessment Language](#)
> * [OSCAL namespace](#oscal-namespace)
> * [OSCAL organization](#oscal-organization)
> * [Interoperability with other data formats](#interoperability-with-other-data-formats)
> * [Controls and control components](#controls-and-control-components)
> * [&lt;catalog> Catalog](#catalog-catalog)
> * [&lt;collection> Collection](#collection-collection)
> * [&lt;control> Control](#control-control)
> * [&lt;subcontrol> Control extension](#subcontrol-control-extension)
> * [&lt;prop> Property](#prop-property)
> * [&lt;param> Parameter](#param-parameter)
> * [&lt;part> Part](#part-part)
> * [&lt;link> Link](#link-link)
> * [Functional elements](#functional-elements)
> * [&lt;insert> Parameter insertion](#insert-parameter-insertion)
> * [&lt;withdrawn> Withdrawn](#withdrawn-withdrawn)
> * [Declarations elements](#declarations-elements)
> * [&lt;declarations> Declarations](#declarations-declarations)
> * [&lt;declare-prop> Property declaration](#declare-prop-property-declaration)
> * [&lt;declare-p> Paragraph declaration](#declare-p-paragraph-declaration)
> * [&lt;declare-part> Part declaration](#declare-part-part-declaration)
> * [&lt;declare-link> Link declaration](#declare-link-link-declaration)
> * [&lt;singleton> Singleton constraint](#singleton-singleton-constraint)
> * [&lt;required> Requirement constraint](#required-requirement-constraint)
> * [&lt;identifier> Identifier constraint](#identifier-identifier-constraint)
> * [&lt;regex> Regular expression constraint](#regex-regular-expression-constraint)
> * [&lt;value> Value constraint](#value-value-constraint)
> * [&lt;autonum> Autonumbered (generated) value](#autonum-autonumbered-(generated)-value)
> * [&lt;inherit> Inherited value](#inherit-inherited-value)
> * [&lt;desc> Parameter description](#desc-parameter-description)
> * [Structural elements](#structural-elements)
> * [&lt;section> Section](#section-section)
> * [&lt;group> Group](#group-group)
> * [&lt;title> Title](#title-title)
> * [&lt;references> References](#references-references)
> * [&lt;ref> Reference](#ref-reference)
> * [&lt;std> Standard](#std-standard)
> * [&lt;citation> Citation](#citation-citation)
> * [Prose](#prose)
> * [&lt;p> Paragraph](#p-paragraph)
> * [&lt;pre> Preformatted text](#pre-preformatted-text)
> * [&lt;ol> Ordered List](#ol-ordered-list)
> * [&lt;ul> Unordered list](#ul-unordered-list)
> * [&lt;li> List item](#li-list-item)
> * [&lt;em> Emphasis](#em-emphasis)
> * [&lt;i> Italics](#i-italics)
> * [&lt;b> Bold](#b-bold)
> * [&lt;a> Anchor](#a-anchor)
> * [&lt;q> Quoted text](#q-quoted-text)
> * [&lt;code> Code](#code-code)
> * [&lt;sup> Superscript](#sup-superscript)
> * [&lt;sub> Subscript](#sub-subscript)
> * [&lt;span> Span](#span-span)
> * [Structural constraints](#structural-constraints)
> * [Order of items inside controls](#)
# OSCAL: The Open Security Controls Assessment Language

Expand Down
8 changes: 8 additions & 0 deletions working/lib/XSLT/html-to-markdown.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,14 @@
<xsl:apply-templates/>
</xsl:template>

<xsl:template match="p[@class='toc-line']">
<xsl:value-of select="$lf1"/>
<xsl:text>> </xsl:text>
<xsl:for-each select="ancestor::div[@class='toc']" xml:space="preserve"> </xsl:for-each>
<xsl:text>* </xsl:text>
<xsl:apply-templates/>
</xsl:template>

<xsl:template match="p">
<xsl:value-of select="$lf2"/>
<xsl:apply-templates/>
Expand Down

0 comments on commit 1f9fd9a

Please sign in to comment.