Am 25.08.2021 um 15:12 schrieb Yann NICOLAS (ABES):
Hi all,
I am looking for the equivalent instruction of XSLT attribute @omit-xml-declaration in XQuery.
In the Query prolog you can declare
declare namespace output = "http://www.w3.org/2010/xslt-xquery-serialization";
declare option output:method 'xml';
declare option output:omit-xml-declaration 'yes';
Thanks Martin.
In the user interface, it is working when the xml source is stored in a let variable, but it's not when the xml source is retrieved from a BaseX db.
declare namespace marc="http://www.loc.gov/MARC21/slim";
declare namespace output = "http://www.w3.org/2010/xslt-xquery-serialization";
declare option output:method 'xml';
declare option output:omit-xml-declaration 'yes';
for $record in db:open('marcxml_full')//marc:record[1]
return
$record/c