W3C home > Mailing lists > Public > xmlschema-dev@w3.org > February 2003

"item" type in XBRL - a conundrum

From: Hugh Wallis <hugh_wallis@hyperion.com>
Date: Fri, 21 Feb 2003 08:52:49 -0500
Message-ID: <005801c2d9b0$85c70780$2702a8c0@hyperion.com>
To: <xmlschema-dev@w3.org>
Esteemed XML Schema gurus:

I am working on the next release of the XBRL specification and am struggling with this issue so I seek your assistance.

In XBRL there are two sorts of elements allowed: items and tuples. I am concerned about items right now.

In the past we defined an abstract element thus:  <element name="item" type="anySimpleType" abstract="true"/> and required all XBRL elements (other than tuples) to be members of the substitutionGroup item. However it seems that this specification was actually illegal (although most parsers allowed it, one of the key ones we have to confom to, .NET, does not) since apparently you cannot actually say type="anySimpleType". Omitting type="anySimpleType" from the declaration of item is inadequate since then any member of the substitutionGroup item can be of any type, simple or complex, and that is not what we want.

To make life even more complicated, as we move to the next release of the specification we want to add the ability for an item to be a fraction and, in a previous thread on this list and on xml-dev the consensus was that that particular type is best implemented as a complex type with numerator and denominator separated.

So now we have the situation where we want to say that any item can be of any type derived from (the mystical) anySimpleType OR a fraction.

Can this be done using XML Schema? We had considered defining our own xbrli:itemType as the union of all the primitive types in XML Schema and our own fraction type and then saying <element name="item" type="xbrli:itemType" abstract="true"/> - is that going to work? Or is there another way? Or are we stuck with simply enumerating the legal types to derive from in our specification and requiring validation software to implement their own checks rather than having XML Schema help do the job for us?

I would be very grateful for guidance from the experts on this thorny (for us) issue.

Many thanks

Hugh Wallis
Vice-Chair, XBRL Specification Working Group
Distinguished Software Architect
Hyperion Solutions Corporation
5925 Airport Road, Ste. 600
Mississauga, Ontario, Canada, L4V 1W1
Received on Friday, 21 February 2003 08:53:30 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 23:15:09 UTC