Date: prev next · Thread: first prev next last
2016 Archives by date, by thread · List index


Hi,

On Fri, Feb 19, 2016 at 05:41:16PM -0200, Olivier Hallot wrote:
Hi

The expression below is supposed to generate an output like <h1>, <h2>,
... depending on the value of $level [1]

<xsl:text disable-output-escaping="yes">&lt;h</xsl:text>
<xsl:value-of select="$level"/>
<xsl:text disable-output-escaping="yes">&gt;</xsl:text>

However, per [2] the expression will not work for Nestcape 6, and indeed
does not work on Firefox, but work in Rekonq (KHTML engine).

Eww, this is horrible... I wouldn't trust any XSLT source that suggests
to use code like this. It breaks the guarantee that the output XML is
well-formed.

Use

<xsl:element name="{concat('h',$level)}">
<!-- content here -->
</xsl:element>

instead.

D.

Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.