[Home] [By Thread] [By Date] [Recent Entries]

Subject: Re: fallback parameter
From: "Anton Triest" <anton@xxxxxxxx>
Date: Thu, 23 Sep 2004 08:54:11 +0200
Hi Jan,

The problem is in your xsl:if test.

<xsl:if test="@lang=$selectedLanguage or 
  (not(following-sibling[@lang=$selectedLanguage]) and
  not(preceding-sibling[@lang=$selectedLanguage]) and
  @lang=$defaultLanguage)">

add "::*" between the axis name and predicate:

<xsl:if test="@lang=$selectedLanguage or 
  (not(following-sibling::*[@lang=$selectedLanguage]) and
  not(preceding-sibling::*[@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::*/*[@lang=$selectedLanguage]) and
  @lang=$defaultLanguage)">

Hope this helps,
Anton

Current Thread
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member