[xsl] 2 Predicates in 1 for-each, possible?

Subject: [xsl] 2 Predicates in 1 for-each, possible?
From: "Bert" <arm@xxxxxxxxx>
Date: Tue, 10 Feb 2004 21:29:14 +0100

Allow me to ask a question about 2 predicates in 1 for-each.

I have this xml-file:

<?xml version="1.0"?>
<?xml-stylesheet type="text/xsl" href="persons01.xsl"?>


I use this stylesheet to collect some information:

<?xml version="1.0" encoding="ISO-8859-1"?>
<xsl:stylesheet version="1.0"
 <xsl:output method="xml" indent="yes"/>
 <xsl:template match="/">
   <xsl:for-each select="//communication/email[emailaddress or
    <xsl:sort select="."/>
    <xsl:value-of select="."/>
    <xsl:if test="position() != last()">,

I expected to get the following result:
e-mail@xxxxxxx(1), e-mail@xxxxxxx(2), e-mail@xxxxxx(1), e-mail@xxxxxx(2)

But what I get is this:
e-mail@xxxxxxx(1) , e-mail@xxxxxx(1)

It is obvious there is something wrong in my for-each-statement, but what?

Any help is this is welcome.

Kind regards,

 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list

Current Thread