当我使用 RelaxNG 和docbook.rng
DocBook 5.0 发行版上提供的模式验证我的文档时,会出现这样的错误,
error: attribute "title" not allowed at this point; ignored
有问题的 XML 元素是informaltable
. 事实上,我在 O'Reilly 网站上读到,an 的基本定义informaltable
是没有标题的表。但是,在docbook.dtd
同一发行版上提供的 DTD 将 指定title
为informatltable
. 那么这是DTD中的错误吗?
DTD 片段,包含在此处,供参考。如果这个 DTD 确实不正确,那么某处是否有正确的 DTD,或者我可以以某种方式生成它?
<!ELEMENT informaltable (info?, ((textobject*, (mediaobject+|tgroup+))|((col*|colgroup*), thead?, tfoot?, (tbody+|tr+))))>
<!ATTLIST informaltable
xmlns CDATA #FIXED "http://docbook.org/ns/docbook"
role CDATA #IMPLIED
%db.common.attributes;
%db.common.linking.attributes;
tabstyle CDATA #IMPLIED
floatstyle CDATA #IMPLIED
orient (land|port) #IMPLIED
colsep (0|1) #IMPLIED
rowsep (0|1) #IMPLIED
frame (all|bottom|none|sides|top|topbot|void|above|below|hsides|lhs|rhs|vsides|box|border) #IMPLIED
pgwide (0|1) #IMPLIED
rowheader (firstcol|norowheader) #IMPLIED
class CDATA #IMPLIED
style CDATA #IMPLIED
title CDATA #IMPLIED
lang CDATA #IMPLIED
onclick CDATA #IMPLIED
ondblclick CDATA #IMPLIED
onmousedown CDATA #IMPLIED
onmouseup CDATA #IMPLIED
onmouseover CDATA #IMPLIED
onmousemove CDATA #IMPLIED
onmouseout CDATA #IMPLIED
onkeypress CDATA #IMPLIED
onkeydown CDATA #IMPLIED
onkeyup CDATA #IMPLIED
summary CDATA #IMPLIED
width CDATA #IMPLIED
border NMTOKEN #IMPLIED
rules (none|groups|rows|cols|all) #IMPLIED
cellspacing CDATA #IMPLIED
cellpadding CDATA #IMPLIED
>