I'm currently working with creation and validation of XBRL instance documents in C#, and I've run into some problems regarding the XBRL instance schema file:
http://www.xbrl.org/2003/xbrl-instance-2003-12-31.xsd
According to the开发者_高级运维 .NET schema validator, the schema is not valid. It throws the following exception:
System.Xml.Schema.XmlSchemaException: If ref is present, all of <complexType>, <simpleType>, <key>, <keyref>, <unique>, nillable, default, fixed, form, block, and type must be absent.
I get the same exception when I try to use the XML Schema Definition Tool (Xsd.exe) to generate a class representation of the schema.
This surprises me since XBRL is used in quite a lot of applications, and I can't find much information about this on the web. The an rather old discussion here which suggest that it depends on the tools used for the validation:
http://www.xml.com/cs/user/view/cs_msg/1849
This seems to be right since other schema validators do not complain. XMLSpy, XML Copy Editor and also w3's own validator
http://www.w3.org/2001/03/webdata/xsv#hlp-addr
validates the schema without any problems, where as XMLFox reports the same problem as .NET.
So my questions are:
- Is the XBRL instance schema valid? I suspect that the schema spec. might be unclear, so the authors of the different tool interpret it differently.
- What should I do if I want to work with the schema in .NET? Can you as a programmer, alter the validation engine rules in any way? Are there any other possibilities than the validation mechanisms in System.XML.Schema? Perhaps third party tool as Xerces in the Java world?
Thanks
精彩评论