Subject: [xsl] 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 |
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 |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] Standalone XSLT processor, Mike Brown | Thread | Re: [xsl] Blank lines in xhtml when, David Carlisle |
Re: [xsl] Standalone XSLT processor, Daniel Veillard | Date | Re: [xsl] Name function in XSL, Oleg Tkachenko |
Month |