Type is unsupported as a restriction base type

Jul 8, 2009 at 12:03 PM

Dear all
I’m using Gepsio to validate a xbrl document that contains the custom complex type TipoFIMType that is defined as:

<complexType name="TipoFIMType">
                <restriction base="xbrli:stringItemType">
                         <minLength fixed="true" value="2" /> 
                         <maxLength fixed="true" value="2" /> 
                         <attribute name="id" use="optional" type="ID" /> 
                         <attribute name="contextRef" use="required" type="IDREF" /> 

I think  that this definition is correct, but after load the document I get the next error:

Simple type xbrli:stringItemType is unsupported as a restriction base type”.

Source  :   


Stack trace:

in JeffFerguson.Gepsio.SimpleType.CreateRestrictionType(XmlNode CurrentChildNode)
in JeffFerguson.Gepsio.SimpleType..ctor(XmlNode SimpleTypeRootNode)
in JeffFerguson.Gepsio.ComplexType..ctor(XmlNode ComplexTypeNode)
in JeffFerguson.Gepsio.XbrlSchema.ReadComplexTypes()
in JeffFerguson.Gepsio.XbrlSchema..ctor(XbrlFragment ContainingXbrlFragment, String SchemaFilename, String BaseDirectory)
in JeffFerguson.Gepsio.XbrlFragment.ReadTaxonomySchemaRef(XmlNode SchemaRefNode)
in JeffFerguson.Gepsio.XbrlFragment.ReadTaxonomySchemaRefs()
in JeffFerguson.Gepsio.XbrlFragment..ctor(XbrlDocument ParentDocument, XmlNode XbrlRootNode)
in JeffFerguson.Gepsio.XbrlDocument.Load(String Filename)
in Caixalaietana.Win.GenerarDocumentXBRL.FrmGeneracio.btnValidarFitxer_Click(Object sender, EventArgs e) en C:\ProjectesCEL\win2008\Caixalaietana.Win.GenerarDocumentXBRL\FrmGeneracio.cs:línea 82

I don’t understand what happend.
Can you help me?

Thank you

Ramón Andrés Roger

Jul 8, 2009 at 2:36 PM

Hello Ramón,

Would it be possible for you to attach the XBRL document and the schemas for the document (including the schema that defines the complex type in question) so I can trace the issue in a debugger?

Many thanks,

Jeff Ferguson

Jul 9, 2009 at 11:47 AM

Hello Jeff

You can download a .zip file with all you need in:
If you need more tell me.

Thanks for your interest
Ramon Andres

Jun 30, 2010 at 5:23 PM
Edited Jun 30, 2010 at 5:25 PM

I've run into the same problem.  I've traced my particular issue in the code to the CreateType(...) method in the AnyType abstract class, which creates an object that implements the AnyType abstract class based on the type name passed into it.  In my case, the XBRL schema I'm working with contains a complexType of simpleContent that has a restriction based on xbrli:integerItemType (i.e. <restriction base="xbrli:integerItemType">).  However, only the following classes implement the AnyType abstract class in the Gepsio library


The classes above support the following types, respectively:


My particular problem is that xbrli:integerItemType is not in the list and a class hasn't been implemented to support it.  Taking a look at the xbrli schema, there are many other types that can possibly be used in an XBRL instance that can potentially throw this error if the XBRL schema uses any of the types unsupported by Gepsio.  Is there some reason why only these particular types above are supported in Gepsio?  Is it lack of time to implement all the available types or is there some technical reason why "integer" was left out (among others)?  Seems to me like "integer" is an obvious one that should have made the cut.  Do you accept code contributions?

One more thing.  After going back to the original post, I noticed the problem there was the "stringItemType", which I see is supported so obviously it looks like this issue was resolved for strings.  The dead thread makes it look like the discussion just died and nothing was done about it.   Food for thought.






Jul 12, 2010 at 2:41 PM
I apologize for the delayed response -- things have been busy. I wanted to give you my philosophy for building Gepsio and why some things are currently available and some are currently not. I have been working on getting the code to pass the XBRL Conformance Suite of unit tests. Once I find a failing unit test, I stop what I am doing, add enough code into Gepsio to make the unit test pass, and then rerun the tests. This builds Gepsio up in a methodical way that will, eventually, get all of the unit tests to pass and ensures that Gepsio is a pretty conformant XBRL library. Some of the data types are currently missing simply because I have not yet encountered them in unit tests. I thank you all for the report of the missing types. It is encouraging to see the complaints :) because it means that someone is using the code. I have not abandoned work on Gepsio; in fact, I recently added code for XBRL Dimensions and am actively working to get it to pass more unit tests. I will do my best to have another CTP out in Aug or Sep 2010. I will take a look at the ZIP file that randresr posted and will see what I can do about getting Gepsio to correctly validate the document in time for the next CTP. Thank you all for your support of Gepsio -- your encouragement is what will keep me going with further development work. Keep those bug reports coming!
Aug 7, 2010 at 2:48 AM

Hi Jeff,

I am new to codeplex, but am following this project with a great deal of interest.  Looking forward to seeing how you incorporate xbrl dimensions.