Add to the query prolog
 
declare namespace saxon=http://saxon.sf.net/;
declare options saxon:output "omit-xml-declaration=yes";
 
Alternatively specify !omit-xml-declaration=yes on the command line.
 
Michael Kay
http://www.saxonica.com/


From: saxon-help-bounces@lists.sourceforge.net [mailto:saxon-help-bounces@lists.sourceforge.net] On Behalf Of Calum Byrom
Sent: 23 April 2008 14:18
To: Mailing list for the SAXON XSLT and XQuery processor
Subject: [saxon] Avoiding the xml version tag in xquery results

Hi,

I'm running saxon Query from the command line in order to produce some document transforms for a python app.  Whilst I can get this working ok, the command currently formats the output as an XML document - i.e. prepending the tag, '<?xml version="1.0" encoding="UTF-8"?>'.

To keep things consistent with the existing system, I'd rather not have this additional line added; is there any way I can turn this off?

Thanks,

Calum.