XLAYOUT Command (XML)
XLAYOUT [DEFAULT | qtagname | QTAG starttag…] [BODY [GROUP | NOGROUP] [XSPACE {0 | n [IN | MM | CM | POINTS | PELS]}] | PAGEHEADER [CONTINUE] | PAGETRAILER [CONTINUE] | GRPHEADER [CONTINUE] [XSPACE {0 | n [IN | MM | CM | POINTS | PELS]}]] [NEWPAGE] [DELIMITER [C | X] 'bytes'] [PRINTDATA [YES | NO]] [DIRECTION {ACROSS | DOWN | BACK | UP}] [POSITION [ABSOLUTE | RELATIVE]{LEFTMARGIN | SAME | [+ | -] horiz [IN | MM | CM | POINTS | PELS]} [ABSOLUTE | RELATIVE] {TOPMARGIN | NEXT | SAME | [+ | -] vert [IN | MM | CM | POINTS | PELS]}] [ENDSPACE n [IN | MM | CM | POINTS | PELS]] [COLOR colorname | RGB rvalue gvalue bvalue | HIGHLIGHT hvalue] [COVERAGE cvalue] [BLACK bvalue] | CMYK cvalue mvalue yvalue kvalue | CIELAB lvalue [(–)] clvalue [(–)] c2value] [FONT name1 [, name2]] [OBJECT lname [0 0 | relX relY] Other OBJECT Parameters] [OVERLAY Xname [0 0 | relX relY] [OVROTATE {0 | 90 | 180 | 270}]] [SEGMENT Xname [0 0 | relX relY]] ;
Other OBJECT Parameters
[OBSIZE {USEOBJ | wd [unit] hg [unit]}] [OBMAP {LEFT | TRIM | FIT | CENTER | REPEAT | FILL}] [OBCHPOS {USEOBJ | x-pos}] [OBCVPOS {USEOBJ | y-pos}] [OBROTATE {0 | 90 | 180 | 270}] [OBCOLOR color-name] [OBPAGE n] [OBCPSS PSS]
The XLAYOUT command addresses an XML data item by specifying a QTAG (qualified tag) for that data. A QTAG is a series of XML start tags that fully identify the XML data item.
Before printing the data, PSF scans the XML data item and matches it to anXLAYOUT command in the page definition by using its QTAG. The matchingXLAYOUT command in the page definition is used to position and format the associated XML data item and its attributes on the printed page.
The XML page definition function has the following new PPFA concepts:
- Relative Inline Positioning
- Relative inline positioning places data relative to the current position. If you position
a text field and then place the text, the end of the text becomes the new current
position. Graphics, barcodes, objects, segments, and overlays do not change the current position after they are originally positioned. For example, if
you position a line with a DRAWGRAPHIC LINE command, the new current position is the starting point of that line. The length
of the graphic line does not change the current position.
There are several restrictions when using relative inline positioning:
- XLAYOUT commands with relative positioning cannot contain any of the following:
- FIELD commands with inline positioning relative to the XLAYOUT (LPOS)
- FIELD ATTR (attribute) with inline positioning relative to the XLAYOUT (LPOS)
- FIELDcommands with barcodes
- DRAWGRAPHIC commands
- OBJECT subcommands
- SEGMENT subcommands
- OVERLAY subcommands
- You can only use the SAME parameter for inline positioning on the XLAYOUT command when the previously used XLAYOUT command used absolute inline positioning.
- XLAYOUT commands with relative positioning cannot contain any of the following:
- Absolute Inline Positioning:
- Allows absolute inline positioning on a FIELD command for specific placement of elements.
- Attributes are Special FIELDs:
- The attribute is identified by name and the data printed is from the attribute value or a portion of the attribute value and not from the element content.
- Note:
- If a FIELD is used for presenting any piece of data on the XLAYOUT command, FIELD commands must be used for all pieces of data presented on the XLAYOUT command. Since an attribute is a special field, if you want to print both an attribute value and the element data you need to code the attribute field for the attribute value and a regular field for the element data.
- PSF suppresses leading and trailing blanks (X'40' for EBCDIC or X'20' for ASCII) in the data. Multiple embedded blanks are reduced to one blank.
- The XLAYOUT command defines an XML page definition. XLAYOUT commands cannot be mixed with PRINTLINE commands, which define traditional page definitions, or with LAYOUT commands, which define record formatting page definitions.