[Bug 29602] [xslt30] xml-to-json() - inconsistency between XSLT30 and XP31 specs

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

--- Comment #1 from Michael Kay <mike@saxonica.com> ---
The fallback option was dropped as a result of the decision (of the Joint WGs)
recorded here:

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

Although this decision was made in March 2015, the changes somehow didn't find
their way into the XSLT 3.0 CR. This clearly illustrates the challenge we have
given ourselves by replicating material across the F+O 3.1 and XSLT 3.0
specifications.

Getting the two specs back into line for xml-to-json() isn't completely
trivial:

(a) the F+O 3.1 spec refers to the "option parameter conventions" which define
the common (cross-function) rules for option parameters. Do we replicate these
in the XSLT 3.0 specification?

(b) we still provide XSLT stylesheets which we claim are equivalent to the
xml-to-json() function specification. However, as the function specification
has evolved, the stylesheet has not been updated. There are numerous details
where its behaviour differs, although most can be considered edge cases. For
example, it does not throw an error if a j:string element has child elements;
it treats all values of the "indent" option other than true() as false(),
rather than throwing an error; it doesn't accurately follow the escaping rules;
it makes no attempt to detect duplicate keys in a map; it reports incorrect
error codes if the input is invalid.

My firm preference for resolving these issues would be to specify this and
similar functions by means of a normative reference to the F+O 3.1
specification.

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

Received on Friday, 29 April 2016 21:10:42 UTC