OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

docbook-apps message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]


Subject: Re: [docbook-apps] Docbook images/graphics. Where do you keep them?


 
 
 
 
In a message dated 05/14/09 12:22:07 Pacific Daylight Time, davep@dpawson.co.uk writes:
DeanNelson@aol.com wrote:
> Dave,
>  
> I have a pretty simple system that assumes a directory structure like this:
>  
> xml files
> xml files\images
>  
> 1. When I publish FO the PDF lands in "xml files".
> 2. When I publish HTML:
> -  I set the "output" directory to "xml files\html"
> - I copy the images from "xml files\images" to "xml files\html\images"
> by a batch file generated by XSLT <see below>
> - I copy the Docbook images from where they are to "xml
> files\html\images\docbook_images" and point the admon.graphics.path to
> "images\docbook_images". As a result the "html" dir tree is portable and
> can go anywhere since the paths for the images are relative.
> 3. I have found out that MSHELP only embeds images that it needs and not
> the whole directory.

That would work with Larrys 'top level' target too though Dean,
so still useful.


> I use a template file for collecting the images that are used in the
> book. It generates a batch file with the files named for copying. Then I
> run the batch as the final part of the processing. Since I maintain both
> Windows and Linux, a similar one is used for Linux.
>  
> I also copy the navigation images and the Docbook images in the batch
> file that calls this one.

Does this create a batch file, or is it called by a batch file?
It seems restricted to only certain images, I guess it would
need extending to all images, but no sweat.
Looks like the latter? I.e. method='text'
The XSLT is output as a batch file. Then the file is called in my processing to place the images where they need to be. The restrictions are only because imagedata and graphics are the only ones I use. It would be interesting to see your update of this concept.

Thanks Dean, again, OK if I steal the ideas please?
 
 
Steal away!


regards DaveP


>  
>  
> ---------------------
> <?xml version="1.0" encoding="UTF-8"?>
> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
> version="1.0">
>  
>     <xsl:output method="text" indent="yes" doctype-public="-//OASIS//DTD
> DocBook XML V4.5//EN"
>         doctype-system="http://www.docbook.org/xml/4.5/docbookx.dtd"/>
>     <xsl:strip-space elements="*"/>
>  
>     <!-- Clear all other text templates -->
>     <xsl:template match="text()"/>
>  
>     <xsl:template match="*">
>         <xsl:apply-templates/>
>     </xsl:template>
>  
>     <!-- find all parent sections and dig out images -->
>     <xsl:template match="imagedata|graphic">
>         <xsl:text>copy "images\</xsl:text>
>         <xsl:value-of select="@fileref"/>
>         <xsl:text>" html\images\"</xsl:text>
>         <xsl:value-of select="@fileref"/><xsl:text>"
>         </xsl:text>
>     </xsl:template>
>  
> </xsl:stylesheet>
> -------------------------
>  
>
>
>
>
>
>      >
>      > I also keep the filespaths in my XML relative which make
>     portability a
>      > bit easier.
>
>     In the XML source? That makes the xslt easier.
>
>     This is getting interesting!
>
>     (I'm starting a write up about it btw, bare bones so far)
>
>
>     regards
>
>     --
>     Dave Pawson
>     XSLT XSL-FO FAQ.
>     http://www.dpawson.co.uk
>
>
> ------------------------------------------------------------------------
> Recession-proof vacation ideas. Find free things to do in the U.S.
> <http://travel.aol.com/travel-ideas/domestic/national-tourism-week?ncid=emlcntustrav00000002>



regards

--
Dave Pawson
XSLT XSL-FO FAQ.
http://www.dpawson.co.uk

---------------------------------------------------------------------
To unsubscribe, e-mail: docbook-apps-unsubscribe@lists.oasis-open.org
For additional commands, e-mail: docbook-apps-help@lists.oasis-open.org

 


[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]