This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 15979 - [Upd 3.0] fn:put() serialization parameters
Summary: [Upd 3.0] fn:put() serialization parameters
Status: RESOLVED FIXED
Alias: None
Product: XPath / XQuery / XSLT
Classification: Unclassified
Component: Update 3.0 (show other bugs)
Version: Working drafts
Hardware: PC Linux
: P2 normal
Target Milestone: ---
Assignee: John Snelson
QA Contact: Mailing list for public feedback on specs from XSL and XML Query WGs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-02-14 09:57 UTC by Jonathan Robie
Modified: 2014-01-21 17:25 UTC (History)
2 users (show)

See Also:


Attachments

Description Jonathan Robie 2012-02-14 09:57:05 UTC
When using fn:put() to create files on a file system, serialization parameters are extremely helpful for those who must edit the files later with a text editor. So it would be good to support serialization parameters for fn:put().

But if fn:put() is used to add results to a persistent store, serialization options may nor may not be relevant, depending on the store. What should a store do if it can not comply with serialization options that have been specified? Raise an error? Ignore them silently?
Comment 1 Josh Spiegel 2013-01-30 15:39:50 UTC
ACTION A-529-04 Josh to comment in the bug 15979 with a proposal for adding serialization parameters to put

-------

* 2.8.1 fn:put 

fn:put($node as node(), $uri as xs:string) as empty-sequence()
fn:put($node as node(), $uri as xs:string, $params as element(output:serialization-parameters)?) as empty-sequence()

The two-argument version of this function has the same effect as the three-argument version called with $params set to an empty sequence. This in turn is the same as the effect of passing an output:serialization-parameters element with no child elements.

The $params argument is used to identify a set of serialization parameters. These are supplied in the form of an output:serialization-parameters element, having the format described in Section 3.1 Setting Serialization Parameters by Means of a Data Model Instance SER30.  The intent is that an implementation that serializes the $node argument during storage may use the serialization parameters.  In this case, the implementation should raise a dynamic error if setting the serialization parameters produces a serialization error or if an invalid parameter value is detected.  An implementation may ignore the $params argument but must not raise an error because parameters are specified.  

Semantics, bullet 4:  
   upd:put($node, $uri) -> upd:put($node, $uri, $params)


* 3.1.12 upd:put

upd:put(
   $node as node(),
   $uri as xs:string,
   $params as element(output:serialization-parameters)?
)

Semantics:
  An implementation that uses serialization when storing the node may use the serialization parameters identified by $params.

------- 

Notes:
 - There was a question about default parameters at the WG meeting.  fn:serialize doesn't prescribe defaults so we shouldn't here either.
 - Some of the above text is copied from FNO30