use-character-maps vs parameter-document with db:export()

Friday, 29 September 2023 · 4 messages · last reply 9 Oct 2023
ZD
Zimmel, Daniel29 Sep 2023 17:34 #
Hi, when using db:export, the serialization parameter use-character-maps works just fine. But can someone explain why it is not possible to use parameter-document? At least, it does not work here with 10.3. As in: db:export($dbname,$path, map{ 'indent':'no', 'omit-xml-declaration':'no', 'parameter-document':'map.xml' }) OK I can see that there is no parameter-document option in the table I can find here defined for fn:serialize(): https://www.w3.org/TR/xpath-functions-31/#func-serialize When not using db:export(), all is well as described: https://docs.basex.org/wiki/Serialization#Character_mappings So in short, I think the answer is the spec. Is it? Have a nice weekend, Daniel
CG
Christian Grün3 Oct 2023 14:38 #
Quoted text · Zimmel, Daniel · 2 lines
> > Hi Daniel,
Is it?
Quoted text · Zimmel, Daniel · 1 line
>
It is. Maybe the parameter could be introduced with the 4.0 version of the spec. I invite you to add a proposal for it in the qtspecs repository [1]. Thanks, Christian [1] https://github.com/qt4cg/qtspecs/issues
ZD
Zimmel, Daniel5 Oct 2023 13:34 #
Thanks for the hint. So this would be a parameter for the implementation option that is described in detail here: https://www.w3.org/TR/xslt-xquery-serialization-31/#serparams-in-xdm-instance I was not sure, because it is declared a standard (BaseX) parameter here https://docs.basex.org/wiki/Serialization#Standard_Parameters but not getting respected in db:export() (https://docs.basex.org/wiki/Database_Module#db:export) It only works when is is declared in the prolog, as in your example on the wiki page (declare option output:parameter-document "map.xml";) Daniel
Quoted text · Christian Grün · 11 lines
Von: Christian Grün <christian.gruen at gmail.com> Gesendet: Dienstag, 3. Oktober 2023 14:38 An: Zimmel, Daniel <D.Zimmel at ESVmedien.de> Cc: BaseX <basex-talk at mailman.uni-konstanz.de> Betreff: Re: [basex-talk] use-character-maps vs parameter-document with db:export() Hi Daniel, Is it? It is. Maybe the parameter could be introduced with the 4.0 version of the spec. I invite you to add a proposal for it in the qtspecs repository [1]. Thanks, Christian [1] https://github.com/qt4cg/qtspecs/issues
CG
Christian Grün9 Oct 2023 13:42 #
Thanks, Daniel, I double-checked the documents. As you’ve already indicated, the parameter-document option is only allowed in the query prolog, i.e., it is an XQuery feature, not something that’s defined in the Serialization or XQuery Functions & Operators spec. I’ve revised our documentation. I assume the option was not light-weight enough to embed it in the other specs, but it could still be discussed in the qtspecs repo if you like. Best, Christian
Quoted text · Daniel · 57 lines
On Thu, Oct 5, 2023 at 1:34 PM Zimmel, Daniel <D.Zimmel at esvmedien.de> wrote: > Thanks for the hint. > > So this would be a parameter for the implementation option that is > described in detail here: > > > https://www.w3.org/TR/xslt-xquery-serialization-31/#serparams-in-xdm-instance > > > > I was not sure, because it is declared a standard (BaseX) parameter here > https://docs.basex.org/wiki/Serialization#Standard_Parameters but not > getting respected in db:export() ( > https://docs.basex.org/wiki/Database_Module#db:export) > > It only works when is is declared in the prolog, as in your example on the > wiki page (declare option output:parameter-document "map.xml";) > > > > Daniel > > > > *Von:* Christian Grün <christian.gruen at gmail.com> > *Gesendet:* Dienstag, 3. Oktober 2023 14:38 > *An:* Zimmel, Daniel <D.Zimmel at ESVmedien.de> > *Cc:* BaseX <basex-talk at mailman.uni-konstanz.de> > *Betreff:* Re: [basex-talk] use-character-maps vs parameter-document with > db:export() > > > > Hi Daniel, > > > > Is it? > > > > It is. Maybe the parameter could be introduced with the 4.0 version of the > spec. I invite you to add a proposal for it in the qtspecs repository [1]. > > > > Thanks, > > Christian > > > > [1] https://github.com/qt4cg/qtspecs/issues > > >

⚡Generated with XQuery