Yes, it comes from the writeDocType routine in the XMLEmitter. It reflects the fact that users generally put a newline between the XML declaration and the DOCTYPE declaration, and the spec allows it. It's not needed in the HTML case, but does it give you a problem?
 
Michael Kay
-----Original Message-----
From: saxon-help-admin@lists.sourceforge.net [mailto:saxon-help-admin@lists.sourceforge.net] On Behalf Of Thom Kuhn
Sent: 27 January 2003 17:37
To: saxon-help@lists.sourceforge.net
Subject: [saxon] Blank line (CR) as first line of output files.

All of my HTML output files begin with a carriage return before the <!DOCTYPE
Any idea where it is coming from?
 
Thanks,
 
Thom Kuhn
ACP
 
Here are some snippets:
 
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.1" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:dc="http://purl.org/dc/elements/1.1" xmlns:saxon="http://icl.com/saxon" extension-element-prefixes="saxon">
. . .
 
 <xsl:output doctype-public="-//W3C//DTD HTML 4.01 Transitional//EN" indent="no" doctype-system="http://www.w3.org/TR/html4/loose.dtd" method="html" version="4.01" encoding="utf-8" saxon:omit-meta-tag="yes" saxon:character-representation="native;native"/>
. . .
 
  <!-- CREATES THE MAIN DISEASE PAGE
  -->
  <xsl:document href="{concat($dir,$filesep,$ModuleID,'.html')}" method="html" encoding="utf-8">
   <html>