Tamino XQuery User Guide - Software AG Documentation
Tamino XQuery User Guide - Software AG Documentation
Tamino XQuery User Guide - Software AG Documentation
Create successful ePaper yourself
Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.
Advanced Usage<br />
You can, however, suppress the response wrapper so that you get the bare result by using the<br />
serialization pragma and choosing the method "xml":<br />
{?serialization method="xml"?}<br />
This section contains { 3 + 6 } examples.<br />
The output is then much shorter and is restricted to the query result as such:<br />
This section contains 9 examples.<br />
Setting the MIME Media Type<br />
Using {?serialization method="xml"?} always implies that "text/xml" is used as media type for<br />
the response document. You can change this by adding media-type. The following query returns<br />
a literal SVG document which has the media type "image/svg+xml":<br />
{?serialization method="xml" media-type="image/svg+xml"?}<br />
<br />
<br />
<br />
This delivers the SVG document with the appropriate MIME media type which is then set in the<br />
HTTP response header contentType. It also means that the normal response wrapper is not used.<br />
<strong>XQuery</strong> <strong>User</strong> <strong>Guide</strong><br />
81