2020

Table Of Contents
USING QUARKXPRESS SERVER
Adding text and picture cells to tables
To add a text cell, use XML like the following:
<CELL BOXTYPE="CT_TEXT" COLUMNCOUNT ="1">
<TEXT>
<STORY>
<RICHTEXT>Text goes here.</RICHTEXT>
</STORY>
</TEXT>
</CELL>
Note that the <TEXT> element must always contain a <STORY> element. A <STORY>
element can contain <PARAGRAPH> elements or simply <RICHTEXT> elements.
To add a picture cell, use XML like the following:
<CELL BOXTYPE="CT_PICT" COLUMNCOUNT ="1">
<CONTENT>MacintoshHD:DocPool:flower1.jpg</CONTENT>
<PICTURE FIT="CENTERPICTURE" />
</CELL>
Merging and splitting table cells
To merge table cells, use XML like the following:
<TABLE>
<ID NAME="table1"/>
<ROW ROWCOUNT="1" MERGEROWSPAN=”1” >
<CELL COLCOUNT="1"><TEXT>...</TEXT></CELL>
<CELL COLCOUNT="2"><TEXT>...</TEXT></CELL>
</ROW>
<ROW ROWCOUNT="2">
<CELL COLCOUNT="1"><TEXT>...</TEXT></CELL>
<CELL COLCOUNT="2"><TEXT>...</TEXT></CELL>
</ROW>
<ROW ROWCOUNT="3">
<CELL COLCOUNT="1"><TEXT>...</TEXT></CELL>
<CELL COLCOUNT="2"><TEXT>...</TEXT></CELL>
</ROW>
file:MacHD:xml:createTable.xml You can also supply a string that consists of valid
XML commands. For example: http://localhost:8080/sample.qxp?modify=
<LAYOUT><ID UID=”Layout1”/><SPREAD><ID UID=”1”/> <TABLE
OPERATION=”CREATE” ROWS=”5” COLUMNS=”3”> <ID
NAME=”STATS”/><GEOMETRY PAGE=”1”/><POSITION>
<TOP>5</TOP><LEFT>5</LEFT><BOTTOM>30</BOTTOM>
<RIGHT>30</RIGHT></POSITION></GEOMETRY>
</TABLE>SPREAD></LAYOUT></PROJECT>
Example,
object model
To add a new table to an existing spread, use code like the following:Spread
spread = new Spread(); Table table = new Table(); table.name = “textbox1”;
Geometry geometry = new Geometry(); Position position = new Position();
position.top = “110”; position.left = “89”; position.bottom = “220”; position.right
= “300”; geometry.position = position; geometry.shape = “SH_RECT”;
geometry.page = “1”; geometry.layer = “Default”; table.geometry = geometry;
table.rows = “2”; table.columns = “4”; table.maintainGeometry = “true”;
table.operation = “CREATE”; spread.tables = new Table []{table};Use the following
object hierarchy:ModifierRequest < Project < Layout < Spread < TableTo delete a
table, provide the table’s name or ID and set the operation attribute to “DELETE”.
A GUIDE TO QUARKXPRESS SERVER 2020 | 139