Gepsio Nov 2011 CTP and iXBRL

In the discussion located here, a gentleman asked about Gepsio‘s support for iXBRL after noting that iXBRL is coming up to speed in the UK. I mentioned that I would look into it, noting that I had structured Gepsio in such a way that a document was a collection of XBRL fragments, and that the design was put in place specifically to handle multiple XBRL fragments in a document, thereby supporting the iXBRL model of XBRL embedded within a larger XML document whose root was not necessarily an XBRL root.

The gentleman with whom I had the conversation was very generous in supplying some iXBRL documents with which I could test Gepsio, and I used the following PowerShell script to load the sample and see what I could find out at a high level:

Add-Type -Path “C:\MyPathToGepsio\JeffFerguson.Gepsio.dll”

$XbrlDoc = New-Object -TypeName JeffFerguson.Gepsio.XbrlDocument
$DocumentLocation = “sample-ixbrl.xml”

Write-Host “Loading and validating” $DocumentLocation”…”
$XbrlDoc.Load($DocumentLocation)
Write-Host “Loaded.” $XbrlDoc.XbrlFragments.Count “fragments in document.”

foreach($XbrlFragment in $XbrlDoc.XbrlFragments)
{
    Write-Host $XbrlFragment.Facts.Count “facts in fragment.”
    Write-Host $XbrlFragment.Units.Count “units in fragment.”
    Write-Host $XbrlFragment.Contexts.Count “contexts in fragment.”
    WriteItemAndValue $XbrlFragment “EntityRegistrantName”
    WriteItemAndValue $XbrlFragment “TradingSymbol”
    WriteItemAndValue $XbrlFragment “DocumentPeriodEndDate”
}

Function WriteItemAndValue
{
    param($fragment, $name)
    $FoundItem = $fragment.Facts | Where-Object { $_.Name -eq $name }
    Write-Host $name “: ” $FoundItem.Value
}
As it turns out, I have good news and bad news:

  • The good news is that Gepsio parses the ful document at the XML level without errors, even when the root of the XML document is not an <xbrl> root.
  • The bad news is that Gepsio didn’t find any XBRL fragments in the supplied document, despite the document’s valid iXBRL tagging.

Gepsio makes an assumption that iXBRL fragments are marked up using the same schema as a full XBRL document, which is not the case. The iXBRL tagging structure, documented here, is not supported by Gepsio in the Nov 2011 CTP, and it will be my job to correct that flaw.

My plan is to work on Gepsio’s iXBRL support this month to see how far I get. I hope to report back on my progress soon. In my ideal world, I would like to release a new CTP of Gepsio this month that includes iXBRL support.

Wish me luck!