Hello Michael

I tried it but it creates anyway the output file but really empty this time ( i mean without  <?xml version="1.0" encoding="UTF-8"?> )
As i want not create the file, do you know if it is possible from my XSL to get the value of  parameter -o: which is given in the saxon command line. Thus, I could use it  in <xsl:result-document href=""/> and control when i want to generate my output.

Thank you
Philippe



De :        Michael Kay <mike@saxonica.com>
A :        saxon-help@lists.sourceforge.net
Date :        10/03/2011 19:17
Objet :        Re: [saxon] how to produce no xml output file




This is a tricky one, but I believe that this stylesheet will write an empty file to the principal output destination:

<xsl:template match="/">
</xsl:template>

while this one will leave the principal output destination unwritten to:

<xsl:template match="/">
    <xsl:result-document href="abc.xml"/>
</xsl:template>

If you read the spec carefully enough, you'll see that this is what it seems to be requiring, though I'm having some trouble remembering why.

So the answer is, if you want the principal output file to be untouched, then (a) don't write any nodes to the principal result tree, and (b) create a secondary output file using xsl:result-document.

Michael Kay
Saxonica

On 10/03/2011 16:54,
Philippe.Favrais@continental-corporation.com wrote:
Hello,

I have an xsl which should produce an XML file as output. However in some circumstance i would like this xsl not to produce any output file (even not an empty file).

Is there a way to avoid that my xsl produce an empty xml ?


<?xml version="1.0" encoding="UTF-8"?>



Thank you in advance

Philippe



------------------------------------------------------------------------------
Colocation vs. Managed Hosting
A question and answer guide to determining the best fit
for your organization - today and in the future.
http://p.sf.net/sfu/internap-sfd2d


_______________________________________________
saxon-help mailing list archived at
http://saxon.markmail.org/
saxon-help@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/saxon-help
------------------------------------------------------------------------------
Colocation vs. Managed Hosting
A question and answer guide to determining the best fit
for your organization - today and in the future.
http://p.sf.net/sfu/internap-sfd2d_______________________________________________
saxon-help mailing list archived at
http://saxon.markmail.org/
saxon-help@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/saxon-help