[Bug 29027] New: [qt3] contextDecl-022

https://www.w3.org/Bugs/Public/show_bug.cgi?id=29027

            Bug ID: 29027
           Summary: [qt3] contextDecl-022
           Product: XPath / XQuery / XSLT
           Version: Last Call drafts
          Hardware: PC
                OS: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: XQuery 3 & XPath 3 Test Suite
          Assignee: oneil@saxonica.com
          Reporter: mike@saxonica.com
        QA Contact: public-qt-comments@w3.org
  Target Milestone: ---

This test case does

      <environment>
        <context-item select="'London'"/>
      </environment>
      <test> declare context item as xs:string := 2; . </test>
      <result>
        <any-of>
          <error code="XPTY0004"/>
          <assert-eq>'London'</assert-eq>
        </any-of>
      </result>

I have some questions here about interpreting the spec.

Note that the context item is not declared "external". 

(a) Given that the context item is not declared external, is it acceptable for
the query to accept an externally-supplied value? If not, "London" is not a
valid result.

(b) Saxon is actually producing a different error, saying that the query does
not define an external context item and therefore it is an error to supply one.
There's no such error defined in the spec, but it's a reasonable thing within
the scope of API design.

I think we should avoid tests that stray into API-defined territory, and
supplying an external context item to a query that does not expect one falls
into this area.

-- 
You are receiving this mail because:
You are the QA Contact for the bug.

Received on Wednesday, 5 August 2015 10:43:36 UTC