W3C home > Mailing lists > Public > public-qt-comments@w3.org > November 2008

[Bug 6221] New: [UPD] transform modify clause

From: <bugzilla@wiggum.w3.org>
Date: Wed, 12 Nov 2008 19:19:51 +0000
To: public-qt-comments@w3.org
Message-ID: <bug-6221-523@http.www.w3.org/Bugs/Public/>

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

           Summary: [UPD] transform modify clause
           Product: XPath / XQuery / XSLT
           Version: Candidate Recommendation
          Platform: PC
        OS/Version: Windows XP
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Update Facility
        AssignedTo: jonathan.robie@redhat.com
        ReportedBy: andrew.eisenberg@us.ibm.com
         QAContact: public-qt-comments@w3.org


In 2.4.5 Transform, bullet 2, we say:

2. The modify clause must contain either an updating expression, an empty
expression ( ), or a call to the fn:error function; otherwise a static error is
raised [err:XUST0002] ...


In 2.2.3 Function Declaration, bullet 2.b., we say:

b. If external is not specified, the EnclosedExpr in the function declaration
must be an updating expression or a vacuous expression; otherwise a static
error is raised [err:XUST0002].


In D.1 New Error Codes, we say:

err:XUST0002

    It is a static error if a simple expression that is not a vacuous
expression is used in one of the following positions:

       1. The modify clause of a transform expression.
       2. The top-level expression in the body of a function declaration in
which the keyword updating is specified.


Our statement in 2.4.5 Transform is not aligned with either the definition of
XUST0002 nor the other use of XUST0002 in 2.2.3 Function Declaration. Consider
the following query:

copy $e := $external_y
modify if (true) then () else fn:error()
return $e


This would be disallowed by bullet 2, but allowed by XUST0002.


I suggest that bullet 2 be changed as follows:

2. The modify clause must [insert: be an updating expression or a vacuous
expression] [remove: contain either an updating expression, an empty expression
( ), or a call to the fn:error function] ; otherwise a static error
is raised [err:XUST0002]. ...


-- 
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, 12 November 2008 19:20:06 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 16:57:25 UTC