OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

docbook-apps message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [Elist Home]


Subject: 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éphane Bline.




[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [Elist Home]


Powered by eList eXpress LLC