On May 9, 2008, at 17:58, paul womack wrote:
Hi
Just a note: for pure XSLT-related questions, you're always better
off posting on Mulberry's XSLT list.
We try to make it a policy to point this out: this is a list for
questions about using FOP.
No problem this time, but try to keep this in mind for the future.
We just want to avoid everyone posting their XSLT-questions here.
Thanks!
Now, to answer your questions:
A couple of questions have now occurred to me,
which a reading the Tidwell book
hasn't answered (easily).
If my feed xml (in DTD form) were:
<!ELEMENT data (heading, summary?, paragraph+)>
How could I (best) get a single fo element around
any summary (if present) and all the paragraphs?
To get one block that contains the summary and all paragraphs:
<xsl:template match="data">
...
<fo:block>
<xsl:apply-templates select="summary | paragraph" />
</fo:block>
...
</xsl:template>
Or in
<!ELEMENT poem (title,verse+)>
How could I get the first verse to be formatted
differently to the rest?
One alternative would be:
<xsl:template match="verse">
<xsl:choose>
<xsl:when test="not(preceding-sibling::verse)">
<fo:block xsl:use-attribute-sets="first-verse">
<xsl:apply-templates />
</fo:block>
</xsl:when>
<xsl:otherwise>
<fo:block xsl:use-attribute-sets="other-verses">
<xsl:apply-templates />
</fo:block>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
HTH!
Andreas
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]