← Prev in month ← Prev in thread
Next in thread → Next in month →

DOCBOOK-APPS: Conditional xsl:output ? Help

From
=?iso-8859-1?P?Rt=F9phane_Cline?=
Date
2000-10-09T06:44:16+00:00
ID
00ad01c031bb$a4881140$820114ac@sbline
Thread
DOCBOOK-APPS: Conditional xsl:output ? Help
Hello,

I'd like to use the same stylesheet to output documents of different
encoding, based on the value of the 'lang' attribute. So I figure I would
just write a small XSL construct that would do the trick and I came up with
that:

<xsl:variable name="lang-attr"
                      select="($target/ancestor-or-self::*/@lang

|$target/ancestor-or-self::*/@xml:lang)[last()]"/>
<xsl:choose>
  <xsl:when test="string($lang-attr) = 'pl'">
    <xsl:output encoding="ISO-8859-2"/>
  </xsl:when>
  <xsl:otherwise>
    <xsl:output encoding="ISO-8859-1"/>
  </xsl:otherwise>
</xsl:choose>

Unfrotunately, this does not work. Is this something that XSL can't do or am
I doing it the wrong way ?

Any help appreciated...

Regards,

St廧hane Bline.
← Prev in month ← Prev in thread
Next in thread → Next in month →