问一个xsd的问题

阿达King哥 2009-01-03 10:08:43
我用vs2005做一个xsd文件,文件如下。
<?xml version="1.0" encoding="utf-8"?>
<xs:schema id="MechaHandConfig" elementFormDefault="qualified" xmlns="http://tempuri.org/MechaHandConfig.xsd" xmlns:mstns="http://tempuri.org/MechaHandConfig.xsd" xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:element name="ManipulatorConfig" type="ManipulatorType">
<xs:annotation>
<xs:documentation>易迅科技机械手配置文件定义标准</xs:documentation>
</xs:annotation>
</xs:element>
<xs:complexType name="ManipulatorType">
<xs:sequence>
<xs:element name="BaseJoint" type="JointType">
</xs:element>
</xs:sequence>
</xs:complexType>
<xs:complexType name="JointType">
<xs:sequence>
<xs:element name="ID" type="xs:integer">
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:schema>

它总在element下面显示一条蓝色的波浪线,提示“未声明:http://tempuri.org/ManipulatorConfig.xsd:ManipulatorType类型”,这是为什么?
...全文
95 4 打赏 收藏 转发到动态 举报
写回复
用AI写文章
4 条回复
切换为时间正序
请发表友善的回复…
发表回复
lukaizhi 2009-01-04
  • 打赏
  • 举报
回复
This schema dosen't appear to be valid by itself(as a part of another sechema, it might still be OK)
No type with name "manipulatorType" has been difined in this or in included/imported schemas!

去掉 xmlns="http://tempuri.org/MechaHandConfig.xsd"

<?xml version="1.0" encoding="utf-8"?>
<xs:schema id="MechaHandConfig" elementFormDefault="qualified" xmlns="http://tempuri.org/MechaHandConfig.xsd" xmlns:mstns="http://tempuri.org/MechaHandConfig.xsd" xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:element name="ManipulatorConfig" type="ManipulatorType">
koukoujiayi 2009-01-03
  • 打赏
  • 举报
回复
不懂!!!帮顶!!!
阿达King哥 2009-01-03
  • 打赏
  • 举报
回复
不是用数据集,我想自己做一个xsd,然后定义的xml都遵循这个xsd。
koukoujiayi 2009-01-03
  • 打赏
  • 举报
回复
xsd的xml文件都是自动生成的,
很难修改,即使修改了,重新编译又回到原来的!!
可能那里设置不对!!!

110,539

社区成员

发帖
与我相关
我的任务
社区描述
.NET技术 C#
社区管理员
  • C#
  • Web++
  • by_封爱
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告

让您成为最强悍的C#开发者

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