This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
Re: Some simple questions...
- From: Jeni Tennison <jeni at jenitennison dot com>
- To: José Carlos Ramalho <jcr at di dot uminho dot pt>
- Cc: XSL-List at lists dot mulberrytech dot com
- Date: Fri, 23 Nov 2001 17:41:14 +0000
- Subject: Re: [xsl] Some simple questions...
- Organization: Jeni Tennison Consulting Ltd
- References: <007701c17442$8fbd3590$bb1488c1@josefina>
- Reply-to: xsl-list at lists dot mulberrytech dot com
Hi José,
> Q1: How do I test if an element is empty without using
> string-length?
Convert its value to a string with the string() function. When you
convert a string to a boolean, it results in boolean true if the
string has any characters in it and boolean false if it doesn't. The
string() function also takes the current node as its default argument,
so you don't even have to put anything inside the brackets.
For example, to see whether to bother doing anything with your aluno
element, you could do:
<xsl:template match="aluno">
<xsl:if test="string()">
... do something ...
</xsl:if>
</xsl:template>
> Q2: Is there a nice XSLFO processor binary that I can easily install
> on a Windows or Linux system?
I found both XEP and FOP reasonably easy to install, especially as
they both have .bat and .sh files so that you can use them really
easily, without having to worry about classpath stuff despite the fact
they're written in Java. If you don't like using the command line,
then the Antenna House XSL Formatter is good, though it doesn't
support the full Recommendation yet, I think.
Cheers,
Jeni
---
Jeni Tennison
http://www.jenitennison.com/
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list