xmlgraphics-fop-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joachim Diepstraten / media access <Joachim.Diepstra...@media-access.net>
Subject RE: Line-breaks?
Date Thu, 04 Jan 2001 16:05:51 GMT
Hi Belinda


>It works for me, using fop to convert to pdf. This is what my entire block
looks like:
Doesn't work for me I'm using still FOP 0.15 maybe that's the problem???

Here is the example :

<xsl:template match="block">
	<fo:block end-indent="7.2cm" text-align="start"
			     font-size="10pt" 
			     line-height="17.5pt"
	  		     font-family="Helvetica" 
		  	     space-after.optimum="18pt">

<xsl:variable name="test">
	<xsl:value-of select="."/>
</xsl:variable>

<xsl:variable name="toreplace">
	<xsl:text>#b</xsl:text>
</xsl:variable>

<xsl:variable name="replacer">
	<xsl:text>HELLLLLLLOOOOOOOOOO &#x0D; Damn nation no
salvation</xsl:text>
</xsl:variable>

<xsl:variable name="test2">
   <xsl:value-of select="substring-before($test,$toreplace)"/>
</xsl:variable>

<xsl:variable name="test3">
   <xsl:value-of select="substring-after($test,$toreplace)"/>
</xsl:variable>

<xsl:variable name="test4">
   <xsl:value-of select="$replacer"/>
</xsl:variable>

<xsl:if test="string-length($test2) &gt; 0">
	<xsl:value-of select="$test4"/>
</xsl:if>

<xsl:if test="string-length($test2) &lt; 1">
	<xsl:value-of select="$test"/>
</xsl:if>

</fo:block>
</xsl:template>

The code above doesn't even work when I replace <br> into &#x0D; already
inside XML.

>You mentioned HTMl though. Why would you use FOP to convert to HTML? Don't
you want to 
>use just XSLT for that?

I don't use FOP to generate HTML. A user writes some text in a HTML-Formular
and he can use some
HTML notations to layout his text. After that, this text is taken, written
in a database,
transfered to XML and after that transformed using XSLT and XSL:FO to PDF
with FOP.

Your sincerly,
  J.D.


Mime
View raw message