ACTION-1947 - Import the XPath 3.0 serialize() function to XForms 2.0

All,

As per this action item, I imported the function into XForms. I did so:

- by referring to the external specifications
- and using XSLT and XQuery Serialization 3.0's ability to add
submission methods and parameters to specify behavior which is
specific to XForms.

Here is the diff:

http://www.w3.org/MarkUp/Forms/wiki/index.php?title=XPath_Expressions_Module&diff=3800&oldid=3750

This means some changes compared with the previous text, including:

- the function signatures have changed
- the way to specify parameters (including the serialization method) has changed

I have a few open questions/comments:

- Most standard boolean serialization parameters are "yes" and "no".
Should we use that too, or "true" and "false"? Or accept both?
- There are 2 editorial notes related to linking.
- I chose to raise a dynamic error if JSON serialization fails. It can
fail, right?
- Is it unexpected to users that, by default, non-relevant nodes are
pruned? This is consistent with xforms:submission
- I made xxforms:validate throw a dynamic error. It seems better than
returning a blank string.

Comments welcome.

-Erik

Received on Wednesday, 29 May 2013 01:32:07 UTC