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

Attribute question

From: Jonny Pony <jonnypony666@hotmail.com>
Date: Thu, 18 Dec 2003 21:53:56 +0000
To: xmlschema-dev@w3.org
Message-ID: <Law14-F70cx4vvsGOke0003139a@hotmail.com>

Hi,

I want for XML-output something like this
...
<Row>
<Entrie type="decimal" digits="3">blabla</Entrie>
<Entrie type="integer" digits="0">blabla</Entrie>
</Row>

My schema:
...
<xs:sequence>
<xs:element name="Entrie" type="xs:string">
<xs:complexType>
<xs:complexContent>
<xs:restriction base="xs:anyType">
<xs:attribute name="type" type="xs:string" use="required"/>
<xs:attribute name="digits" type="xs:integer" use="optional"/>
</xs:restriction>
</xs:complexContent>
</xs:complexType>
</xs:element>
</xs:sequence>

But this "schema code" doesn't function.
When I want to validate my xml against this schema in XMLSpy it says 
"unexpected attributes". Without attributes I can validate it. Strange.
Am I right or XMLSpy?

Thanks
Jonny

_________________________________________________________________
FreeSMS abräumen mit dem MSN Messenger - der Countdown läuft! 
http://messenger-mania.msn.de Jetzt mitmachen und gewinnen!
Received on Friday, 19 December 2003 05:43:11 GMT

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