XQuery not producing doctype declaration
Posted: Wed Mar 07, 2018 3:17 pm
I have configured an XQJ connection configured to a BaseX server running locally. When I run the following code block, the XML and doctype declarations do not appear in the output. Running the same query in the BaseX GUI, I do produce both. Is there a way to generate these in my output via oXygen?
Code: Select all
declare namespace output = "http://www.w3.org/2010/xslt-xquery-serialization";
declare option output:method "xml";
declare option output:omit-xml-declaration "no";
declare option output:indent "yes";
declare option output:doctype-public "-//USP//DTD DITA Doc Std//EN";
declare option output:doctype-system "docstd_shell.dtd";
<docstd docclass="monograph-redesign" id="chapdep" xml:lang="en-US">
<title>XREF Extract</title>
{for $parent in collection('USP41-Prod-Export')//*[@testmethod='Y']
let $root := $parent/ancestor::node()[@docclass]
for $xref in $parent//xref[contains(@href, 'GUID-05F1D608-6135-4A21-B446-EE13FB4990B9')]
return
<docstd>
<docstd>
<title>{$root/data(@id)} - {$root/title/node()}</title>
<stdbody>
<p>{$xref}</p>
</stdbody>
</docstd>
<docstd id="before{$parent/@id}">{$parent}</docstd>
<docstd id="after{$parent/@id}">{$parent}</docstd>
</docstd>
}
</docstd>