Thanks. It worked like a charm.
Dovid

Hussein Shafie wrote:
> Dovid Zalkin wrote:
>   
>> I've noticed that when using the XEP plugin to create PDF from Docbook
>> XML, whereas graphic files referenced in the XML source are displayed
>> properly, graphics which are only referenced in the XSLT are ignored. In
>> the command window there is a warning that the file is not found. What
>> seems to be happening is that XMLmind copies all the source files to a
>> temp folder before passing the whole batch on to XEP, but only the
>> graphics mentioned in the XML are copied. Is this correct? 
>>     
>
> Not 100% correct.
>
> The graphics mentioned in the XML are copied *if* these graphics have
> been declared as resources.
>
> DocBook example (excerpt of XXE_install_dir/addon/config/common.xml):
>
> ---
>   <cfg:documentResources xmlns="">
>     <cfg:resource path="//@fileref" />
>   </cfg:documentResources>
> ---
>
> I mean, there is no magic and there is nothing which has been hardwired
> in XXE code.
>
>
>
>   
>> Is there any
>> way that anyone has found of working around this problem? It is quite
>> common to have a logo or icons etc. inserted via the XSLT, so this would
>> seem to be a serious problem.
>>     
>
> The solution exists and is already in use.
>
> Any resources attached to the XSLT stylesheet (graphics files,
> JavaScript scripts, CSS style sheets, etc) is copied along with the
> document to be transformed *if* this has been specified in the process
> command.
>
> DocBook example (excerpt of XXE_install_dir/addon/config/xslMenu.xml):
>
> ---
>   <command name="docb.toPS">
>     <process>
>       <mkdir dir="resources" />
>       <mkdir dir="raw" />
>
>       ...
>
>       <mkdir dir="images/callouts" />
>       <copyProcessResources resources="xsl/images/draft.png"
>                             to="images" />
>       <copyProcessResources
>           resources="@xsl/images/callouts/png_callouts.list"
>           to="images/callouts" />
>
>       <transform stylesheet="xsl/fo/docbook.xsl"
>                  file="__doc.xml" to="__doc.fo">
>         <parameter name="use.extensions">1</parameter>
>
>         ...
>
>     </process>
>   </command>
> ---
>
> In the above example,
> * xsl/images/draft.png is a resource used by the XSLT style sheet.
> * All the .png files listed in xsl/images/callouts/png_callouts.list are
> also resources used by the XSLT style sheet.
>
> See
> http://www.xmlmind.com/xmleditor/_distrib/doc/commands/copyProcessResources.html
>
>
>
> --> Why do something so complicated?
>
> [1] XXE can transform documents stored on WebDAV or FTP servers. Copying
> the document being edited (loaded in memory) to a temporary directory in
> order to transform it is therefore simple, robust and efficient.
>
> [2] XXE can transform highly modular documents and the XSLT engine,
> Saxon, does not support XInclude. Therefore we need to copy a flat copy
> of the document being edited to a temporary directory.
>
> [3] XXE can be deployed using Java Web Start. This means that the XSLT
> style sheet and all its resources are found inside .jar files managed by
> Java Web Start.
>
> All in all, we are very happy with the design of process commands!
>
> This machinery is not used for DITA documents (instead, we use the DITA
> OpenToolkit) and frankly, we really miss the power, safety and isolation
> of our process commands.
>
> More info in
> http://www.xmlmind.com/xmleditor/_distrib/doc/commands/process.html
>
>
>
>   

-- 
David Zalkin
Technology Consultant
Tech-Tav Documentation Ltd.
+972 (0)57 313 8506 


Reply via email to