XQuery Prolog with serialization settings - basex "Unknown option 'basex'?

Monday, 13 February 2023 · 3 messages
MH
Martin Honnenin reply to Patrick Durusau, 13 Feb 2023, 21:2813 Feb 2023 20:39 #
Quoted text · Patrick Durusau · 27 lines
On 2/13/2023 8:28 PM, Patrick Durusau wrote: > Greetings! > > I have the following in the prolog of an XQuery: > > declare namespace output = > 'http://www.w3.org/2010/xslt-xquery-serialization'; > declare option output:method 'basex'; > declare option output:basex 'indent=yes, newline=\n'; > > I'm following the example at: > https://docs.basex.org/wiki/Serialization for CSV, reasoning the same > form should work for basex. > > Sadly, BaseX 10.4 on Debian reports: > > [XQST0109] Unknown option 'basex > > Is it because basex isn't in the namespace of > 'http://www.w3.org/2010/xslt-xquery-serialization'; ? > > OK so I change the namespace to http://tm.durusau.net and it runs! > > Sadly not applying the requested formatting. > > Some guidance on serialization please? >
I think the right syntax is
declare namespace output =
'http://www.w3.org/2010/xslt-xquery-serialization';
declare option output:method 'basex';
declare option output:indent 'yes';
declare option output:newline '\n';
PD
Patrick Durusau13 Feb 2023 21:28 #
Greetings! I have the following in the prolog of an XQuery:
declare namespace output =
'http://www.w3.org/2010/xslt-xquery-serialization';
declare option output:method 'basex';
declare option output:basex 'indent=yes, newline=\n';
I'm following the example at: https://docs.basex.org/wiki/Serialization for CSV, reasoning the same form should work for basex. Sadly, BaseX 10.4 on Debian reports: [XQST0109] Unknown option 'basex Is it because basex isn't in the namespace of 'http://www.w3.org/2010/xslt-xquery-serialization'; ? OK so I change the namespace to http://tm.durusau.net and it runs! Sadly not applying the requested formatting. Some guidance on serialization please? Thanks! Patrick
-- Patrick Durusau patrick at durusau.net Technical Advisory Board, OASIS (TAB) Editor, OpenDocument Format TC (OASIS), Project Editor ISO/IEC 26300 Co-Editor, ISO/IEC 13250-1, 13250-5 (Topic Maps) Another Word For It (blog): http://tm.durusau.net Homepage: http://www.durusau.net Twitter: patrickDurusau
PD
Patrick Durusauin reply to Martin Honnen, 13 Feb 2023, 20:3913 Feb 2023 22:04 #
Thanks! That works! I have a separate question on formatting attributes but will post that separately. Hope you are having a great week! Patrick
Quoted text · Martin Honnen · 39 lines
On 2/13/23 14:39, Martin Honnen wrote: > > On 2/13/2023 8:28 PM, Patrick Durusau wrote: >> Greetings! >> >> I have the following in the prolog of an XQuery: >> >> declare namespace output = >> 'http://www.w3.org/2010/xslt-xquery-serialization'; >> declare option output:method 'basex'; >> declare option output:basex 'indent=yes, newline=\n'; >> >> I'm following the example at: >> https://docs.basex.org/wiki/Serialization for CSV, reasoning the same >> form should work for basex. >> >> Sadly, BaseX 10.4 on Debian reports: >> >> [XQST0109] Unknown option 'basex >> >> Is it because basex isn't in the namespace of >> 'http://www.w3.org/2010/xslt-xquery-serialization'; ? >> >> OK so I change the namespace to http://tm.durusau.net and it runs! >> >> Sadly not applying the requested formatting. >> >> Some guidance on serialization please? >> > > I think the right syntax is > > > declare namespace output = > 'http://www.w3.org/2010/xslt-xquery-serialization'; > declare option output:method 'basex'; > declare option output:indent 'yes'; > declare option output:newline '\n'; >
-- Patrick Durusau patrick at durusau.net Technical Advisory Board, OASIS (TAB) Editor, OpenDocument Format TC (OASIS), Project Editor ISO/IEC 26300 Co-Editor, ISO/IEC 13250-1, 13250-5 (Topic Maps) Another Word For It (blog): http://tm.durusau.net Homepage: http://www.durusau.net Twitter: patrickDurusau

⚡Generated with XQuery