我似乎无法针对http://pastebin.com/jbFzRuUD
验证http://pastebin.com/cgvTdVWA以下是我得到的错误:
/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安全软件进行shema-check检查
TIA
答案 0 :(得分:0)
我通常使用像eclipse,intellij或XMLSpy这样的IDE来调试XSD和XML。 Kernow也很好
如果您在此类工具中验证XML,则会出现错误,例如
第7行,第18行元素“xs:ReelNumber”的前缀“xs”未绑定。
该特定错误意味着它无法在xs命名空间中找到ReelNumber,您应该使用dcst命名空间....等等
XSD中的targetNamespace是“http://www.smpte-ra.org/schemas/428-7/2010/DCST”
XML实例指向dcst =“http://www.smpte-ra.org/schemas/428-7/2007/DCST