[Bug 1720] New: [FS] what is the "operand" of fs:convert-operand? what is the type of $actual?

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

           Summary: [FS] what is the "operand" of fs:convert-operand?  what
                    is the type of $actual?
           Product: XPath / XQuery / XSLT
           Version: Last Call drafts
          Platform: PC
        OS/Version: Windows 2000
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Formal Semantics
        AssignedTo: simeon@us.ibm.com
        ReportedBy: fred.zemke@oracle.com
         QAContact: public-qt-comments@w3.org


7.1.3 The fs:convert-operand function
What is the "operand" in step 3 of the description?  There are
two arguments, so it could be $actual or $expected.  
All the other steps return $actual, possibly after a cast, so
one would assume that the operand in step 3 is also $actual.
But the type of $actual is item? and the return type is 
xdt:anyAtomicType, so it seems like a mistake to say that
$actual is returned unchanged.  

Possibly the type of $actual
is really xdt:anyAtomicType? .  A cursory search for the first
few invocations of fs:convert-operand shows that its argument is the
output of fn:data, whose return type is xdt:anyAtomicType* . 
So we could probably change the signature of fs:convert-operand
so that $actual is xdt:anyAtomicType*, but then the rules do
not tell us what to do if the cardinality is greater than 1.

Possibly the answer is that the type of $actual is 
xdt:anyAtomicType?, and if the input piped from fn:data has a
cardinality greater than 1, then there is a type error
because there is no function whose signature matches the 
invocation.

Received on Monday, 18 July 2005 21:28:39 UTC