Scherler, Thorsten wrote:

I want to have the word Department in front of the value as soon as the 
<department>is not empty</department>.
I figured out that the string-length(./department/text()) is 19 as soon <department />. If  
<department>is not empty</department> is > 19.
So I have written the following xsl (knowing that is a work around but not a 
solution).
<xsl:variable name="xtest">
<xsl:value-of select="string-length(./department/text())"/>
</xsl:variable>
<fo:block>
<xsl:choose>
<xsl:when test="$xtest>19">Abteilung: <xsl:value-of 
select="./department/text()"/>
</xsl:when>
<xsl:when test="$xtest&lt;20">
<xsl:value-of select="./department/text()"/>
</xsl:when>
</xsl:choose>

Is there a better way to do it?
What's wrong with this one? Just small modifications:

<fo:block>
<xsl:choose>
<xsl:when test="string-length(department)>19">Abteilung: <xsl:value-of select="department"/>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="department"/>
</xsl:otherwise>
</xsl:choose>


--
Oleg Tkachenko
eXperanto team
Multiconn Technologies, Israel


--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to