Name

p:xsl-formatter — The standard p:xsl-formatter step.

Synopsis

The p:xsl-formatter step receives an XSL 1.1 document and renders the content.

Input portPrimarySequenceContent types
source✔  xml 
Output portPrimarySequenceContent types
result✔  any 
Option nameTypeDefault value
content-typexs:string?()
parametersmap(xs:QName,item()*)?()
Declaration
1 |<p:declare-step xmlns:p="http://www.w3.org/ns/xproc">
  |   <p:input port="source" content-types="xml"/>
  |   <p:output port="result" content-types="any"/>
  |   <p:option name="parameters" as="map(xs:QName,item()*)?"/>
5 |   <p:option name="content-type" as="xs:string?"/>
  |</p:declare-step>
Errors
CodeDescription
err:XC0167It is a dynamic error (err:XC0167) if the requested document cannot be produced.
err:XC0204It is a dynamic error (err:XC0204) if the requested content-type is not supported.
err:XD0079It is a dynamic error (err:XD0079) if a supplied content-type is not a valid media type of the form “type/subtype+ext” or “type/subtype”.
Implementation defined features
  • The use of media type parameters on the content-type option is implementation-defined.
  • If the content-type option is not specified, the output type is implementation-defined.
  • A formatter may take any number of optional rendering parameters via the step's parameters; such parameters are defined by the XSL implementation used and are implementation-defined.

Description

XML Calabash supports several XSL formatter implementations. There is also a service provider interface so that additional implementations can be provided by third parties. Several CSS formatters are also supported.

Processors can be selected in the configuration file with the cc:paged-media element as described in the User Guide.

Configuration URIProcessor selected
https://xmlcalabash.com/paged-media/xsl-formatter/antenna-houseAntenna House
https://xmlcalabash.com/paged-media/xsl-formatter/fopApache FOP
Important

You must also obtain and install the relevant processor, configure it on your system, and satisfy its licensing requirements. The XML Calabash distribution includes only the open source Apache FOP processor.

Antenna House

In order to use the Antenna House formatter, you must install and configure Antenna House Formatter.

You can configure the formatter with a configuration property or via the parameters option. The following configuration options are supported:

Property nameType
EmbedAllFontsExstring: “part”, “base14”, or “all”
ExitLevelinteger
ImageCompressioninteger
NoAccessibilityboolean
NoAddingOrChangingCommentsboolean
NoAssembleDocboolean
NoChangingboolean
NoContentCopyingboolean
NoFillFormboolean
NoPrintingboolean
OptionFileURIstring
OwnersPasswordstring
TwoPassFormattingboolean

For more information about these properties, consult the AH Formatter API documentation.

The following content-types are supported:

Content typeAH output format
application/pdf@PDF
application/postscript@PS
application/vnd.inx@INX
application/vnd.mif@MIF
image/svg+xml@SVG
text/plain@TEXT

Apache FOP

You can configure the formatter with a configuration property or via the parameters option. The following configuration options are supported:

Property nameType
Accessibilityboolean
Authorstring
Base14KerningEnabledboolean
BreakIndentInheritanceOnReferenceAreaBoundaryboolean
ConserveMemoryPolicyboolean
CreationDatedate
Creatorstring
Keywordsstring
LocatorEnabledboolean
PageHeightstring
PageWidthstring
Producerstring
SourceResolutionfloat
StrictFOValidationboolean
StrictUserConfigValidationboolean
StrictValidationboolean
Subjectstring
TargetResolutionfloat
Titlestring
UseCacheboolean
UserConfigstring

For more information about the properties, consult the FOP API documentation.

The following content-types are supported: application/pdf, application/postscript, application/x-afp, application/rtf, and text/plain.