You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-users@xmlgraphics.apache.org by Je...@t-systems.com on 2005/07/28 15:12:21 UTC
Element order with FOP
Hi,
i'm a bit confused, about the current output of my xsl:fo. Many excuses, as this seems to be more an XSLT question, than a FO question, but:
having an XML like this
<bodyText>
<p/>
<p/>
<list/>
<p/>
<list/>
<table/>
</bodyText>
and for the bodyText Tag i'm using a FO template like this:
<xsl:template match="bodyText">
<xsl:apply-templates select="p"/>
<xsl:apply-templates select="list"/>
<xsl:apply-templates select="table"/>
</xsl:template>
where the FO Tags are inside the p, list and table templates. From XSLT, i was used, that it deployes each of these tags in its order, but the FOP output in the PDF now is like
Paragraph
Paragraph
Paragraph
List
List
Table
have i been completely mistaken about XSLT or is the behaviour on this different in FOP ?
Thanks in advance
Regards, Jens
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
Re: Element order with FOP
Posted by "J.Pietschmann" <j3...@yahoo.de>.
Andreas L Delmelle wrote:
> If you were to replace the three separate apply-templates by only one:
> <xsl:apply-templates select="*" />
> or
> <xsl:apply-templates select="(p | list | table)" />
or just
<xsl:apply-templates/>
J.Pietschmann
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
Re: Element order with FOP
Posted by Andreas L Delmelle <a_...@pandora.be>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On Jul 28, 2005, at 15:12, Jens-Christian.Pohl@t-systems.com wrote:
Hi,
> i'm a bit confused, about the current output of my xsl:fo. Many
> excuses, as this seems to be more an XSLT question, than a FO
> question, but:
>
> having an XML like this
>
> <bodyText>
> <p/>
> <p/>
> <list/>
> <p/>
> <list/>
> <table/>
> </bodyText>
>
> and for the bodyText Tag i'm using a FO template like this:
>
> <xsl:template match="bodyText">
> <xsl:apply-templates select="p"/>
> <xsl:apply-templates select="list"/>
> <xsl:apply-templates select="table"/>
> </xsl:template>
>
> where the FO Tags are inside the p, list and table templates. From
> XSLT, i was used, that it deployes each of these tags in its order,
> but the FOP output in the PDF now is like
Of course, because you apply templates in that order --first the p's,
then the lists and lastly the tables.
If you were to replace the three separate apply-templates by only one:
<xsl:apply-templates select="*" />
or
<xsl:apply-templates select="(p | list | table)" />
Then the order in the original document will be preserved.
HTH!
Greetz,
AD
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (Darwin)
iD8DBQFC6N9ryHTbFO9b8aARAu+SAJ4yH7jF3LyGlQglDE+KvaA9kT66mQCeLau8
W5RJ55Vpox7Hyc5tMLcYrWc=
=5322
-----END PGP SIGNATURE-----
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org