W3C home > Mailing lists > Public > public-qt-comments@w3.org > March 2015

[Bug 28140] Options of fn:serialize

From: <bugzilla@jessica.w3.org>
Date: Tue, 10 Mar 2015 18:14:45 +0000
To: public-qt-comments@w3.org
Message-ID: <bug-28140-523-EOm28o1MKv@http.www.w3.org/Bugs/Public/>

--- Comment #2 from Michael Kay <mike@saxonica.com> ---
So, how to do it?

Doing some examples is not difficult. The four "boxed" examples in
Serialization ยง3.1 become:

map {
  "method" : "xml",
  "version" : 1.0,
  "indent" : true()

map {
  "cdata-section-elements" : ["heading", "Q{http://example.org/book}footnote"]

map {
  "method" : "html"

map {
  "method" : "Q{http://example.org/ext}jsp"
  "use-character-maps" : map {
     "&#xAB;" : "&lt;%",
     "&#xBB;" : "%&gt;"

This suggests the following decisions:

* boolean values represented as booleans, not as "yes" and "no"

* lists represented as arrays, not as whitespace-separated strings

* QNames: we should accept bare names for names in no namespace, and for
namespaced names, either an EQName as a string, or an xs:QName value. This
applies equally to keys and values.

* Character maps: a nested map

The next question is how to specify it. We could either define a mapping
directly to the serialization parameters defined in the table at the start of
serialization section 3, or we could define a transformation to the XML format
for serialization parameters. The latter has attractions because it
automatically extends when new parameters are added, but I think it's going to
be very long-winded and difficult to get to grips with, so I'm inclined to do
the former.

Rather than defining the format within the fn:serialize function, I think it
makes sense to rename Serialization 3.1 as "Setting serialization parameters by
means of an XDM document or element node", and adding a new section 3.2 as
"Setting serialization parameters by means of an XDM map". I will go on to
draft the content of that section.

You are receiving this mail because:
You are the QA Contact for the bug.
Received on Tuesday, 10 March 2015 18:14:47 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 16:57:53 UTC