I received the following error message when trying to validate an iXBRL document:
Schema validation error: {3}{}{}{}
The source of the error turned out to be whitespace between a flag type tag and a nested exclude tag, e.g.
<ix:nonNumeric name=”uk-bus:DirectorSigningReport” contextRef=”CY”>
<ix:exclude>Joe Bloggs</ix:exclude>
</ix:nonNumeric>
The correct formatting should be like this...
<ix:nonNumeric><ix:exclude>String to exclude</ix:exclude>
...or whitespace should be stripped when printing the IXBRL instance view templates.
The actual cause of the error was due to automated formatting correction performed by my text editor which I committed without being aware of the potential consequences.
My own validation pipeline did not catch the error because I was not performing full schema validation on the instance.
This has since been corrected and a test added to catch the error in case another regression occurs.
You can view the code here.
Interestingly the error messages returned from my own schema validation setup are more descriptive that the rather opaque one I had to work with initially:
- "-1:-1: ERROR: cvc-length-valid: Value '\n ' with length = '52' is not facet-valid with respect to length '0' for type '#AnonType_fixedItemType'."
- "-1:-1: ERROR: cvc-complex-type.2.2: Element 'uk-direp:DirectorSigningReport' must have no element [children], and the value must be valid."
Perhaps that is something worth investigating.