You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Panagiotis Konstantinidis <pa...@hotgen.com> on 2000/11/14 17:48:14 UTC

Help needed with XMl->PDF

  I have a project to accomplish where XML must be converted to PDF. I would
like to thank all of you who have responded to my messages and helped me to
almost finish it. But a really small problem still persists. Consider the
following XML code:
<document>
	<say> Hello there </say>
	<name> Bob. </name>
	<say> How are you? </say>
</document>

  If the XSL file has two templates:
....
<xsl:apply-templates select="say"/>
<xsl:apply-templates select="name"/>
...
...
...
<xsl:template match="say">
	<fo:block>
		<xsl:value-of select="."/>
	</fo:block>
</xsl:template>

<xsl:template match="name">
	<fo:block>
		<xsl:value-of select="."/>
	</fo:block>
</xsl:template>

then the output would be: Hello there How are you? Bob. It will first
display the two <say> tags and then the <name> tag (where the appropriate
would be <say> <name> <say>)

  How can I write the code in order for the output to be: Hello there Bob.
How are you? Obviously I would have to use logic. Can anybody give me any
examples of how to do it?

  Regards.

    Panos