[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: xsltproc multiple file output
Am Donnerstag, 15. Mai 2003 05:49 schrieb David Pratt: > I have a file with several figures. I want to output each as a > separate html file from a single xml file and single xsl file using > xsltproc. I am wanting to title the name of each file with the > fileref minus the extension ie. first_figure.jpg page is > first_figure.html. Is this possible? > > <figure> > <title>title of first figure</title> > <mediaobject> > <imageobject> > <imagedata fileref="first_figure.jpg" > format="JPG" /> > </imageobject> > <caption> > <para>This would be the first figure</para> > </caption> > </mediaobject> > </figure> with xsltproc you can use xsl:document like this: <xsl:template match="figure"> <xsl:variable name="src" select="mediaobject/imageobject/imagedata/@fileref"/> <xsl:variable name="href" value="substring-before($src, '.')"/> <xsl:document href="{$href}.html" method="html"> <html><body><img src="{$src}"/></body></html> </xsl:document> </xsl:template> just written down. didnt test it. And of course it is not that easy. You have to take care about more dots (.) in filenames. More imagedata (you might use docbooks mediaselect template) and so on. kind regards janning XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|