xmlgraphics-fop-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Andreas L. Delmelle" <a_l.delme...@pandora.be>
Subject RE: fo tags not inserted
Date Tue, 08 Jun 2004 16:16:50 GMT
> -----Original Message-----
> From: Rick Col [mailto:rick_cols@yahoo.com]
>

Hi,

> This is a piece of sample code from XSLT Quickly, it
> does not work the way as its author said.
>

For starters, you have no matching template for poem elements, so the
poem/title and poem/verse elements never get reached by the
apply-templates... only their textual content to which the default template
rule is applied (basically: just copy the text)

If there is only one poem in your source XML, you could change the root
matching template (match="/") to match the poem root (match="/poem"). IIC,
that should do the trick.

Another (very minor) detail:
>
> xsl document:
> <?xml version="1.0"?>
> <xsl:stylesheet version="1.0"
> xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
> xmlns:fo="http://www.w3.org/1999/XSL/Format">
>
> <xsl:output method="xml" indent="yes"/>
>
> <xsl:template match="/">
> <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format">
>

You don't need to specify the FO namespace again on fo:root. It's already
defined on the xsl:stylesheet element, so your result tree will
automatically be in that namespace.


HTH!

Greetz,

Andreas


---------------------------------------------------------------------
To unsubscribe, e-mail: fop-user-unsubscribe@xml.apache.org
For additional commands, e-mail: fop-user-help@xml.apache.org


Mime
View raw message