[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]
Subject: RE: [docbook] Clean way to insert a "pause" between blocks of paragraphs?
--- Jeff Beal <jeff.beal@ansys.com> wrote: > It's an abbreviation for "Processing Instruction". > It looks like this: > > <?piname arbitrary text?> > > Typically, these are used to provide special > instructions to a particular > processor or in a particular processing mode. > Norm's Docbook XSL > stylesheets use, for example, a series of processing > instructions labelled > <?dbhtml ...?> or <?dbfo ...?> depending on the > output type. In your case, > you could use a processing instruction like > <?jjramsey pause?>. Then, in an > XSL customization layer, write a template like: > > <xsl:template > match="processing-instruction('jjramsey')[contains(.,'pause')]"> > <div class="pause"><img > src="graphics/break.png"/></div> > </xsl:template> I created a stylesheet with the following content: <?xml version='1.0'?> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fo="http://www.w3.org/1999/XSL/Format" version="1.0"> <xsl:import href="file:///usr/share/sgml/docbook/xsl-stylesheets/fo/docbook.xsl"/> <xsl:template match="processing-instruction('jjfo')[contains(.,'pause')]"> <fo:block font-size="12pt" text-align="center" space-before="12pt" keep-with-previous="always"> </fo:block> </xsl:template> (I know the href in the <xsl:import/> tag is not very portable. I figured I'd worry later about getting the details of it right.) So far, it seems to work. The result looks kind of ugly because the Docbook XSL stylesheet distiguishes paragraphs with blank lines instead of indenting by default, but it's a start. __________________________________________________ Do you Yahoo!? Yahoo! Platinum - Watch CBS' NCAA March Madness, live on your desktop! http://platinum.yahoo.com
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]