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 4542 - [UPD] Section 2.6.1 fn:put: Remove it
Summary: [UPD] Section 2.6.1 fn:put: Remove it
Status: CLOSED WONTFIX
Alias: None
Product: XPath / XQuery / XSLT
Classification: Unclassified
Component: Update Facility (show other bugs)
Version: Working drafts
Hardware: PC Windows XP
: P2 normal
Target Milestone: ---
Assignee: Andrew Eisenberg
QA Contact: Mailing list for public feedback on specs from XSL and XML Query WGs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-05-04 23:41 UTC by Michael Rys
Modified: 2008-05-15 19:50 UTC (History)
0 users

See Also:


Attachments

Description Michael Rys 2007-05-04 23:41:12 UTC
Remove fn:put()! The semantics are almost completely implementation defined and not every implementation will support it. This does not belong into this spec.
Comment 1 Michael Kay 2007-05-05 08:37:39 UTC
An update facility that doesn't allow you to create or delete documents in your database seems completely weird to me. If fn:put() is poorly defined then it needs to be better defined, not dropped.
Comment 2 Michael Rys 2007-05-05 19:40:09 UTC
Many implementations already have mechanisms to define and create documents inside a database. And these mechanisms are already well-defined and specific to the "hosting" environment and need more options than fn:put can provide in an interoperable way.

Adding a function like this to the language standard does not make sense since it assumes that the hosting environment for example is URI based. But many environment are not (e.g., SQL-2006's SQL/XML).
Comment 3 John Snelson 2007-06-06 16:07:34 UTC
(In reply to comment #2)
> Adding a function like this to the language standard does not make sense since
> it assumes that the hosting environment for example is URI based. But many
> environment are not (e.g., SQL-2006's SQL/XML).

XQuery itself already assumes that the hosting environment is URI based, with it's specification of fn:doc() and fn:collection(). If you have an implementation of these functions then I imagine that you could equally well come up with a solution for the URI based fn:put().
Comment 4 Michael Rys 2007-06-06 19:33:22 UTC
Well, some implementations do not implement fn:doc() and fn:collection() because of the URL issue. Also note that creating documents using put needs potentially more complex functionality to talk about how the created objects gets mapped at the physical level (partitioning, filegroups/tablespaces etc).

Comment 5 Michael Kay 2007-06-06 19:45:12 UTC
If it doesn't implement fn:doc() and fn:collection() then it's not an XQuery implementation; but any implementation does have the option of stating that in the dynamic context, the set of available documents and the set of available collections will always be empty. Similarly, I would expect an implementation to be required to implement fn:put(), but permitted to reject any particular URI that you might supply as an unrecognized URI. 

This might sound academic, but it's much easier to write interoperable applications when you know that the function will always be available, even though you might have to include run-time logic to cope with variations as to what URIs are accepted as arguments.
Comment 6 Don Chamberlin 2007-07-31 20:51:11 UTC
Michael,
On July 31, 2007, the Query working group considered this bug and decided to retain the fn:put() function as part of the Update specification. The working group hopes that you will find this resolution acceptable and will change the status of this item to "Closed".
Regards,
Don Chamberlin (for the Query working group)
Comment 7 Michael Rys 2008-05-15 19:50:38 UTC
We still feel that fn:put() is an ill-specified function that is defining functionality that belongs to the embedding environment and will most likely not be supported interoperably in many implementations (if at all).

We will probably re-raise this issues in CR.