p:css-formatter (3.1) 
Renders a document using CSS formating.
<p:declare-step type="p:css-formatter">
<input port="source" primary="true" content-types="xml html" sequence="false"/>
<output port="result" primary="true" content-types="any" sequence="false"/>
<input port="stylesheet" primary="false" content-types="text" sequence="true">
<p:empty/>
<input/>
<option name="content-type" as="xs:string?" required="false" select="()"/>
<option name="parameters" as="map(xs:QName, item()*)?" required="false" select="()"/>
</p:declare-step>The p:css-formatter step renders an XML or HTML document using CSS
formatting, usually into PDF. The CSS stylesheets for this must be present on the stylesheet port. The resulting rendition
appears, as a binary document, on the result port.
Ports:
Port | Type | Primary? | Content types | Seq? | Description |
|---|---|---|---|---|---|
|
|
|
|
| The XML or HTML document to render. |
|
|
|
|
| The resulting rendition. |
|
|
|
|
| The CSS stylesheets to use for the rendering. |
Options:
The p:css-formatter step allows you to transform XML or HTML into some kind of rendition, usually PDF, by applying CSS formatting. Most likely, CSS Paged Media will be used.
In most cases, p:css-formatter relies on an external CSS formatter. You’ll probably have to do some XProc processor dependent configuration
before this step will work. Please consult the XProc processor documentation about this.
The following pipeline transforms some XML document into PDF using p:css-formatter, and stores it as result.pdf:
<p:declare-step xmlns:p="http://www.w3.org/ns/xproc" version="3.0">
<p:input port="source"/>
<p:output port="result" pipe="result-uri@store-pdf"/>
<p:css-formatter content-type="application/pdf">
<p:with-input port="stylesheet" href="my-paged-media-stylesheet.css"/>
</p:css-formatter>
<p:store href="result.pdf" name="store-pdf"/>
</p:declare-step>The document appearing on the result port only has a content-type property. It has no other
document-properties (also no base-uri).
This description of the p:css-formatter step is for XProc version: 3.1. This is a non-required step (an XProc 3.1 processor does not have to support this).
The formal specification for the p:css-formatter step can be found here.
The p:css-formatter step is part of categories:
The p:css-formatter step is also present in version:
3.0.