我有一個元素爲0的XML表單,它格式正確但無效。 當我嘗試驗證它時,XMLSpy出現以下錯誤: 「隱藏」的空元素內不允許有任何內容。 下面是我的架構:如何解決XSD驗證錯誤?
<xs:element name="hidden">
<xs:complexType>
<xs:attribute name="datatype" type="xs:string" use="optional"/>
<xs:attribute name="alias" type="xs:string" use="optional"/>
<xs:attribute name="source" type="xs:string" use="optional"/>
<xs:attribute name="name" type="xs:string" use="required"/>
<xs:attribute name="lookup" type="xs:string" use="optional"/>
</xs:complexType>
</xs:element>
我需要什麼添加到上面的架構來解決這個問題? Thanx ml
你還沒有設法以可見的方式附加你的模式 - 你可以讓它和你的示例XML在服務器上的某個地方可用並鏈接到它們嗎? – 2009-01-15 12:59:52
我修好了 - 它只需要縮進四個空格來顯示。 – 2009-01-15 13:00:39