我发现了一些会生成错误消息的文件,现在我想修复这些错误。如何解决以下错误?
如果我做
mediainfo --Output=XML 7483.MOV >data.xml
然后我编辑文件并删除了很多不需要产生错误的行,然后
java -jar /opt/local/share/java/saxon9he.jar data.xml test.xsl
我得到错误:
Error on line 2 column 29 of data.xml:
SXXP0003: Error reported by XML parser: The prefix "dt" for attribute "dt:dt" associated
with an element type "CNDB" is not bound.
Transformation failed: Run-time errors were reported
test.xsl 包含:
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="2.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:fmp="http://www.filemaker.com/fmpxmlresult" exclude-result-prefixes="fmp date redirect"
xmlns:saxon="http://icl.com/saxon"
xmlns:date="http://www.jclark.com/xt/java/java.util.Date"
xmlns:redirect="http://xml.apache.org/xalan/redirect"
xmlns:lxslt="http://xml.apache.org/xslt"
xmlns:dt="urn:schemas-microsoft-com:datatypes" dt:dt="binary.base64"
xmlns:xalan="org.apache.xalan.xslt.extension.redirect"
extension-element-prefixes="saxon xalan redirect dt">
</xsl:stylesheet>
data.xml 包含:
<?xml version="1.0" encoding="UTF-8"?>
<CNDB dt:dt="binary.base64">Q00WIUNNFiFDTRYhQ00WIUNNFiFDTRYhQ00WIUNNFiFDTRYhQ00WIUNNFiFDTRYhQ00WIUNNFiFDTRYhQ00WIUNNFiFDTRYhQ00WIUNNFiFDTRYhQ00WIUNNFiFDTRYhQ00W
IUNNFiFDTRYhQ00WIUNNFiFDTRYhQ00WIUNNFiFDTRYhQ00WIUNNFiFDTRYhQ00WIUNNFiFDTRYhQ00WIUNNFiFDTRYhQ00WIUNNFiFDTRYhQ00WIUNNFiFDTRYhQ00WIUNNFiFDTRYhQ00WIUNNFiFDTRYhQ00W
IT1NFiE9TRYhPU0WIT1NFiE9TRYhPU0WIT1NFiE9TRYhPU0WIT1NFiE9TRYhPU0WIT1NFiE9TRYhPU0WIT1NFiE9TRYhPU0WIT1NFiE9TRYhPU0WIT1NFiE9</CNDB>