[Bug 7371] New: Propose empty sequence be allowed for $content argument

http://www.w3.org/Bugs/Public/show_bug.cgi?id=7371

           Summary: Propose empty sequence be allowed for $content argument
           Product: XPath / XQuery / XSLT
           Version: Candidate Recommendation
          Platform: PC
               URL: http://www.w3.org/TR/xquery-update-10/#id-upd-insert-
                    attributes
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Update Facility
        AssignedTo: jonathan.robie@redhat.com
        ReportedBy: procode@adam.com.au
         QAContact: public-qt-comments@w3.org


This is the first issue that I've logged @ w3c bugzilla so hopefully I'm
observing correct protocol.

http://www.w3.org/TR/xquery-update-10/#id-upd-insert-attributes

upd:insertAttributes(
   $target as element(),
   $content as attribute()+)

There are use cases in which $content is computed and the result may be a
sequence of zero attributes.  Therefore changing the function signature to the
following would obviate the need to test for $content being an empty sequence
prior to issuing the function call.

upd:insertAttributes(
   $target as element(),
   $content as attribute()*)

A similar argument applies to the $target argument and accordingly

upd:insertAttributes(
   $target as element()?,
   $content as attribute()*)

is arguably more flexible.

Obviously the above comments are likely to have flow on implications for other
upd:* functions to observe argument-wise consistency.

Regards

Justin Johansson


-- 
Configure bugmail: http://www.w3.org/Bugs/Public/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.

Received on Wednesday, 19 August 2009 20:30:24 UTC