W3C home > Mailing lists > Public > xml-dist-app@w3.org > March 2002

Re: xsi:type for multiref targets.

From: <noah_mendelsohn@us.ibm.com>
Date: Sat, 2 Mar 2002 14:13:23 -0500
To: Rich Salz <rsalz@zolera.com>
Cc: xml-dist-app@w3.org
Message-ID: <OF945641F0.DCB305C2-ONC1256B6F.00455B5B@lotus.com>
See Scott Cantor's answer.  xsd:integer is what schemas calls a "simple" 
type.  When used on an element, it allows no attributes, except for 
xsi:type itself, xsi:nil, maybe xsi:schemaLocation (I can't remember and 
don't have the spec here).  So, ID= is not valid on an element of any 
simple type.  You need something like:

 <xsd:complexType name="integerWithID">
     <xsd:extension base="xsd:integer"> 
       <xsd:attribute name="ID" type="xsd:id" />

Again, I'm doing this from memory, so I may have some details in the above 
schema wrong.  You could also make the ID attribute optional.  It's an 
extension because it allows elements not allowed by integer itself (I.e. 
it allows the attribute too.)  Anything with attributes is by definition a 
complex type.  Integer is a simple type.

Noah Mendelsohn                              Voice: 1-617-693-4036
IBM Corporation                                Fax: 1-617-693-8676
One Rogers Street
Cambridge, MA 02142

Rich Salz <rsalz@zolera.com>
03/01/2002 03:16 AM

        To:     noah_mendelsohn@us.ibm.com
        cc:     xml-dist-app@w3.org
        Subject:        Re: xsi:type for multiref targets.

>       <target id="x" xsi:type="xsd:integer">25</target>
> Well, that doesn't work!  The element named target is not of type 
> because it has an attribute (id=").

I must be dense.  Why?  Please use little words.
Zolera Systems, Securing web services (XML, SOAP, Signatures,
Received on Saturday, 2 March 2002 14:27:42 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 23:11:47 UTC