这是在spy2004 home edition中利用xsd对一个xml文件进行验证的出现的问题,以下分别是两个文件的内容以及出现的错误提示ch06_02.xml:<?xml version="1.0"?>
<!--ch06_02.xml-->
<document xmlns="http://xmlpowercorp" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://xmlpowercorp ch06_03.xsd">
<text>
        Welcome to XML Schemas!
    </text>
</document>ch06_03.xsd:<?xml version="1.0"?>
<!--ch06_03.xsd-->
<xsd:schema targetNamespace="http://xmlpowercorp" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://xmlpowercorp" elementFormDefault="qualified" attributeFormDefault="qualified">
<xsd:element name="document">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="text" type="xsd:string"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:schema>
错误提示:
Your schema uses attributeFormDefault='qualified'--you must specify a prefix for your schema namespace 'http://xmlpowercorp'
谢谢大家