This project is read-only.
1

Closed

Validation on PeriodType Duration

description

Hi Jeff,

Thanks for all the work to generate this great library. I have used and found this library very useful for my project work with SBR in XBRL format.

However, I am facing an issue relating to validation functionalities. I tried to validate a sample of SBR but got invalid document flag. The weird thing is that there's several XML node that declare similar type but error only occurs on one node type and the data seems to be really normal. Please have a look at the attached XML and try validating it to see the problem

Image

file attachments

Closed Jul 20, 2015 at 6:59 PM by JeffreyFerguson

comments

JeffreyFerguson wrote Jul 20, 2015 at 4:17 AM

Thank you for the kind words!

I will take a look at your XML shortly. The error that Gepsio is reporting may, in fact, be a valid issue, but I will take a look and find out. If it is a valid message, I will be sure to refer you to the section of the XBRL specification that discussed the validity requirement that Gepsio is reporting on.

JeffreyFerguson wrote Jul 20, 2015 at 4:20 AM

Thank you for the kind words!

I will take a look at your XML shortly. The error that Gepsio is reporting may, in fact, be a valid issue, but I will take a look and find out. If it is a valid message, I will be sure to refer you to the section of the XBRL specification that discussed the validity requirement that Gepsio is reporting on.

JeffreyFerguson wrote Jul 20, 2015 at 6:57 PM

Gepsio is correct with these errors. The context in question is defined in your XBRL instance as follows:
<xbrli:context id="CNTRCVR1">
    <xbrli:entity>
        <xbrli:identifier scheme="http://www.sbr.gov.au/id">Ar-JB1955-05-17</xbrli:identifier>
        <xbrli:segment>
            <xbrldi:explicitMember dimension="RprtPyType.02.07:ReportPartyTypeDimension">RprtPyType.02.07:SuperFundMember</xbrldi:explicitMember>
            <xbrldi:typedMember dimension="EmpAbn.02.00_typedelement:EmployersABNDimension">
                <EmpAbn.02.00_typedelement:Identifiers.AustralianBusinessNumber.Identifier>84111122223</EmpAbn.02.00_typedelement:Identifiers.AustralianBusinessNumber.Identifier>
            </xbrldi:typedMember>
            <xbrldi:typedMember dimension="SprFndAbn.02.00_typedelement:SuperFundABNDimension">
                <SprFndAbn.02.00_typedelement:Identifiers.AustralianBusinessNumber.Identifier>79111188889</SprFndAbn.02.00_typedelement:Identifiers.AustralianBusinessNumber.Identifier>
            </xbrldi:typedMember>
            <xbrldi:typedMember dimension="SprFndUSI.02.00_typedelement:SuperFundUniqueSuperannuationIdentifierDimension">
                <SprFndUSI.02.00_typedelement:SuperannuationFundDetails.UniqueSuperannuationIdentifier.Identifier>79111188889.010</SprFndUSI.02.00_typedelement:SuperannuationFundDetails.UniqueSuperannuationIdentifier.Identifier>
            </xbrldi:typedMember>
        </xbrli:segment>
    </xbrli:entity>
    <xbrli:period>
        <xbrli:startDate>2014-03-25T05:21:53.656Z</xbrli:startDate>
        <xbrli:endDate>2014-03-26T05:21:53.656Z</xbrli:endDate>
    </xbrli:period>
</xbrli:context>
The period for the context has a start date and an end date, which defines it as a duration-based context. This context has been attached to an item that uses an instant date. This is a violation of the XBRL specification. See section 4.7.2 of the XBRL Specification for more information.

Test 301.03 of the XBRL-CONF-CR5-2012-01-24 conformance suite tests for this case to ensure that this error is caught by XBRL validation code:
<?xml version="1.0"?>
<!-- Edited by Masatomo Goto (Fujitsu Ltd.) -->
<!-- Copyright 2003 XBRL International Inc.  See www.xbrl.org/legal.  All Rights Reserved. -->
<xbrl xmlns="http://www.xbrl.org/2003/instance" xmlns:link="http://www.xbrl.org/2003/linkbase" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:example="http://example.com/xbrl/taxonomy" xmlns:iso4217="http://www.xbrl.org/2003/iso4217" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://example.com/xbrl/taxonomy IdScope.xsd">
    <link:schemaRef xlink:type="simple" xlink:href="IdScope.xsd"/>
    <example:fixedAssets precision="4" contextRef="cd1" unitRef="u1">5000</example:fixedAssets>
    <example:changeInRetainedEarnings precision="4" contextRef="ci1" unitRef="u1">3000</example:changeInRetainedEarnings>
    <context id="ci1">
        <entity>
            <identifier scheme="www.example.com">example</identifier>
        </entity>
        <period>
            <instant>2003-03-31</instant>
        </period>
    </context>
    <context id="cd1">
        <entity>
            <identifier scheme="www.example.com">example</identifier>
        </entity>
        <period>
            <startDate>2002-04-01</startDate>
            <endDate>2003-03-31</endDate>
        </period>
    </context>
    <unit id="u1">
        <measure>iso4217:USD</measure>
    </unit>
</xbrl>
I will close this one as designed.

Thank you for your report, and for using Gepsio!

wrote Jul 20, 2015 at 6:59 PM

poseidon1989 wrote Jul 22, 2015 at 6:18 AM

The XBRL specification says
For an item element with periodType="instant" (See Section 5.1.1.1), the <period> MUST contain an instant element.

For an item element with periodType="duration", the Period MUST contain forever or a valid sequence of startDate and endDate.
Actually, there are few items associate with this duration-based context, for example
<emsup.02.08:SuperannuationFundDetails.EmploymentStart.Date contextRef="CNTRCVR4">2001-07-07</emsup.02.08:SuperannuationFundDetails.EmploymentStart.Date>
<emsup.02.08:SuperannuationContribution.PayPeriodStart.Date contextRef="CNTRCVR4">2014-03-25</emsup.02.08:SuperannuationContribution.PayPeriodStart.Date>
<emsup.02.08:SuperannuationContribution.PayPeriodEnd.Date contextRef="CNTRCVR4">2014-03-26</emsup.02.08:SuperannuationContribution.PayPeriodEnd.Date>
also, this is the schema for those 3 items, they are declared duration for periodType attribute
<xsd:element name="SuperannuationFundDetails.EmploymentStart.Date" id="DE7405" type="xbrli:dateItemType" block="substitution" substitutionGroup="xbrli:item" nillable="true" xbrli:periodType="duration"/>
<xsd:element name="SuperannuationContribution.PayPeriodStart.Date" id="DE12559" type="xbrli:dateItemType" block="substitution" substitutionGroup="xbrli:item" nillable="true" xbrli:periodType="duration"/>
<xsd:element name="SuperannuationContribution.PayPeriodEnd.Date" id="DE12560" type="xbrli:dateItemType" block="substitution" substitutionGroup="xbrli:item" nillable="true" xbrli:periodType="duration"/>
Moreover, the error only show up for SuperannuationFundDetails.EmploymentStart.Date only.

Is it run as expected?

wrote Nov 28 at 7:20 AM