This is the mail archive of the
docbook@lists.oasis-open.org
mailing list for the DocBook project.
RE: [docbook] Clean way to insert a "pause" between blocks of paragraphs?
- From: "James J. Ramsey" <jjramsey_6x9eq42 at yahoo dot com>
- To: docbook at lists dot oasis-open dot org
- Date: Fri, 28 Mar 2003 16:29:14 -0800 (PST)
- Subject: RE: [docbook] Clean way to insert a "pause" between blocks of paragraphs?
- Reply-to: jjramsey at pobox dot com
--- Jeff Beal <jeff dot beal at ansys dot 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
---------------------------------------------------------------------
To unsubscribe, e-mail: docbook-unsubscribe at lists dot oasis-open dot org
For additional commands, e-mail: docbook-help at lists dot oasis-open dot org