4
<?xml version="1.0" encoding="utf-8"?>
<xs:schema xmlns="http://tempuri.org/ServiceDescription.xsd" xmlns:mstns="http://tempuri.org/ServiceDescription.xsd" xmlns:xs="http://www.w3.org/2001/XMLSchema" targetNamespace="http://tempuri.org/ServiceDescription.xsd" elementFormDefault="qualified" id="ServiceDescription">
<xs:element name="Template">
<xs:complexType>
<xs:complexContent>
<xs:extension base="ServiceType">
<xs:all>
<xs:element name="TemplateCode" type="xs:string"/>
</xs:all>
</xs:extension>
</xs:complexContent>
</xs:complexType>
</xs:element>
<xs:complexType name="ServiceType">
<xs:all>
<xs:element name="ServiceCode" type="xs:string"/>
</xs:all>
</xs:complexType>
</xs:schema>
當我試圖把它保存在XMLSpy的它告訴我使用xs:all擴展XML模式類型有什麼問題?
的「所有」模型組既不復雜類型定義允許「mstns:服務類型」,也不在其擴展名「{匿名}」。
單擊詳細信息給出鏈接到a paragraph in XML Schema specification,我不明白。
新增:啊,是的,忘了提 - 錯誤的行是這一個:
<xs:element name="TemplateCode" type="xs:string"/>
除了元素會有嚴格的順序,這是我不想要的。等等。 – 2010-01-15 14:43:01