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

Re: Problem with .NET - Invalid particle derivation by restriction

From: Hugh Wallis <hugh_wallis@hyperion.com>
Date: Thu, 16 Oct 2003 07:59:18 -0400
Message-ID: <011801c393dc$ee25f8e0$c4941bac@hwallis2>
To: "Priscilla Walmsley" <priscilla@walmsley.com>, <xmlschema-dev@w3.org>
Cc: "Rob Blake" <robblake@microsoft.com>, "Avner Aharoni" <avnera@microsoft.com>

Thanks Dare

This is a "just useable" workaround for now but is obviously cumbersome and
less than ideal. I would be very interested to hear your response to Henry's
analysis earlier.

This issue actually is the culmination of a series of issues around this
area - originally we had the definition of xbrli:tupleType as

<complexType name="tupleType" final="extension">
<choice minOccurs="0" maxOccurs="unbounded">
    <element ref="xbrli:item" maxOccurs="unbounded" />
    <element ref="xbrli:tuple" maxOccurs="unbounded" />
</choice>
<attribute name="id" type="ID" use="optional" />
<anyAttribute namespace="##other" processContents="lax" />
</complexType>

but .NET didn't like that (again the only validator that didn't) so we
opened it up to be

<complexType name="tupleType" final="extension">
  <sequence>
    <any namespace="##other" minOccurs="0" maxOccurs="unbounded" />
  </sequence>
  <attribute name="id" type="ID" use="optional" />
  <anyAttribute namespace="##other" processContents="lax" />
</complexType>

and forced the checking of the XBRL rule that says "All element declarations
within tuples MUST be references to global element declarations that are in
substitution groups that have either item or tuple as their head" to be done
at the XBRL level and not at the XML Schema level

Cheers

Hugh

----- Original Message ----- 
To: "Hugh Wallis" <hugh_wallis@hyperion.com>; "Priscilla Walmsley"
<priscilla@walmsley.com>; <xmlschema-dev@w3.org>
Cc: "Rob Blake" <robblake@microsoft.com>; "Avner Aharoni"
<avnera@microsoft.com>
Sent: Tuesday, 14 October, 2003 12:22 PM
Subject: RE: Problem with .NET - Invalid particle derivation by restriction



Can you use this definition instead. Note that this means that <Director
/> is a valid element, but given that you allow <Director xsi:nil="true"
/> this seems like it may be satisfactory to you.

<element id="ci_Director" name="Director"
substitutionGroup="xbrli:tuple" nillable="true" >
    <complexType>
      <complexContent>
        <restriction base="xbrli:tupleType">
          <sequence>
     <choice minOccurs="0">
       <sequence>
<element ref="ci:Name" minOccurs="1" maxOccurs="1" />
<element ref="ci:Salary" minOccurs="0" maxOccurs="1" />
       </sequence>
     </choice>
          </sequence>
        </restriction>
      </complexContent>
    </complexType>
  </element>

-- 
PITHY WORDS OF WISDOM
If you lend someone $20 and never see that person again, it was probably
worth it.

This posting is provided "AS IS" with no warranties, and confers no
rights.



> -----Original Message-----
> From: Hugh Wallis [mailto:hugh_wallis@hyperion.com]
> Sent: Friday, October 10, 2003 7:50 AM
> To: Priscilla Walmsley; xmlschema-dev@w3.org
> Cc: Dare Obasanjo; Rob Blake
> Subject: Re: Problem with .NET - Invalid particle derivation
> by restriction
>
> Thanks Priscilla
>
> Unfortunately .NET continues to give the same error message
> with this change
>
> Any other ideas?
>
> Hugh
> ----- Original Message -----
> From: "Priscilla Walmsley" <priscilla@walmsley.com>
> To: "'Hugh Wallis'" <hugh_wallis@hyperion.com>; <xmlschema-dev@w3.org>
> Cc: "'Dare Obasanjo'" <dareo@microsoft.com>; "'Rob Blake'"
> <robblake@microsoft.com>
> Sent: Friday, 10 October, 2003 10:34 AM
> Subject: RE: Problem with .NET - Invalid particle derivation
> by restriction
>
>
> Hi Hugh,
>
> I believe the spec prevents you from restricting one wildcard with two
> element declarations.  Try adding an extra sequence in your type
> definition, i.e.
>
>         <restriction base="xbrli:tupleType">
>           <sequence>
>             <sequence>
>               <element ref="ci:Name" minOccurs="1" maxOccurs="1" />
>               <element ref="ci:Salary" minOccurs="0" maxOccurs="1" />
>             </sequence>
>           </sequence>
>         </restriction>
>
> This will mean that you have a one to one match between your particles
> (the one "sequence" particle restricts the one wildcard particle).
>
> This has been reported as a bug [1], but has not yet been resolved.
>
> Hope that helps,
> Priscilla
>
> -----------------------------------------------------
> Priscilla Walmsley             priscilla@walmsley.com
> Author, Definitive XML Schema     (Prentice Hall PTR)
> ----------------------------------------------------- 
>
> [1]
> http://www.w3.org/2001/05/xmlschema-rec-comments#pfiWildcardRe
> striction
>
>
> -----Original Message-----
> From: xmlschema-dev-request@w3.org
> [mailto:xmlschema-dev-request@w3.org]
> On Behalf Of Hugh Wallis
> Sent: Friday, October 10, 2003 9:33 AM
> To: xmlschema-dev@w3.org
> Cc: Dare Obasanjo; Rob Blake
> Subject: Problem with .NET - Invalid particle derivation by
> restriction
>
>
> In the attached set of files .NET objects with "Invalid particle
> derivation by restriction" at line 22 in ComplexConcept.xsd
>
> No other validator I have tried gives the same (or any) error and I
> can't for the life of me figure out what might be the problem
> (nor can a
> whole host of other very smart XML knowledgeable folks around
> the world
> that have looked at this)
>
> Could someone please confirm what is wrong or what is right please
>
> Many thanks
>
> Hugh Wallis
>
>
>
> **************************************************************
> **********
>
> If you have received this e-mail in error, please delete it and notify
> the sender as soon as possible. The contents of this e-mail may be
> confidential and the unauthorized use, copying, or dissemination of it
> and any attachments to it, is prohibited.
>
> Internet communications are not secure and Hyperion does not,
> therefore,
> accept legal responsibility for the contents of this message
> nor for any
> damage caused by viruses. The views expressed here do not necessarily
> represent those of Hyperion.
>
> For more information about Hyperion, please visit our Web site at
> www.hyperion.com
>
>
>
>
> **************************************************************
> **********
>
> If you have received this e-mail in error, please delete it
> and notify the sender as soon as possible. The contents of
> this e-mail may be confidential and the unauthorized use,
> copying, or dissemination of it and any attachments to it, is
> prohibited.
>
> Internet communications are not secure and Hyperion does not,
> therefore, accept legal responsibility for the contents of
> this message nor for any damage caused by viruses.  The views
> expressed here do not necessarily represent those of Hyperion.
>
> For more information about Hyperion, please visit our Web
> site at www.hyperion.com
>
>




************************************************************************

If you have received this e-mail in error, please delete it and notify the sender as soon as possible. The contents of this e-mail may be confidential and the unauthorized use, copying, or dissemination of it and any attachments to it, is prohibited. 

Internet communications are not secure and Hyperion does not, therefore, accept legal responsibility for the contents of this message nor for any damage caused by viruses.  The views expressed here do not necessarily represent those of Hyperion.

For more information about Hyperion, please visit our Web site at www.hyperion.com
Received on Thursday, 16 October 2003 08:34:09 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 11 January 2011 00:14:40 GMT