<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body text="#000000" bgcolor="#ffffff">
    <br>
    Sadly, fn:put provides no control over serialization options.<br>
    <br>
    You could consider using the Saxon extension function
    saxon:result-document() instead.<br>
    <br>
<a class="moz-txt-link-freetext" href="http://www.saxonica.com/documentation/extensions/functions/result-document.xml">http://www.saxonica.com/documentation/extensions/functions/result-document.xml</a><br>
    <br>
    (However, the constraint inherited from XSLT that it can't be called
    while evaluating a function may be a bit restrictive. You might be
    better off using XSLT for this job...)<br>
    <br>
    Michael Kay<br>
    Saxonica<br>
    <br>
    <br>
    <br>
    <br>
    On 22/03/2011 20:11, Vyacheslav Zholudev wrote:
    <blockquote
      cite="mid:838B5AC6-3472-4904-A75C-295829A11E1B@gmail.com"
      type="cite">Hi all,
      <div><br>
      </div>
      <div>I'm trying to produce multiple documents from a single
        XQuery. I chose to use fn:put() for this purpose. (is there a
        better way?)</div>
      <div>However, an XQuery processor (Saxon) puts an XML declaration
        "<span class="Apple-style-span" style="font-size: 12px;"><span
            style="color: rgb(25, 21, 163);">&lt;?</span></span><span
          class="Apple-style-span" style="font-size: 12px;">xml version</span><span
          class="Apple-style-span" style="font-size: 12px;"><span
            style="color: rgb(25, 21, 163);">=</span></span><span
          class="Apple-style-span" style="font-size: 12px;"><span
            style="color: rgb(121, 17, 117);">"1.0"</span></span><span
          class="Apple-style-span" style="font-size: 12px;"> encoding</span><span
          class="Apple-style-span" style="font-size: 12px;"><span
            style="color: rgb(25, 21, 163);">=</span></span><span
          class="Apple-style-span" style="font-size: 12px;"><span
            style="color: rgb(121, 17, 117);">"UTF-8"</span></span><span
          class="Apple-style-span" style="font-size: 12px;"><span
            style="color: rgb(25, 21, 163);">?&gt;".&nbsp;</span></span></div>
      <div><br>
      </div>
      <div>Is there a way to avoid this? (since the result is not XML).
        I guess it's implementation-specific, or isn't it?</div>
      <div><br>
      </div>
      <div>Thanks!!!</div>
      <div><br>
        <div>
          <div>Best,</div>
          <div>Vyacheslav</div>
          <div><br>
          </div>
          <br class="Apple-interchange-newline">
        </div>
        <br>
      </div>
      <pre wrap="">
<fieldset class="mimeAttachmentHeader"></fieldset>
_______________________________________________
<a class="moz-txt-link-abbreviated" href="mailto:talk@x-query.com">talk@x-query.com</a>
<a class="moz-txt-link-freetext" href="http://x-query.com/mailman/listinfo/talk">http://x-query.com/mailman/listinfo/talk</a></pre>
    </blockquote>
    <br>
  </body>
</html>