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

From: [] 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


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?