9.5

Table Of Contents
Lets you specify which layout to render. The first layout is layout 1.
You can also specify a layout by name.
String
layout
Lets you specify the XML file containing the data to import. The
paginate parameter reates enough pages in the target layout to
accommodate the records in the XML.
XML
paginate
This parameter works only with the pdf, postscript, and qxp render
types. If you use it with any other render type, the server returns only
the first page of the paginated layout.
If you do not supply an XML string or file (for example:
http://localhost:8080/pdf/Sample.qxp?paginate),
QuarkXPress Server attempts to use the XML file that was associated
with the layout in QuarkXPress.
The layout with the imported XML.Response
HTTP Error #500Invalid XML
String
Alerts
This alert displays if you supply an invalid XML string in the thexmldoc parameter.
If the project is successfully rendered, a transaction success message is written to the
QuarkXPress Server transaction log file. The transaction entry consists of the date and time of the
Logs
request, the render type, the project name, the type of response produced by the server, the size
of the response returned in bytes, and the client IP address. The following is a sample of a transaction
entry:
8/5/2005 18:11:54 sample.qxp Type: image/jpeg Size: 65982 Client: 127.0.0.1
If an alert displays, an error message is written to the QuarkXPress Server error log file. For example:
8/9/2005 12:38:42 Error Error Code: 10396 Invalid XML String.
When QuarkXPress Server is running on Windows, use a URL like the following:
http://localhost:8080/Sample.qxp?thexmldoc=<?xml
version="1.0"?>
Example, GET
URL
<BookReview><Book><Title>C:\Autumn.jpg</Title>
<Author> Brian Kernighan and Dennis Ritchie</Author>
</Book></BookReview>
When QuarkXPress Server is running on Mac OS, use a URL like the following:
http://localhost:8080/Sample.qxp?thexmldoc=<?xml version=
"1.0"?>
<BookReview><Book><Title>/Volumes/MacHD/Pictures/abc.tiff</
Title>
<Author> Brian Kernighan and Dennis Ritchie</Author>
</Book></BookReview>
Alternatively, you can specify a path to a file containing the XML:
http://localhost:8080/Sample.qxp?paginate=
file:MacHD:Sample.xml
Request object names: XMLImportRequest
com.quark.qxpsm.QRequestContext rc = new com.quark.qxpsm.QRequestContext();
Example, object
model
if(!this.DocumentSettings1.
documentName.Text.Equals(""))
rc.documentName =
this.DocumentSettings1.documentName.Text;
// STEP 2 (SPECIFIC TO REQUESTS): Create the XML Import request
XMLImportRequest xmlimportreq = new XMLImportRequest();
xmlimportreq.XMLDocument = this.thexmldoc.Text;
rc.request = xmlimportreq;
// STEP 3(SPECIFIC TO REQUESTS): Create the JPEG renderer request
92 | A GUIDE TO QUARKXPRESS SERVER 9.5
USING QUARKXPRESS SERVER