2020

Table Of Contents
USING QUARKXPRESS SERVER
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
It’s important to understand that although the construct namespace uses the
same schema that you use when you modify an existing project, the construct
namespace uses it differently. When you use the construct namespace, the XML
you pass simply contains a description of everything in the document you want to
create — much as an HTML file describes a page you want to display in a browser.
There is no need to use a command and create elements such as ADDCELLS,
OPERATION, and MOVERIGHT; you simply describe each item in the layout with
elements such as <BOX> and <TABLE>, and specify each item’s position with the
<POSITION> element type. When you use the modify attribute without the
construct namespace, however, the XML you pass must contain commands that
show how you want QuarkXPress Server to modify the project.
For more information, see “Modifier schema (annotated).”
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>
122 | A GUIDE TO QUARKXPRESS SERVER 2020