2011-04-29 86 views
2

我似乎無法驗證http://pastebin.com/jbFzRuUDhttp://pastebin.com/cgvTdVWA爲什麼我無法驗證這個xml對這個xsd?

這裏是我得到的錯誤:

/schema-check xml.xml xsd.xsd 
    Error at file "/stuff/xml.xml", line 3, column 63 
    Message: Unknown element 'dcst:SubtitleReel' 
    Error at file "/stuff/xml.xml", line 3, column 63 
    Message: Attribute '{http://www.w3.org/2000/xmlns/}dcst' is not declared for element 'dcst:SubtitleReel' 
    Error at file "/stuff/xml.xml", line 4, column 12 
    Message: Unknown element 'dcst:Id' 
    Error at file "/stuff/xml.xml", line 5, column 26 
    Message: Unknown element 'dcst:ContentTitleText' 
    Error at file "/stuff/xml.xml", line 6, column 24 
    Message: Unknown element 'dcst:AnnotationText' 
    Error at file "/stuff/xml.xml", line 8, column 46 
    Message: Unknown element 'xs:IssueDate' 
    Error at file "/stuff/xml.xml", line 8, column 46 
    Message: Attribute '{http://www.w3.org/2000/xmlns/}xs' is not declared for element 'xs:IssueDate' 
    Fatal Error at file "/stuff/xml.xml", line 9, column 18 
    Message: The prefix 'xs' has not been mapped to any URI 

我對XML的一些經驗,少的命名空間,雖然我做我的功課,閱讀相當在w3站點和xml驗證上的命名空間上有一點點沒有發現錯誤。

我希望得到任何幫助,這是建立一個免費的在線工具bit.ly/isqd4a

我使用的在線工具來驗證,而同樣來自於Apache的XML安全軟件瑪檢查

tia

+1

在提問時,請附上具體的信息。「不起作用」,如果沒有某個具體問題的解釋(即什麼錯誤),你就無法解決NG。請閱讀http://stackoverflow.com/questions/how-to-ask – 2011-04-29 20:25:45

+0

對不起,我編輯了這個問題。謝謝 – Mcinquin 2011-04-29 20:47:52

回答

0

我通常使用eclipse,intellij或XMLSpy等IDE來調試XSD和XML。 Kernow也不錯

如果你在這樣一個工具,你得到的錯誤,如

7號線驗證XML,山口18前綴「XS」爲元素「XS:ReelNumber」未綁定。

特定誤差意味着它不能在XS命名空間中找到ReelNumber,你應該使用DCST命名空間....等等

目標名稱在XSD爲「http://www.smpte -ra.org/schemas/428-7/2010/DCST「

XML實例指向dcst =」http://www.smpte-ra.org/schemas/428-7/2007/DCST

+0

非常感謝。事實上,主要的錯誤是名稱空間的URI存在細微差別。之後,只需稍作修改,我就可以使xml驗證。問題解決了 – Mcinquin 2011-04-29 21:47:27