80129: Function test xfi:period-instant
Documentation
Owners
Name | Affiliation | Start | End | |
---|---|---|---|---|
Herm Fischer |
|
fischer@markv.com | 23-01-2008 at 00:00:00 |
References
http://www.xbrl.org/Specification/XF-PWD-2006-12-07.htm#_Toc152670682
http://www.xbrl.org/Specification/XF-PWD-2006-12-07.htm
Test Case Variations
V-01
xfi:period-instant returns correct dateTime for an instant context
Documentation
Inputs
- schema: period-instant-tests.xsd
- instance: hello-worlds-instance.xml (DTS Discovery starting point) (ID=V01)
-
Function Call:
xfi:period-instant( /xbrli:xbrl/xbrli:context[@id eq 'context-earth']/xbrli:period )
(against file V01)
Outputs
-
Result test:
($result instance of element(*,xs:dateTime) or $result instance of xs:dateTime) and count( $result ) eq 1 and $result eq xs:dateTime("2007-12-31T24:00:00")
V-02
Returns correct dateTime for concept whose context is instant
Documentation
Inputs
- schema: period-instant-tests.xsd
- instance: hello-worlds-instance.xml (DTS Discovery starting point) (ID=V02)
-
Function Call:
xfi:period-instant( xfi:period( /xbrli:xbrl/concept:cI[1] ) )
(against file V02)
Outputs
-
Result test:
($result instance of element(*,xs:dateTime) or $result instance of xs:dateTime) and count( $result ) eq 1 and $result eq xs:dateTime("2007-12-31T24:00:00")
V-03
Error for start-end duration context
Documentation
Inputs
- schema: period-instant-tests.xsd
- instance: hello-worlds-instance.xml (DTS Discovery starting point) (ID=V03)
-
Function Call:
xfi:period-instant( xfi:period( /xbrli:xbrl/concept:cD[1] ) )
(against file V03)
Outputs
- Error code: xfie:PeriodIsNotInstant
V-04
Error for forever context
Documentation
Inputs
- schema: period-instant-tests.xsd
- instance: hello-worlds-instance.xml (DTS Discovery starting point) (ID=V04)
-
Function Call:
xfi:period-instant( xfi:period( /xbrli:xbrl/concept:cD[2] ) )
(against file V04)
Outputs
- Error code: xfie:PeriodIsNotInstant
V-05
Wrong node to function
Documentation
Inputs
- schema: period-instant-tests.xsd
- instance: hello-worlds-instance.xml (DTS Discovery starting point) (ID=V05)
-
Function Call:
xfi:period-instant( /xbrli:xbrl/concept:cD[2] )
(against file V05)
Outputs
- Error code: xqt-err:XPTY0004
V-06
A sequence of periods as argument
Documentation
Inputs
- schema: period-instant-tests.xsd
- instance: hello-worlds-instance.xml (DTS Discovery starting point) (ID=V06)
-
Function Call:
xfi:period-instant( /xbrli:xbrl/xbrli:context[@id ne 'planet-earth']/xbrli:period )
(against file V06)
Outputs
- Error code: xqt-err:XPTY0004
Revisions
Name | On | Details |
---|---|---|
Herm Fischer | 23-01-2008 at 00:00:00 |
|
Herm Fischer | 15-04-2008 at 12:00:00 |
|