2017

Table Of Contents
USING QUARKXPRESS SERVER
A Guide to QuarkXPress Server 2017 | 125
Construct and modify
The modify parameter lets you modify existing projects. For example:
http://QXPServer8:8080/project1.qxp?
modify=file:path to XML file on server
or:
http://QXPServer8:8080/project1.qxp?modify=XML string
Bad
filename/pathname.
HTTP Error #404 QuarkXPress Server Error #–37
This alert displays if you specify an invalid file
name or path.
The XML document is
not valid or well
formed.
HTTP Error #500 This alert displays if the XML
you supply is not well-formed or do not adhere
to the Modifier DTD.
The XML document
c
ontains an invalid tag
value.
HTTP Error #500 This alert displays if you supply
an invalid value in the XML.
Logs
If the request succeeds, a transaction success message is written to the
QuarkXPress Server transaction log file. For example:8/3/2005 11:27:42 —
jpeg/construct/table.qxp — Type: image/jpeg — Size: 31715 — Client:
127.0.0.1If an alert is displayed, an error message is written to the
QuarkXPress Server error log. The following is a sample of the error log
entry:8/10/2005 10:39:07 — Error — Error Code: 10339 — The specified
file failed to load in the picture box.
Example, object model
Request Object Names:XMLRequest ConstructRequest
ConstructFileRequest ConstructStreamRequest To construct a new
QuarkXPress project by editing an existing document, first deconstruct a
QuarkXPress project using code like the following:XMLRequest dcnstrq =
new XMLRequest(); rc.request = dcnstrq; Next, alter the project by
manipulating the XML. When you’re done, pass the modified XML
document to ConstructStreamRequest to create a new QuarkXPress
project. For example:ConstructStreamRequest cnstrq = new
ConstructStreamRequest(); cnstrq.modify = Buffer; // Byte[] for the
modified XML rc.request = cnstrq; QuarkXPressRenderRequest qxprq =
new QuarkXPressRenderRequest(); cnstrq.request = qxprq; Alternatively,
you can deconstruct a QuarkXPress project using code like the
following:RequestServiceService svc = new RequestServiceService() Project
proj = svc.getDOM(“document.qxp”); Next, alter the project by
manipulating the XML. When you’re done, pass the modified Project
instance to ConstructRequest to create a new QuarkXPress project. For
example:ConstructRequest cnstrq = new ConstructRequest();
cnstrq.project = proj; QRequestContext rc = new QRequestContext();
rc.request = cnstrq; QuarkXPressRenderRequest qxprq = new
QuarkXPressRenderRequest(); cnstrq.request = qxprq;
Notes
The construct namespace takes two arguments: The name of the project to
be created and a modify parameter with the string or the path of the XML
file that describes how to create the project:
http://localhost:8080/qxpdoc/construct/project1.qxp? modify=file:path to
XML file on server http://localhost:8080/qxpdoc/construct/project1.qxp?
modify=<xml-string>