"disable-output-escaping" is not supported in Firefox, I'm looking for another XSLT way to process the following XML file
<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="test.xsl"?>
<text>
<title>Any title</title>
<para>First para</para>
<para>Second para</para>
<para>Third para</para>
</text>
in order to produce an HTML file have a <div> box (with a blue border) around the content of all the <para> tags. The "bad" solution using "disable-output-escaping" is
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="/">
<html>
<head>
</head>
<body>
<xsl:apply-templates/>
<xsl:text disable-output-escaping="yes"></div></xsl:text>
</body>
</html>
</xsl:template>
<xsl:template match="title">
<div style="border: 3px solid red;">
<h1><xsl:value-of select="."/></h1>
</div>
<xsl:text disable-output-escaping="yes"><div style="border: 3px solid blue></xsl:text>
</xsl:template>
<xsl:template match="para">
<div style="border: 3px solid green;">
<xsl:value-of select="."/>
</div>
</xsl:template>
</xsl:stylesheet>
Any suggestion ?
para
tags in adiv
. Will thesepara
tags always be preceded by atitle
tag? – Tim Ctitle
, then open adiv
tag (in a "good" way), apply templates to all the other nodes, and close thediv
tag? – michael.hor257k