Name
p:invisible-xml — The standard p:invisible-xml step.
Synopsis
The p:invisible-xml
step performs Invisible XML processing per
Invisible XML. It transforms a non-XML input into XML by applying
the specified Invisible XML grammar.
Input port | Primary | Sequence | Content types |
---|---|---|---|
grammar | ✔ | text xml | |
source | ✔ | any -xml -html |
Output port | Primary | Sequence | Content types |
---|---|---|---|
result | ✔ | ✔ | any |
Option name | Type | Default value |
---|---|---|
fail-on-error | xs:boolean | true() |
parameters | map(xs:QName, item()*)? | () |
Declaration
1 |<p:declare-step xmlns:p="http://www.w3.org/ns/xproc">
| <p:input port="grammar" sequence="true" content-types="text xml"/>
| <p:input port="source" primary="true" content-types="any -xml -html"/>
| <p:output port="result" sequence="true" content-types="any"/>
5 | <p:option name="parameters" as="map(xs:QName, item()*)?"/>
| <p:option name="fail-on-error" as="xs:boolean" select="true()"/>
|</p:declare-step>
Errors
Code | Description |
---|---|
err:XC0205 | It is a dynamic error (err:XC0205 )
if the source document cannot be parsed by the provided grammar. |
err:XC0211 | It is a dynamic error (err:XC0211 ) if more than one
document appears on the grammar port. |
err:XC0212 | It is a dynamic error (err:XC0212 ) if the grammar
provided is not a valid Invisible XML grammar. |
Description
The p:invisible-xml
step is a
standard XProc 3.1 step.
It is also described on XProcRef.org.
The default Invisible XML implementation in XML Calabash is
NineML. It is also possible to use
Markup Blitz.
In order to use Markup Blitz, you must put the Markup Blitz jar file
(markup-blitz-1.6.jar
) on your class path.
Configuring the Invisible XML Processor
You can specify the default processor by setting the Java system property
“com.xmlcalabash.invisible-xml
” to either
“nineml
” or “markup-blitz
”. If the requested
processor is not available, processing will fallback to the other. (If neither
is available, the step will fail.)
You can also specify the processor on a per-step basis by setting the
extension attribute cx:processor
to
“nineml
” or “markup-blitz
”.
If the Markup Blitz extension step is available, you can also run
cx:markup-blitz
instead of p:invisible-xml
.