Created
April 10, 2018 12:24
-
-
Save dariok/224b5510760097b4c4896d915badc49b to your computer and use it in GitHub Desktop.
eXist: serialize XML to file
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
xquery version "3.1"; | |
declare namespace output = "http://www.w3.org/2010/xslt-xquery-serialization"; | |
let $result := transform:transform($xml, $xsl, $transformationParams) | |
let $serializazionParams := | |
<output:serialization-parameters> | |
<output:method value="xml"/> | |
<output:omit-xml-declaration value="no"/> | |
<output:doctype-public value="-//OASIS//DTD DocBook XML V4.2//EN"/> | |
<output:doctype-system value="http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd"/> | |
<output:encoding value="ISO-8859-1"/> | |
<output:indent value="yes"/> | |
</output:serialization-parameters> | |
let $write := file:serialize($result, $fullPathToFile, $serializazionParams) | |
return response:redirect-to(xs:anyURI($fullPathToFileOnWeb)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment