[Bug 27498] [ser 3.1]Unfailing serialization

https://www.w3.org/Bugs/Public/show_bug.cgi?id=27498

--- Comment #3 from Michael Kay <mike@saxonica.com> ---
As an outline, I propose the following:

1. A new serialization method, called perhaps "adaptive".

2. Sequence normalization is not carried out.

3. Items in the supplied sequence are serialized individually, as follows, with
an occurrence of the chosen item-separator between successive items:

a. document, element, text, comment, and processing instruction nodes are
serialized using the XML output method

b. attribute and namespace nodes are serialized as if they had a containing
element: for example xsi:type="xs:integer", or xmlns:xs="http://..../". Note
that this may result in output of QNames containing prefixes whose binding is
not displayed.

c. atomic values are serialized by casting the value to a string.

d. maps and arrays are serialized using the JSON output method.

e. functions are serialized to the representation "function fn:name#A where
fn:name is the function name and A is the arity. If the function is anonymous,
"fn:name" is replaced by the string "(anonymous)"

4. If any value cannot be output because doing so would cause a serialization
error, the processor SHOULD attempt to recover by inserting an
implementation-defined error indicator into the output, and serializating as
much of the input as can be serialized without error.

5. If the output is sent to a destination that allows hyperlinks to be included
in the generated text, then the serializer MAY include implementation-dependent
hyperlinks to provide additional information for example

a) to allow the type of atomic values to be ascertained
b) to allow the namespace binding of prefixes to be ascertained
c) to provide further information about the cause of error indicators

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

Received on Thursday, 11 December 2014 09:49:09 UTC