90104: Function test xfi:items-in-tuple
Documentation
Owners
Name | Affiliation | Start | End | |
---|---|---|---|---|
Herm Fischer |
|
fischer@markv.com | 19-02-2008 at 00:00:00 |
Test Case Variations
V-01
Works for an instance with tuples.
Documentation
Inputs
- schema: facts-in-instance.xsd
- instance: tuple-instance.xml (DTS Discovery starting point) (ID=V01)
-
Function Call:
xfi:items-in-tuple(//concept:t1[@id eq 'i1'])
(against file V01)
Outputs
-
Result test:
count( $result ) eq 0
V-02
Works for an instance with tuples.
Documentation
Inputs
- schema: facts-in-instance.xsd
- instance: tuple-instance.xml (DTS Discovery starting point) (ID=V02)
-
Function Call:
xfi:items-in-tuple(//concept:t1[@id eq 'i3'])
(against file V02)
Outputs
-
Result test:
count( $result ) eq 0
V-03
Works for an instance with tuples.
Documentation
Inputs
- schema: facts-in-instance.xsd
- instance: tuple-instance.xml (DTS Discovery starting point) (ID=V03)
-
Function Call:
xfi:items-in-tuple(//concept:t1[@id eq 'i4'])
(against file V03)
Outputs
-
Result test:
count( $result ) eq 2 and count( $result intersect (//concept:c1[@id eq 'i5'], //concept:c1[@id eq 'i6']) ) eq 2 and (every $node in $result satisfies data($node) instance of xs:string)
V-04
Wrong node to function
Documentation
Inputs
- schema: facts-in-instance.xsd
- instance: tuple-instance.xml (DTS Discovery starting point) (ID=V04)
-
Function Call:
xfi:items-in-tuple(//concept:c1[@id eq 'i9'])
(against file V04)
Outputs
- Error code: xqt-err:XPTY0004
V-05
Works for an instance with facts of different data types.
Documentation
Inputs
- schema: facts-in-instance.xsd
- instance: multiple-types-in-tuple-instance.xml (DTS Discovery starting point) (ID=V05)
-
Function Call:
xfi:items-in-tuple(//concept:t1[@id eq 'i4'])
(against file V05)
Outputs
-
Result test:
count( $result ) eq 5 and (every $node in $result satisfies if ($node/@id eq 'i5' or $node/@id eq 'i6') then ($node instance of element(concept:c1,xs:string) and data($node) instance of xs:string) else if ($node/@id eq 'i7') then ($node instance of element(concept:i1,xs:integer) and data($node) instance of xs:integer and $node+1 eq 12346) else if ($node/@id eq 'i8') then ($node instance of element(concept:d1) and data($node) instance of xs:date and $node eq xs:date('2007-12-31')) else if ($node/@id eq 'i9') then ($node instance of element(concept:d1) and data($node) instance of xs:dateTime and $node eq xs:dateTime('2007-12-31T12:30:40')) else false())
Revisions
Name | On | Details |
---|---|---|
Herm Fischer | 30-01-2008 at 00:00:00 |
|
Herm Fischer | 05-12-2008 at 00:00:00 |
|
Herm Fischer | 05-12-2008 at 00:00:00 |
|