Skip to content

Instantly share code, notes, and snippets.

@seocahill
Last active September 14, 2017 09:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save seocahill/5beee21f189973bc99cb47bc254edfc5 to your computer and use it in GitHub Desktop.
Save seocahill/5beee21f189973bc99cb47bc254edfc5 to your computer and use it in GitHub Desktop.
Post mortem on iXBRL validation error 10/17

iXBRL whitespace error

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.

Schema validation

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.

Error message

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment