This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 6581 - static-context-1 ʱis-XPath2
Summary: static-context-1 ʱis-XPath2
Status: CLOSED FIXED
Alias: None
Product: XML Query Test Suite
Classification: Unclassified
Component: XML Query Test Suite (show other bugs)
Version: unspecified
Hardware: All All
: P2 normal
Target Milestone: ---
Assignee: Jonathan Robie
QA Contact: Mailing list for public feedback on specs from XSL and XML Query WGs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-02-14 18:18 UTC by Jin
Modified: 2009-04-27 03:54 UTC (History)
3 users (show)

See Also:


Attachments

Description Jin 2009-02-14 18:18:51 UTC
 
Comment 1 Jin 2009-02-14 18:21:10 UTC
sorry, a wrong key is pressed accidently...is it possible to delete this bug, and renew another one?
Comment 2 Jin 2009-02-14 18:25:36 UTC
My problem is:
is static-context-1 the XPath2 grammar? Why is-XPath2="true" in the XQTSCatalog.xml?


static-context-1:
(:*******************************************************:)
(:Test: static-context-1                                 :)
(:Written By: Carmelo Montanez                           :)
(:Date: July 12, 2006                                    :)
(:Purpose: Evaluate error condition XPST0001             :)
(:*******************************************************:)

declare namespace test = 'http://www.example.com'; 

(: insert-start :)
declare variable $input-context1 external;
(: insert-end :)

<a/> instance of element(*, test:unknownType)


but in the XQTSCatalog.xml:
<test-case is-XPath2="true" name="static-context-1" FilePath="Basics/StaticContext/" scenario="runtime-error" Creator="Carmelo Montanez">
                  <description>Evaluates an expression relies on some component of the static context that has not been assigned a value.</description>
                  <spec-citation spec="XQuery" section-number="2.1.1" section-title="Static Context" section-pointer="static_context"/>
                  <query name="static-context-1" date="2006-07-12"/>
                  <input-file role="principal-data" variable="input-context1">emptydoc</input-file>
                  <expected-error>XPST0001</expected-error>
                  <expected-error>XPTY0004</expected-error>                  
                </test-case>

Why is-XPath2="true"?
Comment 3 Michael Kay 2009-02-14 18:53:37 UTC
I've reclassified this as a bug against the XQuery test suite, rather than the language specification.

The intent of the is-XPath2 attribute, I believe, was to identify those tests that could be used when testing a product against XPath 2.0 rather than XPath 1.0. However, (a) it's almost certainly true that the current values of this attribute are not 100% reliable, and (b) it only really means that the body of the query is supposedly valid in XPath 2.0; there's still the problem of stripping out the query prolog, which is present in every test query even though it's not legal XPath syntax.
Comment 4 Jin 2009-02-15 01:02:47 UTC
Hi, Michael Kay:

Thanks for your reply. In fact, I want to extract part of testsuite to test XPath2 experssion only. I find the words "These XPath 2.0 test cases are identified in the test suite catalog." in the webpage[1]. so I think this is a good starting point. but...
The <a/> seem a element direct construction, so I think it is not the XPath2 grammar. And of course, the section of query prolog should be stripped as you as said.

Your words, "(a) it's almost certainly true that the current values of this
attribute are not 100% reliable", is true really. Some test cases with is-XPath="false" are XPath2, but some with "true" is not true now. 

The best way is to use a parser can identify the two different grammar(or the xpath2 grammar), and test the xpath2 only. One thing is the parser should be proven in its quality...


[1] http://www.w3.org/XML/Query/test-suite/
Comment 5 Andrew Eisenberg 2009-04-09 19:19:35 UTC
Because static-context-1 uses an element constructor, it is certainly not a valid instance of XPath 2.0. I have fixed the is-XPath2 attribute in the catalog to reflect this.

The members that have contributed our test cases have not always set this attribute correctly, and we have not automated the checking of this attribute. We're doing the best we can with limited resources.

We'll continue to respond to bug reports of this nature, and will put the checking of this attribute on our wish list.

Please close this bug report if you are satisfied with this response.

Comment 6 Jin 2009-04-10 01:07:21 UTC
understand:) It is not a big problem. It is natural to put it into the low priority. If I have some time in the future, I would like to do some checking works. if...:)