[Bug 28540] [FO30] [FO31] defaults for serialization parameters with fn:serialize not defined


Michael Kay <mike@saxonica.com> changed:

           What    |Removed                     |Added
             Status|NEW                         |ASSIGNED

--- Comment #3 from Michael Kay <mike@saxonica.com> ---
I don't think the defaults should depend on which host language fn:serialize()
is called from. It's generally bad form for the result of a function to depend
on who is calling it, unless there is very strong justification. Also, the XSLT
rules are pretty messy.

I was first inclined to use the defaults defined in Appendix C.1 of the XQuery
spec. However, I think these leave too many things implementation-defined. The
result of fn:serialize() will typically be processed by the application, so it
really needs predictability, e.g. of whether there is going to be an XML

Also, Appendix C.1 declines to give defaults for parameters that are not
applicable to the XML output method. This begs the question, what values do
this parameters take if a different method is chosen? I have therefore given
defaults for all parameters.

So I would suggest the following:

allow-duplicate-names    no
byte-order-mark    no
cdata-section-elements    empty
doctype-public    none
doctype-system    none
encoding    utf-8 (the result is a string, not a sequence of octets, but this
still affects the encoding option in the XML declaration)    
escape-uri-attributes    yes
html-version    5
include-content-type    yes
indent    no
item-separator    tab
json-node-output-method    xml
media-type    depends on the chosen method
method    xml
normalization-form none
omit-xml-declaration no
standalone no
suppress-indentation    empty
undeclare-prefixes    no
use-character-maps    empty
version    1.0

You are receiving this mail because:
You are the QA Contact for the bug.

Received on Tuesday, 5 May 2015 21:56:00 UTC