This specification describes the optional text related XProc steps. A machine-readable description of these steps may be found in steps.xpl.
Familarity with the general nature of [XProc 3.0] steps is assumed; for background details, see [XProc 3.0 Steps].
The p:markdown-to-html
step converts a text document in Markdown to XHTML.
<p:declare-step
type
="
p:markdown-to-html
"
>
<p:input
port
="
source
"
primary
="
true
"
content-types
="
text
"
/>
<p:output
port
="
result
"
primary
="
true
"
content-types
="
html
"
/>
<p:option
name
="
parameters
"
as
="
map(xs:QName, item()*)?
"
/>
</p:declare-step>
The p:markdown-to-html
step transforms a text document containing
Markdown, for example [CommonMark], into HTML.
The flavor(s) of Markdown supported and the parameters allowed are
implementation-defined..
Document properties
No document properties are preserved.
These steps can raise dynamic errors.
[Definition: A dynamic error is one which occurs while a pipeline is being evaluated.] Examples of dynamic errors include references to URIs that cannot be resolved, steps which fail, and pipelines that exhaust the capacity of an implementation (such as memory or disk space). For a more complete discussion of dynamic errors, see Dynamic Errors in XProc 3.0: An XML Pipeline Language.
If a step fails due to a dynamic error, failure propagates upwards until either a p:try
is
encountered or the entire pipeline fails. In other words, outside of a p:try
, step failure causes the
entire pipeline to fail.
The following errors can be raised by this step:
A. Conformance
Conformant processors must implement all of the features described in this specification except those that are explicitly identified as optional.
Some aspects of processor behavior are not completely specified; those features are either implementation-dependent or implementation-defined.
[Definition: An implementation-dependent feature is one where the implementation has discretion in how it is performed. Implementations are not required to document or explain how implementation-dependent features are performed.]
[Definition: An implementation-defined feature is one where the implementation has discretion in how it is performed. Conformant implementations must document how implementation-defined features are performed.]
The following features are implementation-defined:
- The flavor(s) of Markdown supported and the parameters allowed are implementation-defined. See Section 2, “p:markdown-to-html”.
The following features are implementation-dependent:
B. References
[CommonMark] CommonMark Spec. John MacFarlane. 6 April 2019.
[XProc 3.0] XProc 3.0: An XML Pipeline Language. Norman Walsh, Achim Berndzen, Gerrit Imsieke and Erik Siegel, editors.
[XProc 3.0 Steps] XProc 3.0 Steps: An Introduction. Norman Walsh, Achim Berndzen, Gerrit Imsieke and Erik Siegel, editors.
C. Glossary
- dynamic error
A dynamic error is one which occurs while a pipeline is being evaluated.
- implementation-defined
An implementation-defined feature is one where the implementation has discretion in how it is performed. Conformant implementations must document how implementation-defined features are performed.
- implementation-dependent
An implementation-dependent feature is one where the implementation has discretion in how it is performed. Implementations are not required to document or explain how implementation-dependent features are performed.
D. Ancillary files
This specification includes by reference a number of ancillary files.
- steps.xpl
-
An XProc step library for the declared steps.