xml验证错误,在线等,分不够可再加

faqingsoft 2005-12-14 10:00:18
这是我的bookbase.xsd文件的代码,在visul studio .net中编写的,但是在打开他的dataset时,始终显示无效的targetNamespace,请各位高手给看看,小弟在线等

<?xml version="1.0" standalone="yes"?>
<xs:schema id="BookBase" targetNamespace="http://www.mycompany.com/bookbase.xsd"
xmlns="http://www.mycompany.com/"
xmlns:mstns="http://www.mycompany.com/"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:msdata="urn:schemas-microsoft-com:xml_msdata"
elementFormDefault="qualified"
attributeFormDefault="qualified">

<xs:element name="bookbase" msdata:IsDataSet="true" msdata:Local="zh-CN">
<xs:complexType>
<xs:choice maxOccurs="unbounded">
<!--表示图书的book元素-->
<xs:element name="book">
<xs:complexType>
<xs:sequence>
<xs:element name="ID" type="xs:string" />
<xs:element name="Name" type="xs:string" />
<xs:element name="Info" type="xs:string" minOccurs="0" />
<xs:element name="Amount" type="xs:int" minOccurs="0" />
<xs:element name="PublicDate" type="xs:dateTime" minOccurs="0" />
<xs:element name="Price" type="xs:float" minOccurs="0" />
</xs:sequence>
</xs:complexType>
</xs:element>
<!--表示图书和作者关系表的author元素-->
<xs:element name="book2author">
<xs:complexType>
<xs:sequence>
<xs:element name="bookid" type="xs:string" />
<xs:element name="authorid" type="xs:string" />
</xs:sequence>
</xs:complexType>
</xs:element>
<!--表示作者表的author元素-->
<xs:element name="author">
<xs:complexType>
<xs:sequence>
<xs:element name="ID" type="xs:string" />
<xs:element name="Name" type="xs:string" minOccurs="0" />
<xs:element name="Sex" type="xs:string" minOccurs="0" />
<xs:element name="Age" type="xs:int" minOccurs="0" />
<xs:element name="Address" type="xs:string" minOccurs="0" />
<xs:element name="Phone" type="xs:string" minOccurs="0" />
<xs:element name="Email" type="xs:string" minOccurs="0" />
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:choice>
</xs:complexType>
</xs:element>
</xs:schema>



...全文
42 回复 打赏 收藏 转发到动态 举报
写回复
用AI写文章
回复
切换为时间正序
请发表友善的回复…
发表回复

8,906

社区成员

发帖
与我相关
我的任务
社区描述
XML/XSL相关问题讨论专区
社区管理员
  • XML/XSL社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧