You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/content/reference/datatypes.md
+12-14Lines changed: 12 additions & 14 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -574,26 +574,25 @@ In JSON Schema, this is represented as:
574
574
575
575
## Markup Data Types
576
576
577
-
Structured prose text in OSCAL is designed to map cleanly to equivalent subsets of HTML and Markdown. This allows HTML-like markup to be incorporated in OSCAL XML-based content using an element set maintained in the OSCAL namespace. This HTML-equivalent element set is not intended to be treated directly as HTML, but to be readily and transparently converted to HTML (or other presentational formats) as needed. Similarly, OSCAL uses a subset of Markdown for use in OSCAL JSON- and YAML-based content. A mapping is supported between the HTML-like element set and the Markdown syntax, which supports transparent and lossless bidirectional mapping between both OSCAL markup representations.
577
+
Structured prose text is designed to map cleanly to equivalent subsets of HTML and Markdown. This allows HTML-like markup to be incorporated in OSCAL XML-based content using an element set maintained in the OSCAL namespace. This HTML-equivalent element set is not intended to be treated directly as HTML, but to be readily and transparently converted to HTML (or other presentational formats) as needed. Similarly, OSCAL uses a subset of Markdown for use in OSCAL JSON- and YAML-based content. A mapping is supported between the HTML-like element set and the Markdown syntax, which supports transparent and lossless bidirectional mapping between both markup representations.
578
578
579
-
The OSCAL HTML-like syntax supports:
579
+
The HTML-like syntax supports:
580
580
581
581
- HTML paragraphs (`p`), headers (`h1`-`h6`), tables (`table`), preformatted text (`pre`), code blocks (`code`), and ordered and unordered lists (`ol` and `ul`.)
582
582
583
583
- Within paragraphs or text content: `a`, `img`, `strong`, `em`, `b`, `i`, `sup`, `sub`.
584
584
585
+
In remarks below and throughout this documentation, this element set may be referred to as "prose content" or "prose". This tag set (and Markdown equivalent) is defined as a module.
585
586
586
-
In remarks below and throughout this documentation, this element set may be referred to as "prose content" or "prose". A future OSCAL could support the definition of this tag set (and Markdown equivalent) as a module, enabling our HTML subset to be switched out for something else. (Its prose model would be different from OSCAL prose as currently defined.)
587
+
Note that elements such as `div`, `blockquote`, `section` or `aside`, used in HTML to provide structure, are *not permitted*. Instead, structures should be represented using specific model elements (or objects in JSON) such as `part`, which can include prose.
587
588
588
-
Note that elements such as `div`, `blockquote`, `section` or `aside`, used in HTML to provide structure, are *not permitted in OSCAL*. Structures in OSCAL should be represented using OSCAL elements (or objects in JSON) such as`part`, which can include prose.
589
+
In addition, there are contexts where prose usage may be further constrained. For example, at a higher level (outside the base schema) an application could forbid the use of prose headers `h1-h6` in favor of nested`part` elements with their own titles.
589
590
590
-
In addition, there are contexts in OSCAL where prose usage may be further constrained. For example, at a higher level (outside the base schema) an OSCAL application could forbid the use of prose headers `h1-h6` in favor of nested OSCAL `part` elements with their own titles.
591
-
592
-
The OSCAL Markdown syntax is loosely based on CommonMark. When in doubt about Markdown features and syntax, we look to CommonMark for guidance, largely because it is more rigorously tested than many other forms of Markdown.
591
+
The Markdown syntax is loosely based on [CommonMark](https://commonmark.org/). When in doubt about Markdown features and syntax, we look to CommonMark for guidance, largely because it is more rigorously tested than many other forms of Markdown.
593
592
594
593
### markup-line
595
594
596
-
The following table describes the equivalent constructs in HTML and Markdown used in OSCAL within the `markup-line` data type.
595
+
The following table describes the equivalent constructs in HTML and Markdown used within the `markup-line` data type.
597
596
598
597
| Markup Type | HTML | Markdown |
599
598
|:--- |:--- |:--- |
@@ -608,13 +607,13 @@ The following table describes the equivalent constructs in HTML and Markdown use
| Link | <a *href*="*url*">*text*</a> | \[*text*](*url*)
610
609
611
-
Note: Markdown does not have an equivalent of the HTML <i> and <b> tags, which indicate italics and bold respectively. These concepts are mapped in OSCAL markup text to <em> and <strong>[common mark](https://spec.commonmark.org/0.29/#emphasis-and-strong-emphasis), which render equivalently in browsers, but do not have exactly the same semantics. While this mapping is imperfect, it represents the common uses of these HTML tags.
610
+
Note: Markdown does not have an equivalent of the HTML <i> and <b> tags, which indicate italics and bold respectively. These concepts are mapped in markup text to <em> and <strong>(see [common mark](https://spec.commonmark.org/0.29/#emphasis-and-strong-emphasis)), which render equivalently in browsers, but do not have exactly the same semantics. While this mapping is imperfect, it represents the common uses of these HTML tags.
612
611
613
612
#### Parameter Insertion
614
613
615
614
The OSCAL catalog, profile, and implementation layer models allow for control parameters to be defined and injected into prose text.
616
615
617
-
Parameter injection is handled in OSCAL as follows using the <code><insert></code> tag, where you must provide its <code>type</code> and the identifier reference with <code>id-ref</code>:
616
+
Reference injection is handled using the <code><insert></code> tag, where you must provide its <code>type</code> and the identifier reference with <code>id-ref</code>:
618
617
619
618
```html
620
619
This implements <inserttype="param"id-ref="pm-9_prm_1"/> as required to address organizational changes.
@@ -677,14 +676,14 @@ Tables are also supported by `markup-multiline` which are mapped from Markdown t
677
676
- The first row in a Markdown table is considered a header row, with each cell mapped as a <th>.
678
677
- The alignment formatting (second) row of the Markdown table is not converted to HTML. Formatting is currently ignored.
679
678
- Each remaining row is mapped as a cell using the <td> tag.
680
-
- HTML `colspan` and `rowspan` are not supported by Markdown, and so are excluded from OSCAL.
679
+
- HTML `colspan` and `rowspan` are not supported by Markdown, and so are excluded from use.
681
680
682
-
OSCAL attempts to support simple tables mainly due to the prevalence of tables in legacy data sets. However, producers of OSCAL data should note that when they have tabular information, these are frequently semantic structures or matrices that can be described directly in OSCAL as named parts and properties or as parts, sub-parts and paragraphs. This ensures that their nominal or represented semantics are accessible for processing when this information would be lost in plain table cells. Table markup should be used only as a fallback option when stronger semantic labeling is not possible.
681
+
Simple tables are mainly supported due to the prevalence of tables in legacy data sets. However, producers of OSCAL data should note that when they have tabular information, these are frequently semantic structures or matrices that can be described directly in OSCAL as named parts and properties or as parts, sub-parts and paragraphs. This ensures that their nominal or represented semantics are accessible for processing when this information would be lost in plain table cells. Table markup should be used only as a fallback option when stronger semantic labeling is not possible.
683
682
684
683
Tables are mapped from HTML to Markdown as follows:
685
684
686
685
* Only a single header row <tr><th> is supported. This row is mapped to the Markdown table header, with header cells preceded, delimited, and terminated by `|`.
687
-
* The second row is given as a sequence of `---`, as many as the table has columns, delimited by single `|`. In Markdown, a simple syntax here can be used to indicate the alignment of cells; OSCAL HTML does not support this feature.
686
+
* The second row is given as a sequence of `---`, as many as the table has columns, delimited by single `|`. In Markdown, a simple syntax here can be used to indicate the alignment of cells; the HTML binding does not support this feature.
688
687
* Each subsequent row is mapped to the Markdown table rows, with cells preceded, delimited, and terminated by `|`.
689
688
690
689
For example:
@@ -706,7 +705,6 @@ Is mapped to the Markdown table:
706
705
| Have some of | Try all of |
707
706
```
708
707
709
-
710
708
#### Line feeds in Markdown
711
709
712
710
Additionally, line feed (LF) characters must be escaped as "\\n" when appearing in string contents in JSON and (depending on placement) in YAML. In Markdown, the line feed is used to delimit paragraphs and other block elements, represented using markup (tagging) in the XML version. When transcribed into JSON, these LF characters must also appear as "\\n".
0 commit comments