On Tue, 17 Jul 2001, Darrel Riekhof wrote:

> I want to mark up the text in the resulting PDF file according to the tags
> (strong=bold, em=italics, etc.)  I'm a newbie with XSL, and I can't figure
> out how to write the XSL so it transforms this XML into the correct FO.  Can
> anyone recommend a good XSL book or reference that would help me with this,
> or better yet, give me some XSL:FO that does this?

Here are some useful general formatting templates, as you can see it's
real easy:

<xsl:template match="strong">
        <fo:inline font-weight="bold">
                <xsl:apply-templates/>
        </fo:inline>
</xsl:template>

<xsl:template match="em">
        <fo:inline font-style="italic">
                <xsl:apply-templates/>
        </fo:inline>
</xsl:template>

<xsl:template match="u">
        <fo:inline text-decoration="underline">
                <xsl:apply-templates/>
        </fo:inline>
</xsl:template>

<xsl:template match="font-size">
        <fo:inline font-size="{@value}">
                <xsl:apply-templates/>
        </fo:inline>
</xsl:template>
        
<xsl:template match="line-height">
        <fo:inline line-height="{@value}">
                <xsl:apply-templates/>
        </fo:inline>
</xsl:template>


Ulrich

-- 
Ulrich Mayring
DENIC eG, Softwareentwicklung


---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>

To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail: <[EMAIL PROTECTED]>

Reply via email to