Christian Barth wrote:
Hi!


I wrote the following XSL-File:
...
<xsl:for-each
select="//Bs_Bauteil_Liste/Brandwand_Liste/Brandwand[funktion='Trennwand']">
<xsl:variable name="ID" select="@ID" />
<xsl:variable name="bez" select="bezeichnung" />
<xsl:variable name="wand_ID" select="Wand_id_Liste/wand_id"/>
<xsl:for-each
select="//[EMAIL PROTECTED]/Stockwerk_Liste/[EMAIL PROTECTED]//bau
teil_id">
<xsl:if test=". = $wand_ID">
nTrennwand=nNodeIdx;
nNodeIdx++;
Note(nTrennwand,nTrennwaende,'<xsl:value-of
select="$bez"/>','javascript:select(\'wand\', \'Trennwand\',<xsl:value-of select="$ID"/>,<xsl:value-of
select="$stock_ID"/>)','wand')
<xsl:sort select="." order="ascending" data-type="text"/>
<xsl:for-each
select="//[EMAIL PROTECTED]/Wand/Oeffnungs_Liste/Oeffnung">
...

It's just a part of the file. But the rest is working. My Problem is the
<xsl:if>. Is there anything wrong with it? It's always true.
When I write <xsl:value-of select="." /> and <xsl:value-of select="$wand_ID"
/>, the values are correct. I don't understand this.

This because this tests compares the string values of elements. So if they happen to have the same content or be both empty, the test will be true. If you want to test these are the same nodes, you can use
 <xsl:if test="generate-id(.) = generate-id($wand_ID)">

Another problem is that when I remove the <xsl:sort>-Tag I get an "Unable to
get transformer handler"-error.
I thought the sort-Tag is optional, isn't it?

Yep. Now I can't see a closing <xsl:if tag>. Is it somewhere down the XSL?

Sylvain

--
Sylvain Wallez                        Anyware Technologies
http://bluxte.net                     http://www.anyware-tech.com
Apache Software Foundation Member     Research & Technology Director


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