XBRL document will no longer load into GEPSIO


Hi Jeff

I have a working application that loads XBRL (.xml files) using GEPSIO with C# all working fine until it stopped working recently, by presenting an exception as follows:

"Type 'http://www.xbrl.org/uk/fr/gcd/2004-12-01:nonEmptyStringItemType' is not declared."

I have tried GEPSIO with older XBRL files that I had previously read successfully, but they too are now producing the same exception above, whereas prior to December last they were loaded successfully.

To test, I re-installed GEPSIO from NUGET into a new C# project and copied your sample console app code. All documents that I load into GEPSIO in this test app produce the above error.

I have a sample document attached for you to test against.

FYI I am using C# with Visual Studio 2013 Update 4.

Many thanks in advance.

file attachments


JeffreyFerguson wrote Jan 27, 2015 at 5:16 PM

Thank you for the report! I will take a look at this this evening. I will report back when I know more. I appreciate the time you took to send this to me ... thanks!

wrote Feb 12, 2015 at 1:06 PM

wrote Feb 12, 2015 at 1:06 PM

JeffreyFerguson wrote Feb 12, 2015 at 1:28 PM

I just wrote a unit test for this, and I can confirm that it does indeed fail. I will work to fix the bug, and the unit test will tell me when things are working again. I will post when I have the bug fixed.
Test Name:  WorkItem10871Test
Test FullName:  JeffFerguson.Test.Gepsio.WorkItemsTests.WorkItem10871Test
Test Source:    c:\Users\JFergu99\Source\Workspaces\gepsio\JeffFerguson.Test.Gepsio\WorkItemsTests.cs : line 103
Test Outcome:   Failed
Test Duration:  0:00:05.4130894

Result Message: 
Test method JeffFerguson.Test.Gepsio.WorkItemsTests.WorkItem10871Test threw exception: 
System.Xml.Schema.XmlSchemaException: Type 'http://www.xbrl.org/uk/fr/gcd/2004-12-01:nonEmptyStringItemType' is not declared.
Result StackTrace:  
at System.Xml.Schema.XmlSchemaSet.InternalValidationCallback(Object sender, ValidationEventArgs e)
   at System.Xml.Schema.BaseProcessor.SendValidationEvent(XmlSchemaException e, XmlSeverityType severity)
   at System.Xml.Schema.Compiler.CompileElement(XmlSchemaElement xe)
   at System.Xml.Schema.Compiler.Compile()
   at System.Xml.Schema.Compiler.Execute(XmlSchemaSet schemaSet, SchemaInfo schemaCompiledInfo)
   at System.Xml.Schema.XmlSchemaSet.Compile()
   at JeffFerguson.Gepsio.Xml.Implementation.SystemXml.SchemaSet.Compile() in c:\Users\JFergu99\Source\Workspaces\gepsio\JeffFerguson.Gepsio\Xml\Implementation\SystemXml\SchemaSet.cs:line 63
   at JeffFerguson.Gepsio.XbrlSchema..ctor(XbrlFragment ContainingXbrlFragment, String SchemaFilename, String BaseDirectory) in c:\Users\JFergu99\Source\Workspaces\gepsio\JeffFerguson.Gepsio\XbrlSchema.cs:line 205
   at JeffFerguson.Gepsio.XbrlFragment.ReadTaxonomySchemaReference(INode SchemaRefNode) in c:\Users\JFergu99\Source\Workspaces\gepsio\JeffFerguson.Gepsio\XbrlFragment.cs:line 532
   at JeffFerguson.Gepsio.XbrlFragment.ReadTaxonomySchemaReferences() in c:\Users\JFergu99\Source\Workspaces\gepsio\JeffFerguson.Gepsio\XbrlFragment.cs:line 445
   at JeffFerguson.Gepsio.XbrlFragment..ctor(XbrlDocument ParentDocument, INamespaceManager namespaceManager, INode XbrlRootNode) in c:\Users\JFergu99\Source\Workspaces\gepsio\JeffFerguson.Gepsio\XbrlFragment.cs:line 238
   at JeffFerguson.Gepsio.XbrlDocument.Parse(IDocument doc) in c:\Users\JFergu99\Source\Workspaces\gepsio\JeffFerguson.Gepsio\XbrlDocument.cs:line 300
   at JeffFerguson.Gepsio.XbrlDocument.Load(String Filename) in c:\Users\JFergu99\Source\Workspaces\gepsio\JeffFerguson.Gepsio\XbrlDocument.cs:line 204
   at JeffFerguson.Test.Gepsio.WorkItemsTests.WorkItem10871Test() in c:\Users\JFergu99\Source\Workspaces\gepsio\JeffFerguson.Test.Gepsio\WorkItemsTests.cs:line 105

JeffreyFerguson wrote Feb 13, 2015 at 10:32 AM

I'm currently investigating to see if Gepsio is running up against this .NET bug. I hope to have more information later today.

IanCrisp wrote Feb 14, 2015 at 9:20 AM

Hi Jeff


Many thanks in advance

JeffreyFerguson wrote Feb 18, 2015 at 2:44 PM

Hello Ian,

Please help me understand something about these schemas. On the surface, they don't look right. I must be missing something, and I would appreciate your assistance in understanding what I am seeing.

The datatype in question is "nonEmptyStringItemType". This data type is defined in the uk-gcd-2004-12-01.xsd schema:
<complexType name="nonEmptyStringItemType">
  <restriction base="xbrli:stringItemType">
    <minLength value="1" />
    <attributeGroup ref="xbrli:nonNumericItemAttrs" />
The schema that defines the nonEmptyStringItemType type uses a target namespace of http://www.xbrl.org/uk/fr/gcd/2004-12-01:
This would imply that the fully qualified name for the type is http://www.xbrl.org/uk/fr/gcd/2004-12-01:nonEmptyStringItemType.

One of the elements that uses the type is defined as follows:
The schema that includes this element defines the uk-gcd prefix as http://www.companieshouse.gov.uk/ef/xbrl/uk/fr/gaap/ae/2009-06-21:
Given that, the fully qualified type of the element is http://www.companieshouse.gov.uk/ef/xbrl/uk/fr/gaap/ae/2009-06-21:nonEmptyStringItemType. That doesn't match the fully qualified type definition of http://www.xbrl.org/uk/fr/gcd/2004-12-01:nonEmptyStringItemType. If that all holds up, then the compilation error is correct, because the fully qualified types don't match.

Can you help me understand where my logic is incorrect?

JeffreyFerguson wrote Feb 18, 2015 at 4:49 PM

I might have my namespaces incorrect in my example above. I'll do some more digging to make sure that the namespaces in the issue match my smaller sample.

IanCrisp wrote Feb 21, 2015 at 5:38 PM

Hi Jeff

I tried to work through your explanation but I got lost in the namespaces. I will look into it a bit more over the weekend.


IanCrisp wrote Dec 30, 2015 at 4:44 PM

Hi Jeff

I am only just able to pick back up on this and wondered if had made any progress.

Doing a bit of research, I found this
XmlSchemaSet xss = new XmlSchemaSet();
xss.Add("", xsdPath);
Does make sense to you? and would it help us out with tis issue?

Thanks & happy new Year to you


JeffreyFerguson wrote Dec 31, 2015 at 5:57 PM

Thank you for the follow-up, Ian! Let me revisit the namespace issue I wrote up above, to re-familiarize myself with the issue, and I will post a follow-up. Does this document still not load with the latest release?

IanCrisp wrote Jan 2, 2016 at 11:41 AM

Hi Jeffrey

Thanks for the quick resonse.

I re-tested with the latest Gepsio and confirm that this is still an issue.

Kind regards and Happy New Year