[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Opera 9.51 doubles <br />

Subject: Opera 9.51 doubles <br />
From: "Manfred Staudinger" <manfred.staudinger@xxxxxxxxx>
Date: Wed, 20 Aug 2008 02:24:19 +0200
 Opera 9.51 doubles <br />
Hi,

With Opera 9.51 and using xsl:output method="html" _every_ <br />
results in 2 consecutive br elements in the DOM, and in turn in an
extra blank line. The same XML and XSLT (see below) works fine for
Opera 9.27, Firefox (from 1.0.4 up to 3.0.1) and IE-6 (MSXML3) [1].

The problem vanishes if I switch to xsl:output method="xml". But this
would produce a true xhtml which is not yet supported by an external
javascript I want to use (ga.js from Google-Analytics).

Does anyone know this problem? or have suggestions for a workaround?
Many thanks in advance,

Manfred

[1] Actually the "xhtml:br" in the match pattern below is a workaround
for a very similar problem in IE 6.

XML:
<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet href="test-br.xsl" type="text/xsl"?>
<html xmlns="http://www.w3.org/1999/xhtml">
   <head>
      <title>Test Opera br</title>
   </head>
   <body>
      <p>text before break<br />text after break</p>
   </body>
</html>

XSLT:
<?xml version="1.0" encoding="UTF-8" ?>
<xsl:stylesheet version="1.0"
   xmlns:xhtml="http://www.w3.org/1999/xhtml"
   xmlns:xsl="http://www.w3.org/1999/XSL/Transform">

<xsl:output method="html"
   encoding="UTF-8" omit-xml-declaration="yes" indent="no"/>

<xsl:template match="/">
   <xsl:apply-templates/>
</xsl:template>
<xsl:template match="*">
   <xsl:copy>
      <xsl:apply-templates select="@*|node()"/>
   </xsl:copy>
</xsl:template>
<xsl:template match="@*|text()|comment()|xhtml:br">
   <xsl:copy/>
</xsl:template>

</xsl:stylesheet>

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.