2011-10-03 93 views
2

在ePubChecker中使用自定義命名空間的epub出現錯誤。 禁止在ePub 3.0中使用自定義命名空間?我可以在ePub 3.0中使用自定義xml命名空間嗎?

示例代碼:

<?xml version="1.0" encoding="UTF-8"?> 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/1999/xhtml"> 
<html xmlns="http://www.w3.org/TR/xhtml11" xmlns:customns="http://example.com"> 
<head></head> 
<body><customns:customtag></customns:customtag></body> 
</html> 

錯誤:

/Untitled.epub/OPS/page0.html(5,27): element "customns:customtag" not allowed here; expected the element end-tag, text or element "a", "abbr", "address", "area", "article", "aside", "audio", "b", "bdi", "bdo", "blockquote", "br", "button", "canvas", "cite", "code", "command", "datalist", "del", "details", "dfn", "div", "dl", "em", "embed", "fieldset", "figure", "footer", "form", "h1", "h2", "h3", "h4", "h5", "h6", "header", "hgroup", "hr", "i", "iframe", "img", "input", "ins", "kbd", "keygen", "label", "map", "mark", "menu", "meter", "nav", "ns1:switch", "ns1:trigger", "ns2:math", "ns3:svg", "object", "ol", "output", "p", "pre", "progress", "q", "ruby", "s", "samp", "script", "section", "select", "small", "span", "strong", "style", "sub", "sup", "table", "textarea", "time", "u", "ul", "var", "video" or "wbr" (with xmlns:ns1="http://www.idpf.org/2007/ops" xmlns:ns2="http://www.w3.org/1998/Math/MathML" xmlns:ns3="http://www.w3.org/2000/svg")

+1

你可以做到這一點,但它是非標準的,所以誰知道各種讀者會選擇如何顯示(或忽略)你的內容。 – Freney

回答

相關問題