Hi Jan,
The problem is in your xsl:if test.
<xsl:if test="@lang=$selectedLanguage or
(not(following-sibling[(_at_)lang=$selectedLanguage]) and
not(preceding-sibling[(_at_)lang=$selectedLanguage]) and
@lang=$defaultLanguage)">
add "::*" between the axis name and predicate:
<xsl:if test="@lang=$selectedLanguage or
(not(following-sibling::*[(_at_)lang=$selectedLanguage]) and
not(preceding-sibling::*[(_at_)lang=$selectedLanguage]) and
@lang=$defaultLanguage)">
But you can combine the second and third test. Instead
of checking the following and preceding siblings, you can
as well check them all:
<xsl:if test="@lang=$selectedLanguage or
(not(parent::*/*[(_at_)lang=$selectedLanguage]) and
@lang=$defaultLanguage)">
Hope this helps,
Anton