- From: <bugzilla@wiggum.w3.org>
- Date: Tue, 11 Dec 2007 14:43:04 +0000
- To: public-qt-comments@w3.org
- CC:
http://www.w3.org/Bugs/Public/show_bug.cgi?id=5317
Summary: [UPD] Error codes for rename target expression
Product: XPath / XQuery / XSLFO / XSLT
Version: Last Call drafts
Platform: PC
OS/Version: Windows XP
Status: NEW
Severity: normal
Priority: P2
Component: Update Facility
AssignedTo: andrew.eisenberg@us.ibm.com
ReportedBy: mike@saxonica.com
QAContact: public-qt-comments@w3.org
If the result of the target expression of "rename" has the wrong type, the
following codes are defined:
1. If the result is an empty sequence, [err:XUDY0027] is raised.
2. If the result is non-empty and does not consist of a single element,
attribute, or processing instruction node, [err:XUTY0012] is raised.
(a) it's not clear why we need different codes for the two cases. As far as I'm
aware, in all other contexts where a value of a particular type is required, we
define a single code for all incorrect values. (The requirement to distinguish
the two cases makes it difficult to reuse a type checking routine that only
returns a success or failure result.)
(b) it's not clear why the first case is a dynamic error and the second a type
error. If anything, I would expect the reverse, since our usual SequenceType
matching rules are perfectly adequate for detecting the first case, but
inadequate for the second case since they don't allow union types. (But that
hasn't stopped us from defining such things as type errors in the past, see for
example the name expression of computed element constructors.)
Received on Tuesday, 11 December 2007 14:43:22 UTC