Chapter 16 of the IREn User Guide
IREn Intermediate Output Format Specification
F.1. IREn Intermediate Output Format Specification
This section describes the IREn intermediate output format — an XML based representation of the layout that is passed from the generator to the final output generators (PDF, PostScript, etc). All elements reside in a separate namespace, http://www.renderx.com/XEP/xep (omitted from the description for brevity). All lengths are measured in units of 0.001 pt (1/72,000 inch), and expressed as integers. The format is represented by the following DTD fragment:
<!ENTITY % drawables
" rotate
| translate
| word-spacing
| letter-spacing
| font-stretch
| font
| text
| line
| image
| rgb-color
| cmyk-color
| spot-color
| registration-color
| rectangle
| clip
| polygon
| path
| target
| internal-link
| external-link
| internal-bookmark
| external-bookmark
| page-number
| media-object">
<!ENTITY % rx-accessibility-properties "
xpath CDATA #IMPLIED
pdf-structure-tag CDATA #IMPLIED
pdf-artifact-type CDATA #IMPLIED
pdf-artifact-subtype CDATA #IMPLIED
alt-description CDATA #IMPLIED
actual-text CDATA #IMPLIED
abbreviation CDATA #IMPLIED">
<!ENTITY % pages
" page
| insert-document">
<!ELEMENT document (pages+)>
<!ATTLIST document
creator CDATA #REQUIRED
initial-destination CDATA #IMPLIED>
<!ELEMENT page (%drawables;)*>
<!ATTLIST page
width CDATA #REQUIRED
height CDATA #REQUIRED
page-number CDATA #REQUIRED
page-id CDATA #REQUIRED>
<!ELEMENT insert-document EMPTY>
<!ATTLIST insert-document
src CDATA #REQUIRED
document-content-type CDATA #IMPLIED>
<!ELEMENT rotate EMPTY>
<!ATTLIST rotate
phi CDATA #REQUIRED>
<!ELEMENT translate EMPTY>
<!ATTLIST translate
x CDATA #REQUIRED
y CDATA #REQUIRED>
<!ELEMENT word-spacing EMPTY>
<!ATTLIST word-spacing
value CDATA #REQUIRED>
<!ELEMENT letter-spacing EMPTY>
<!ATTLIST letter-spacing
value CDATA #REQUIRED>
<!ELEMENT font-stretch EMPTY>
<!ATTLIST font-stretch
value CDATA #REQUIRED>
<!ELEMENT font EMPTY>
<!ATTLIST font
family CDATA #REQUIRED
weight CDATA #REQUIRED
style CDATA #REQUIRED
variant CDATA #REQUIRED
size CDATA #REQUIRED>
<!ELEMENT text (line*)>
<!ATTLIST text
x CDATA #REQUIRED
y CDATA #REQUIRED
value CDATA #REQUIRED
width CDATA #REQUIRED
%rx-accessibility-properties;>
<!ELEMENT page-number (line*)>
<!ATTLIST page-number
x CDATA #REQUIRED
y CDATA #REQUIRED
value CDATA #REQUIRED
width CDATA #REQUIRED
%rx-accessibility-properties;>
<!ELEMENT line EMPTY>
<!ATTLIST line
x-from CDATA #REQUIRED
y-from CDATA #REQUIRED
x-till CDATA #REQUIRED
y-till CDATA #REQUIRED
thickness CDATA #REQUIRED
style CDATA #REQUIRED>
<!ELEMENT image EMPTY>
<!ATTLIST image
src CDATA #REQUIRED
base CDATA #IMPLIED
type CDATA #REQUIRED
x-from CDATA #REQUIRED
y-from CDATA #REQUIRED
scale-x CDATA #REQUIRED
scale-y CDATA #REQUIRED
%rx-accessibility-properties;>
<!ELEMENT gray-color EMPTY>
<!ATTLIST gray-color
gray CDATA #REQUIRED>
<!ELEMENT rgb-color EMPTY>
<!ATTLIST rgb-color
red CDATA #REQUIRED
green CDATA #REQUIRED
blue CDATA #REQUIRED>
<!ELEMENT cmyk-color EMPTY>
<!ATTLIST cmyk-color
cyan CDATA #REQUIRED
magenta CDATA #REQUIRED
yellow CDATA #REQUIRED
black CDATA #REQUIRED>
<!ELEMENT spot-color EMPTY>
<!ATTLIST spot-color
colorant CDATA #REQUIRED
tint CDATA #REQUIRED
alt-gray CDATA #IMPLIED
alt-red CDATA #IMPLIED
alt-green CDATA #IMPLIED
alt-blue CDATA #IMPLIED
alt-cyan CDATA #IMPLIED
alt-magenta CDATA #IMPLIED
alt-yellow CDATA #IMPLIED
alt-black CDATA #IMPLIED>
<!ELEMENT registration-color EMPTY>
<!ATTLIST registration-color
tint CDATA #REQUIRED>
<!ELEMENT rectangle EMPTY>
<!ATTLIST rectangle
x-from CDATA #REQUIRED
y-from CDATA #REQUIRED
x-till CDATA #REQUIRED
y-till CDATA #REQUIRED>
<!ELEMENT clip (%drawables;)*>
<!ATTLIST clip
x-from CDATA #REQUIRED
y-from CDATA #REQUIRED
x-till CDATA #REQUIRED
y-till CDATA #REQUIRED
clip-by-following-polygon CDATA #IMPLIED>
<!ELEMENT polygon (point,point+,arc,arc+)>
<!ATTLIST polygon
x-from CDATA #REQUIRED
y-from CDATA #REQUIRED>
<!ELEMENT point EMPTY>
<!ATTLIST point
x-till CDATA #REQUIRED
y-till CDATA #REQUIRED>
<!ELEMENT arc EMPTY>
<!ATTLIST arc
x1-ctrl-point CDATA #REQUIRED
y1-ctrl-point CDATA #REQUIRED
x2-ctrl-point CDATA #REQUIRED
y2-ctrl-point CDATA #REQUIRED
x-till CDATA #REQUIRED
y-till CDATA #REQUIRED>
<!ELEMENT target EMPTY>
<!ATTLIST target
name CDATA #REQUIRED
x CDATA #REQUIRED
y CDATA #REQUIRED
%rx-accessibility-properties;>
<!ELEMENT internal-link EMPTY>
<!ATTLIST internal-link
destination-id CDATA #REQUIRED
destination CDATA #REQUIRED
destination-x CDATA #REQUIRED
destination-y CDATA #REQUIRED
%rx-accessibility-properties;>
<!ELEMENT external-link EMPTY>
<!ATTLIST external-link
destination CDATA #REQUIRED
show-destination (new | replace) #REQUIRED
%rx-accessibility-properties;>
<!ELEMENT internal-bookmark (grey-color?, rgb-color?, cmyk-color?)>
<!ATTLIST internal-bookmark
label CDATA #REQUIRED
id CDATA #REQUIRED
parent-id CDATA #REQUIRED
destination-id CDATA #REQUIRED
destination CDATA #REQUIRED
destination-x CDATA #REQUIRED
destination-y CDATA #REQUIRED
collapse-subtree (true | false) #REQUIRED
font-style CDATA #IMPLIED
font-weight CDATA #IMPLIED
%rx-accessibility-properties;>
<!ELEMENT external-bookmark (grey-color?, rgb-color?, cmyk-color?)>
<!ATTLIST external-bookmark
label CDATA #REQUIRED
id CDATA #REQUIRED
parent-id CDATA #REQUIRED
destination CDATA #REQUIRED
collapse-subtree (true | false) #REQUIRED
show-destination (new | replace) #REQUIRED
font-style CDATA #IMPLIED
font-weight CDATA #IMPLIED
%rx-accessibility-properties;>
<!ELEMENT media-object (poster?)>
<!ATTLIST media-object
src CDATA #REQUIRED
base CDATA #IMPLIED
type CDATA #REQUIRED
x-from CDATA #REQUIRED
y-from CDATA #REQUIRED
scale-x CDATA #REQUIRED
scale-y CDATA #REQUIRED
embed ( false | true ) #IMPLIED
extraction-policy ( tempaccess | tempnever | tempextract
| tempalways ) #IMPLIED
alt CDATA #IMPLIED
show-controls ( true|false ) #IMPLIED
play-mode CDATA #IMPLIED
volume CDATA #IMPLIED
duration CDATA #IMPLIED
%rx-accessibility-properties;>
<!ELEMENT poster EMPTY>
<!ATTLIST poster
src CDATA #REQUIRED
type CDATA #REQUIRED
The following table provides a detailed description of the output elements:
Table F.1. Output Elements
| Element | Description | Attributes |
|---|---|---|
<document> | The root element. At its beginning and at its end, initialization and finalization are usually performed. |
|
<page> | Wraps a single page of the document. There is one <page> element for each page in the document. |
|
<rotate> | Rotates the coordinate system. |
|
<translate> | Shifts the origin of the coordinate system. |
|
<word-spacing> | Sets word spacing (additional spacing between words). |
|
<letter-spacing> | Sets letter spacing (additional spacing between non-space characters). |
|
<font-stretch> | Sets font-stretch factor. |
|
<font> | Changes the current font. |
|
<text> | Prints a character string. |
|
<line> | Draws a line. |
|
<image> | Embeds an external image. |
|
<gray-color> | Sets the current color for stroking and filling. The color is chosen in a grayscale color space. |
|
<rgb-color> | Sets the current color for stroking and filling. The color is chosen in an RGB color space (additive). |
|
<cmyk-color> | Sets the current color for stroking and filling. The color is chosen in CMYK color space (subtractive). |
|
<spot-color> | Sets the current color for stroking and filling. The color is chosen in a spot color space (subtractive). |
To describe an alternate color, one of the following attribute sets must be present:
|
<registration-color> | Sets the current color for stroking and filling. The color is chosen in registration color space (subtractive): it appears on all separations in the document. |
|
<rectangle> | Draws a filled rectangle. |
|
<clip> | Sets the clipping area. |
|
<polygon> | Draws a filled polygon. All vertices but the first one are specified in the contained <point> elements. |
|
<point> | Adds a vertex to a polygon. |
|
<arc> | Normally, Polygon is a figure that is defined by a finite number of straight line segments connected to form a closed polygonal chain or polygonal circuit. Arc element adds a curve to the form instead of a straight line added by point element. So, Polygon containing an Arc element is not a polygon anymore but a complex shape formed by a sequence of lines and curves. Basically, Arc is a Bézier curve defined by two base- and two control points. The first base point is inherited from the previous point of a Polygon in the sequence, the second base point is defined by Only quadratic Bézier curves (with two control points) are currently supported. |
|
<path> | Container element for grouping together multiple <polygon> elements. In case of further formatting to PDF all grouped polygons will be drawn as one pdf path which eliminates the problem with rough line and curve joins. | None |
<target> | Sets the endpoint for an internal destination. |
|
<internal-link> | Specifies an internal link destination. |
|
<external-link> | Specifies an external link destination. |
|
<internal-bookmark> | Specifies an internal bookmark destination. |
|
<external-bookmark> | Specifies an external bookmark destination. |
|
<media-object> | Places multimedia. |
|
<poster> | Embeds an external image to show, when not playing media. |
|
| (see above) | See above for applicable elements. |
|
Processing instructions may appear in the output. They are taken from the source file and passed straight to the generator with no modification. Processing instructions placement meets the following conditions:
-
Instructions placed before
<fo:root>element in the source file are reproduced at the very top, before the root<document>element. -
Instructions placed inside an
<fo:simple-page-master>element are reproduced on each page generated using that master, immediately after the opening tag of the<page>element.
All other processing instructions may vanish during formatting. Except for those specified above, ordering of instructions is not preserved.