[Bug 3832] Static typing in use cases

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

           Summary: Static typing in use cases
           Product: XML Query Test Suite
           Version: 1.0.1
          Platform: PC
        OS/Version: Windows XP
            Status: NEW
          Severity: normal
          Priority: P2
         Component: XML Query Test Suite
        AssignedTo: andrew.eisenberg@us.ibm.com
        ReportedBy: nick@cbcl.co.uk
         QAContact: public-qt-comments@w3.org


The following use cases tests are giving us static type checking error for
function calls on the lines indicated. I am unsure of the best resolution, but
here is the list anyway:

xmp-queries-results-q9

where contains($t/text(), "XML")

Cbcl.Xml.XPath2.XPathException: Static type check failed for function
'http://www.w3.org/2005/xpath-functions:contains'.  Expected
'http://www.w3.org/2001/XMLSchema:string?' for argument '0', but found
'http://www.w3.org/2001/XMLSchema:string*'.



rdb-queries-results-q1
rdb-queries-results-q5
rdb-queries-results-q7

contains($i/description, "Bicycle")

Cbcl.Xml.XPath2.XPathException: Static type check failed for function
'http://www.w3.org/2005/xpath-functions:contains'.  Expected
'http://www.w3.org/2001/XMLSchema:string?' for argument '0', but found
'http://www.w3.org/2001/XMLSchema:string*'.



rdb-queries-results-q9

item_tuple[year-from-date(end_date) = 1999 and month-from-date(end_date) = $m]

Cbcl.Xml.XPath2.XPathException: Static type check failed for function
'http://www.w3.org/2005/xpath-functions:year-from-date'. Expected
'http://www.w3.org/2001/XMLSchema:date?' for argument '0', but found
'http://www.w3.org/2001/XMLSchema:date*'.



string-queries-results-q2

contains($t/text(), "Foobar Corporation")

Cbcl.Xml.XPath2.XPathException: Static type check failed for function
'http://www.w3.org/2005/xpath-functions:contains'.  Expected
'http://www.w3.org/2001/XMLSchema:string?' for argument '0', but found
'http://www.w3.org/2001/XMLSchema:string*'.



string-queries-results-q4

let $partners := local:partners($c/name)

Cbcl.Xml.XPath2.XPathException: Static type check failed for function
'http://www.w3.org/2005/xquery-local-functions:partners'.  Expected
'http://www.w3.org/2001/XMLSchema:string' for argument '0', but found
'http://www.w3.org/2001/XMLSchema:string*'.



string-queries-results-q5

where contains(string($item/content), "Gorilla Corporation")

Cbcl.Xml.XPath2.XPathException: Static type check failed for function
'http://www.w3.org/2005/xpath-functions:string'.  Expected
'(http://www.w3.org/2001/XMLSchema:anyAtomicType | attribute() | comment() |
document() | element() | processing-instruction() | text())?' for argument '0',
but found 'element()*'.

Received on Friday, 13 October 2006 16:00:10 UTC