- From: <bugzilla@wiggum.w3.org>
- Date: Tue, 19 Jul 2005 04:06:22 +0000
- To: public-qt-comments@w3.org
- Cc:
http://www.w3.org/Bugs/Public/show_bug.cgi?id=1745 Summary: [FS] editorial: 7.1.3 The fs:convert-operand function Product: XPath / XQuery / XSLT Version: Last Call drafts Platform: All OS/Version: All Status: NEW Severity: normal Priority: P2 Component: Formal Semantics AssignedTo: simeon@us.ibm.com ReportedBy: jmdyck@ibiblio.org QAContact: public-qt-comments@w3.org 7.1.3 The fs:convert-operand function "$actual as item?" In every use of fs:convert-operand in the FS, the first argument is the result of a call to fn:data, which means it must be of type "xdt:anyAtomicType*". So "item?" could be narrowed to "xdt:anyAtomicType?". "is of type" Change to "is an instance of"? (That's the terminology that XQuery uses.) "a. if $expected is of type xdt:untypedAtomic, returns $actual cast to xs:string" After "xdt:untypedAtomic", insert "or xs:string" (with corresponding changes to STA / rules 2 and 4), otherwise I think there is a discrepancy between semantics of fs:convert-operand and the semantics described in XQuery 3.5.2 for General Comparisons. Specifically, if $actual is an instance of xdt:untypedAtomic, and $expected is an instance of a subtype of xs:string, fs:convert-operand will (currently) follow 2c and cast $actual to the type of $expected (the subtype of xs:string), whereas 3.5.2 says that it should be cast to xs:string. With the suggested change, fs:convert-operand will follow 2a and cast $actual to xs:string. (Yes, I'm doubtful that this is an important distinction, but it's a simple change, and it makes it easier to see that fs:convert-operand agrees with the XQuery doc, so why not do it?) "Otherwise, the operand is returned unchanged" Change to "Otherwise, returns $actual". STA "No conversion is needed for numeric (or empty) operands." Actually, no conversion is necessary unless $actual is an instance of xdt:untypedAtomic. STA / rule 1 / premise 2 "statEnv |- Type1 <: (xs:decimal|xs:float|xs:double)?" Change to statEnv |- not( Type1 <: xdt:untypedAtomic? ) STA / rule (2|3) / premise 1 "statEnv |- Expr1 <: Type1" Change "<:" to ":".
Received on Tuesday, 19 July 2005 04:06:27 UTC