80211: Function test xfi:duplicate-item

Documentation

Tests of function xfi:duplicate-item($left as schema-element(xbrli:item), $right as schema-element(xbrli:item)) as xs:boolean UsesExample 25 of XBRL Spec v2.1.

Owners

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

References

http://www.xbrl.org/Specification/XF-PWD-2006-12-07.htm#_Toc152670713

Test Case Variations


V-01 Duplicates p-equal and c-equal

Documentation

Inputs

  • schema: example25.xsd
  • instance: example25-instance.xml (DTS Discovery starting point) (ID=V01)
  • Function Call: xfi:duplicate-item( //s:name[@id eq 'fName'], //s:name[@id eq 'gName'] )

    (against file V01)

Outputs

  • Result test: $result eq true()

V-02 Not duplicates not p-equal, so v-equal doesn't matter

Documentation

Inputs

  • schema: example25.xsd
  • instance: example25-instance.xml (DTS Discovery starting point) (ID=V02)
  • Function Call: xfi:duplicate-item( //s:name[@id eq 'bName'], //s:name[@id eq 'cName'] )

    (against file V02)

Outputs

  • Result test: $result eq false()

V-03 Not duplicates because not p-equal, so v-equal doesn't matter

Documentation

Inputs

  • schema: example25.xsd
  • instance: example25-instance.xml (DTS Discovery starting point) (ID=V03)
  • Function Call: xfi:duplicate-item( //s:gross[@id eq 'bGross'], //s:gross[@id eq 'cGross'] )

    (against file V03)

Outputs

  • Result test: $result eq false()

V-04 Customer, not an item

Documentation

XPath-defined error for node type incorrect.

Inputs

  • schema: example25.xsd
  • instance: example25-instance.xml (DTS Discovery starting point) (ID=V04)
  • Function Call: xfi:duplicate-item( //s:customer[@id eq 'bCustomer'], //s:customer[@id eq 'cCustomer'] )

    (against file V04)

Outputs

  • Error code: xqt-err:XPTY0004

V-05 Not duplicates because not p-equal, so v-equal doesn't matter

Documentation

Inputs

  • schema: example25.xsd
  • instance: example25-instance.xml (DTS Discovery starting point) (ID=V05)
  • Function Call: xfi:duplicate-item( //s:returns[@id eq 'bReturns'], //s:returns[@id eq 'dReturns'] )

    (against file V05)

Outputs

  • Result test: $result eq false()

V-06 Customer, not an item

Documentation

XPath-defined error for node type incorrect.

Inputs

  • schema: example25.xsd
  • instance: example25-instance.xml (DTS Discovery starting point) (ID=V06)
  • Function Call: xfi:duplicate-item( //s:customer[@id eq 'bCustomer'], //s:customer[@id eq 'dCustomer'] )

    (against file V06)

Outputs

  • Error code: xqt-err:XPTY0004

V-07 Duplicates because p-equal, u-equal, and v-equal

Documentation

Inputs

  • schema: example25.xsd
  • instance: example25-instance.xml (DTS Discovery starting point) (ID=V07)
  • Function Call: xfi:duplicate-item( //s:gross[@id eq 'lGross'], //s:gross[@id eq 'mGross'] )

    (against file V07)

Outputs

  • Result test: $result eq true()

Revisions

Name On Details
Herm Fischer 19-02-2008 at 00:00:00 Created the test case.