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

Blank lines in xhtml when generating with xslt and xml

Subject: Blank lines in xhtml when generating with xslt and xml
From: "Mikael Petterson (EAB)" <Mikael.Petterson@xxxxxxxxxxxxxxx>
Date: Thu, 8 May 2003 09:38:17 +0200
xml blank line
Hi,

I am generating an xhtml page with xslt with an xml. I view it with 
Nokia Mobile InternetToolkit and the WAP/XHTML browser included.
This is the page that Webserver returns ( see below). However there are 
4 blank lines in the file before the xml declaration (<?xml 
version="1.0" encoding="UTF-8"?>). In the browser I get "Bad content". 
If I reomve the blank lines in the resulting file, it will display in 
the WAP/XHTML browser. Any ideas why I get four blank lines?

Result xhtml
*************
Blank line
Blank line
Blank line
Blank line
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//WAPFORUM//DTD WML 2.0//EN" 
"http://www.wapforum.org/DTD/wml20.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" 
xmlns:wml="http://www.wapforum.org/2001/wml">
<head>
<title>2002 World Cup</title>
<link type="text/css" href="style.css" rel="stylesheet"/>
</head>
<body>
<h1>2002 Preview</h1>
<p/>
<ul>
<li>
<a href="groups.xhtml">Groups</a>
</li>
<li>
<a href="schedule.xhtml">Stage 2 Schedule</a>
</li>
<li>
<a href="locations.xhtml">Locations</a>
</li>
<li>
<a href="funfacts.xhtml">Fun Facts</a>
</li>
</ul>
</body>
</html>

xslt
**********
<?xml version="1.0"?>
<xsl:stylesheet version="1.0" xmlns="http://www.w3.org/1999/xhtml" 
xmlns:xsl="http://www.w3.org/1999/XSL/Transform" >
<xsl:output method="xml" indent = "yes" 
doctype-system="http://www.wapforum.org/DTD/wml20.dtd" 
doctype-public="-//WAPFORUM//DTD WML 2.0//EN"/>
<xsl:template match="/">
<html xmlns:wml="http://www.wapforum.org/2001/wml">
     <head>
         <title>2002 World Cup</title>
         <!--
             Change href="style.css" below to the file name and
             relative path or URL of your external style sheet.
           -->
         <link rel="stylesheet" href="style.css" type="text/css"/>
         <!--
         <style> document-wide styles would go here </style>
         -->
     </head>
     <body>
         <h1>2002 Preview</h1>
                <p>
                
                </p>
                <ul>
                        <li><a href="groups.xhtml">Groups</a></li>
                        <li><a href="schedule.xhtml">Stage 2 Schedule</a></li>
                        <li><a href="locations.xhtml">Locations</a></li>
                        <li><a href="funfacts.xhtml">Fun Facts</a></li>
                </ul>   
        </body>
</html>
</xsl:template>
</xsl:stylesheet>

xml
******************
<?xml version="1.0"?>
<index>
</index>


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


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.