使用XSD验证XML命名空间的问题
需要验证的XML文档是:
<?xml version="1.0" encoding="UTF-8"?>
<?mso-infoPathSolution name="urn:schemas-microsoft-com:office:infopath:-R3:-dataFormSolution" href="manifest.xsf" solutionVersion="1.0.0.1" initialView="ͼ 1" productVersion="11.0.6357" PIVersion="1.0.0.0" ?>
<?mso-application progid="InfoPath.Document"?>
<dfs:myFields xmlns:q="http://schemas.microsoft.com/office/infopath/2003/ado/queryFields" xmlns:d="http://schemas.microsoft.com/office/infopath/2003/ado/dataFields" xmlns:dfs="http://schemas.microsoft.com/office/infopath/2003/dataFormSolution" xmlns:my="http://schemas.microsoft.com/office/infopath/2003/myXSD/2005-09-23T03:08:51">
<dfs:queryFields>
<q:Student Id="" Name=""></q:Student>
<q:XueLiCode XueLiID="" XueLiName=""></q:XueLiCode>
</dfs:queryFields>
<dfs:dataFields>
<d:Student Id="" Name="">
<d:XueLiCode XueLiID="" XueLiName=""></d:XueLiCode>
</d:Student>
</dfs:dataFields>
</dfs:myFields>
我写的XSD文档:
<?xml version="1.0" encoding="utf-8" ?>
<xsd:schema targetNamespace="http://schemas.microsoft.com/office/infopath/2003/dataFormSolution" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:q="http://leading/infopath/2003/ado/queryFields" xmlns:d="http://leading/infopath/2003/ado/dataFields" xmlns:dfs="http://schemas.microsoft.com/office/infopath/2003/dataFormSolution" >
<xsd:element name="MyFields">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="queryFields">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="Student">
<xsd:complexType>
<xsd:attribute name="Id" />
<xsd:attribute name="Name"/>
</xsd:complexType>
</xsd:element>
<xsd:element name="XueLiCode">
<xsd:complexType>
<xsd:attribute name="XueLiID"/>
<xsd:attribute name="XueLiName"/>
</xsd:complexType>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:element name="dataFields">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="Student">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="XueLiCode">
<xsd:complexType>
<xsd:attribute name="XueLiID" />
<xsd:attribute name="XueLiName"/>
</xsd:complexType>
</xsd:element>
</xsd:sequence>
<xsd:attribute name="Id"/>
<xsd:attribute name="Name"/>
</xsd:complexType>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:schema>
我现在出现的问题是,我怎么在这个XSD中去验证XML的命名空间前缀呀?象dfs,q,d.