XML Schema Question: attributing an element with a datatype?
Stefan Haustein
haustein at ls8.cs.uni-dortmund.de
Tue Feb 1 11:00:38 GMT 2000
"Roger L. Costello" wrote:
>
> I reckon that I will answer my own question. To give the cost element
> an attribute currency, where the type of cost is the datatype money, you
> declare it as follows:
>
> <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
> datatype "money".
I do not belive that will work. type source="..." is probably
not intended to look into the (different) datatype namespace.
I hope the Schema people will make this more explicit, e.g.
by changing datatype references to datatype="xxx" attribute.
I think the original idea is that datatype-elements just cannot have
attributes, but I am not sure if that is really a good idea.
Best regards
Stefan
xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev at ic.ac.uk
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/ or CD-ROM/ISBN 981-02-3594-1
Please note: New list subscriptions and unsubscriptions
are now ***CLOSED*** in preparation for list transfer to OASIS.
More information about the Xml-dev
mailing list