我有一個xsd。當我嘗試驗證它在BizTalk它給了這些錯誤:這個xsd有什麼問題?
error BEC2009: Node "<Schema>" - Schema reference "http://www.w3.org/2001/xml.xsd" is not a valid reference or does not exist in the current project.
error BEC2009: Node "<Schema>" - Schema reference "http://www.w3.org/2001/xml.xsd" is not a valid reference or does not exist in the current project.
warning BEC999: Cannot resolve the 'schemaLocation' attribute.
error BEC3001: The 'http://www.w3.org/XML/1998/namespace:space' attribute is not declared.
warning BEC999: Cannot resolve the 'schemaLocation' attribute.
warning BEC1007: Node "<Schema>" - Target namespace is empty.
我認爲這是指哪像這樣的命名空間:
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:import namespace="http://www.w3.org/XML/1998/namespace" schemaLocation="http://www.w3.org/2001/xml.xsd"/>
不知道這是足夠的信息去...
編輯:
我發現,這取決於我用什麼程序來驗證xml有時有效。例如。如果我創建一些.net代碼來驗證xml是否符合模式,它似乎讀取了xsd ok並驗證了xml。如果我在記事本++中使用xml驗證,它說它不能讀取架構。在另一個映射器(WTX)中,他們說它也不起作用。
我還可以嘗試縮小可能出現的其他問題嗎?編輯2:
感謝xcut。發現如果我在本地下載模式並將其放入BizTalk項目中,模式驗證正常,但有1個警告: 警告BEC1007:Node「」 - 目標名稱空間爲空。
您確定需要顯式地導入命名空間命名空間嗎? – 2010-01-26 01:46:50
這個模式是由第三方給我們的,但由於某種原因我們不能在我們的系統中使用它。 – dtc 2010-01-26 21:24:13