W3C home > Mailing lists > Public > www-xml-schema-comments@w3.org > January to March 2000

Re: XML Schema Question: attributing an element with a datatype?

From: Roger L. Costello <costello@mitre.org>
Date: Tue, 01 Feb 2000 07:05:04 -0500
Message-ID: <3896CBF0.7B693AC4@mitre.org>
To: haustein@kimo.cs.uni-dortmund.de, xml-dev <xml-dev@ic.ac.uk>
CC: www-xml-schema-comments@w3c.org, "Costello,Roger L." <costello@mitre.org>
Roger L. Costello wrote:
> >             <element name="cost">
> >                 <type source="money">
> >                     <attribute name="currency" minOccurs="1">
> >                         <datatype name="currencies" source="string">
> >                             <enumeration value="USD"/>
> >                             <enumeration value="CND"/>
> >                         </datatype>
> >                     </attribute>
> >                 </type>
> >             </element>
> >
> > The element "type" has an optional attribute "source" which I set to > > the user-defined datatype "money".

Stefan Haustein responded:
> I do not believe that will work. type source="..." is probably
> not intended to look into the (different) datatype namespace.

Here is an example from the XML Schema spec that I based my solution
upon:

    <element name="picture">
        <type source="binary" derivedBy="extension">
            <attribute name="pictype" type="NOTATION"/>
        </type>
    </element>

This example shows the source attribute referencing the built-in
datatype "binary".  I inferred that the source attribute could also
reference a built-in datatype (e.g., the money datatype).  Do I infer
incorrectly?  /Roger
Received on Tuesday, 1 February 2000 07:03:29 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Sunday, 6 December 2009 18:12:46 GMT