Discussion:
[xquery-talk] Question about a QT3 test
Joe Wicentowski
2016-09-08 20:14:37 UTC
Permalink
Hi all,

I'm looking at the QT3 tests and trying to understand by what
mechanism this expression

fn:collection('http://www.w3.org/2010/09/qt-fots-catalog/integers')

... is supposed to return

(1 to 10)

This is test case cbcl-collection-002 in
qt3/2011/QT3-test-suite/fn/collection.xml. I've pasted the full test
case in below.

Thanks!
Joe

```
<test-case name="cbcl-collection-002" covers="fn-collection">
<description> test fn:collection with non-node collection.</description>
<created by="Tim Mills" on="2016-08-19"/>
<environment ref="integer-collection"/>
<dependency type="spec" value="XQ31+"/>
<test>fn:collection('http://www.w3.org/2010/09/qt-fots-catalog/integers')</test>
<result>
<assert-deep-eq>(1 to 10)</assert-deep-eq>
<assert-type>xs:integer+</assert-type>
</result>
</test-case>
```
_______________________________________________
***@x-query.com
http://x-query.com/mailman/listinfo/talk
Michael Kay
2016-09-14 08:23:34 UTC
Permalink
The test has a reference to the environment integer-collection which is defined like this:

<environment name="integer-collection">
<collection uri="http://www.w3.org/2010/09/qt-fots-catalog/integers">
<query>1 to 10</query>
</collection>
</environment>

The specification of what can appear here, and what it means, is partly in the user documentation (directory "guide") and partly in the catalog.xsd schema; though like all documentation, it's not always up to date.

Michael Kay
Saxonica
Post by Joe Wicentowski
Hi all,
I'm looking at the QT3 tests and trying to understand by what
mechanism this expression
fn:collection('http://www.w3.org/2010/09/qt-fots-catalog/integers')
... is supposed to return
(1 to 10)
This is test case cbcl-collection-002 in
qt3/2011/QT3-test-suite/fn/collection.xml. I've pasted the full test
case in below.
Thanks!
Joe
```
<test-case name="cbcl-collection-002" covers="fn-collection">
<description> test fn:collection with non-node collection.</description>
<created by="Tim Mills" on="2016-08-19"/>
<environment ref="integer-collection"/>
<dependency type="spec" value="XQ31+"/>
<test>fn:collection('http://www.w3.org/2010/09/qt-fots-catalog/integers')</test>
<result>
<assert-deep-eq>(1 to 10)</assert-deep-eq>
<assert-type>xs:integer+</assert-type>
</result>
</test-case>
```
_______________________________________________
http://x-query.com/mailman/listinfo/talk
_______________________________________________
***@x-query.com
http://x-query.com/mailman/listinfo/talk

Loading...