90104: Function test xfi:items-in-tuple

Documentation

Tests of xfi:items-in-tuple($instance as element(xbrli:tuple)) as schema-element(xbrli:item)*

Owners

Name Affiliation Email Start End
Herm Fischer UBMatrix / Mark V Systems fischer@markv.com 19-02-2008 at 00:00:00

Test Case Variations


V-01 Works for an instance with tuples.

Documentation

Tests that the function returns the correct facts for an instance with tuples. This instance includes nil tuples and tuples within tuples and items within tuples.

Inputs

Outputs

  • Result test: count( $result ) eq 0

V-02 Works for an instance with tuples.

Documentation

Tests that the function returns the correct facts for an instance with tuples. This instance includes nil tuples and tuples within tuples and items within tuples.

Inputs

Outputs

  • Result test: count( $result ) eq 0

V-03 Works for an instance with tuples.

Documentation

Tests that the function returns the correct facts for an instance with tuples. This instance includes nil tuples and tuples within tuples and items within tuples.

Inputs

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

XBRL-defined error for node type incorrect.

Inputs

Outputs

  • Error code: xqt-err:XPTY0004

V-05 Works for an instance with facts of different data types.

Documentation

Tests that the function returns the correct facts for an instance and that each has proper type and PSVI atomicity type for typed operations.

Inputs

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 Created the test case.
Herm Fischer 05-12-2008 at 00:00:00 Added variations with integer and dateUnion, added data type verification.
Herm Fischer 05-12-2008 at 00:00:00 Added variations with integer and dateUnion, added data type verification.