xml schema 验证问题

lovemmz 2004-03-31 02:39:09
try
{
String schema = "";
String nameSpace = "";
XmlSchemaCollection xsc = new XmlSchemaCollection();
schema = "Getty_Vocabulary_ULAN.xsd";
nameSpace = "http://localhost";
xsc.Add(nameSpace, schema); //XSD schema
}
catch (Exception ex)
{
Console.WriteLine("{0} Exception caught.", ex);
}
请教各位这段代码有什么问题?运行到 xsc.Add(nameSpace, schema); 行时总是出现下面的错误信息, 但是通过xml spy 验证Getty_Vocabulary_ULAN.xsd文件一点问题也没有阿, 气死我也。

ex.Message "Namespace attribute must not match the real value of the enclosing <schema>'s targetNamespace. An error occurred at http://localhost/Getty_Vocabulary_ULAN.xsd(5, 3)." string
...全文
31 1 打赏 收藏 转发到动态 举报
写回复
用AI写文章
1 条回复
切换为时间正序
请发表友善的回复…
发表回复
harry_comm 2004-04-01
  • 打赏
  • 举报
回复
能否把你出错行告诉我。。

harrycomm@sina.com

8,906

社区成员

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

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