Applies to- Quark Publishing Platform
Flowing the content from QCD article to QXP project is responsibility of Client which is required for editing QXP document . In general, this operation is performed by QuarkXPress client . For example: in QuarkXPress there is an option of “Update Content” to flow the content from QCD article to the appropriate box of QXP.
However, if REST client is used for checkout/checkin of project, it is the responsibility of REST client to flow the article content to QXP project before the check-in of QXP. QuarkXPress Server provides REST APIs to achieve this using http requests.
Solution:
Following are the steps involved to flow the content from QCD article to QXP project:
1. Get QXP project along with its attached assets (including QCD articles) and copy them to QXPS document pool.
2. Extract layout ID and id of the article:
a. Executing the following request to get deconstruct of QXP project:
http://<platform_host>:< platform_port>/qxpsm/request/xml/<TestProject.qxp>
b. From deconstruct XML response note down the id of the layout and the article as shown in the below snippet.
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<PROJECT JOBJACKET="Project1 Job Jacket" JOBTICKET="Default Job Ticket 1:Project1" PROJECTNAME="TestProject.qxp" XMLVERSION="10.0">
<LAYOUT LAYOUT_ID="1" MEDIATYPE="PRINT" POINTSPERINCH="72">
<ID NAME="Layout 1" UID="1"/>
<ARTICLE DOCFORMAT="FULLFEATURED">
<ID NAME="TestArticle.qcd" UID="1"/>
<RGBCOLOR BLUE="0" GREEN="255" RED="0"/>
<COMPONENT BOXNAME="Box5" BOXUID="5" COMPONENTCLASS="CT_TEXT" COMPONENTINDEX="0" COMPONENTTYPE="Body" NAME="Body 1" UID="1"/>
</ARTICLE>
<LAYER KEEPRUNAROUND="false" LOCKED="false" SUPPRESS="false" VISIBLE="true">
<ID NAME="Default" UID="-1"/>
<RGBCOLOR BLUE="247" GREEN="169" RED="127"/>
</LAYER>
<SPREAD>
<ID UID="1"/>
<PAGE FORMATTEDNAME="1" MASTER="A-Master A" POSITION="RIGHTOFSPINE">
<ID UID="1"/>
</PAGE>
<BOX BLENDSTYLE="SOLID" BOXTYPE="CT_TEXT" COLOR="none" CONVERTTOGRAPHIC="true">
<ID NAME="Box5" UID="5"/>
....
</BOX>
</SPREAD>
</LAYOUT>
</PROJECT>
3. To flow the content use the following URL and pass the layout Id, article Id extracted in previous step:
http://<platform_host>:< platform_port>/qxpsm/request/updatecontent/<TestProject.qxp>?updatefromfile=<TestArticle.qcd>&layout=<LayoutId>&articleid=<ArticleId>
This will update the QXP project in the document pool with the new content.
4. Use the updated QXP project in the document pool during check-in to Platform Server along with attributevalues and relations.