русский
Germany.ruForen → Архив Досок→ Webdesign und Hosting

вопрос по XSD (XML)

22.01.06 15:36
вопрос по XSD (XML)
 
Sevaforever постоялец
Sevaforever
вот я писал по учебнику простенькую вроде схему...
?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" attributeFormDefault="unqualified">
<xs:complexType name="messageType">
<xs:simpleContent>
<xs:restriction base="xs:string">
<xs:attribute name="number" type="xs:integer" use="required"/>
<xs:attribute name="date" type="xs:date" use="required"/>
<xs:attribute name="from" type="xs:string" use="required"/>
</xs:restriction>
</xs:simpleContent>
</xs:complexType>
<xs:element name="note">
<xs:complexType>
<xs:sequence>
<xs:element name="message" type="messageType"/>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema>
схему делал в xmlSpy 2005, а он мне выдал: this schema doesn't appear to be valid by itself (as a part of another schema, it might still be OK):
Complex type 'messageType' has the simple type 'xs:string' as a base type. The derivation method must be by extension.
Где ошибка в этой схеме? уже 2 часа смотрю на схему и понять не могу)) мож очки пора купить...))
Мы работаем ╚с огоньком╩!Городской крематорий.
 

Sprung zu