The workflow only publishes article objects and it must be seen as an example. It transforms the selected article objects to an XML node that will be processed by the DLL. The node is of type <wp> and it contains (in the <body> tag) the text of the story in HTML format. This is an example of the created node:
<wp>
<type>article</type>
<title>A lazy hound</title>
<body>
<p />
<p />
<p>The quick brown fox jumped over the lazy dog.</p>
<p>The quick brown fox jumped over the lazy dog.</p>
<p>The quick brown fox jumped over the lazy dog.</p>
<p />
</body>
<media name="Tulips.jpg" alt-name="Tulips"
width="1024" height="768" mimeType="image/jpeg"
url="http://localhost/GN4/do.ashx?Cmd=Data&DataId=831"
mediatype="img">
<caption>
<p>This is a photo of tulips</p>
</caption>
</media>
<cats>
<item>financial</item>
</cats>
<deadline>
</deadline>
<tags />
</wp>
The XML node is generated by the XSL in the .ZIP file above.
Publish individual pictures to the blog
The GN4-Wordpress DLL exports a method to publish individual pictures to the blog, which can be called in a <Code> section in the workflow. This would be the favourite way to proceed, as we could then implement a way to prevent re-upload of the same picture. However, I decided on a different approach, where I create <media> tags for the pictures (or multimedia...) containing the GN4 URL of the element (via call to do.aspx) and have the DLL download the files directly and generate <img> links in the body of the story. In this case, the <img> is inside a <div> tag which contains the caption of the picture as well. For a real WordPress installation (rather than a Joomla one), the images should be uploaded by the workflow and references to them should be added in the <body> with the [caption] Wordpress' tag.
Once the article has been uploaded successfully, its <pubInfo> node is set by the workflow. When the article is edited, the DLL knows (thanks to the <pubInfo>) what Wordpress article to change, likewise when the article is un-published.