dtd 验证错误:元素类型声明中需要“)”"Bibliography"

Error in dtd validation : A ')' is required in the declaration of element type "Bibliography"

我的 editix 编辑器出现以下第一行错误。只是不明白为什么需要 a)。

<!ELEMENT Bibliography (Conference paper,Book,Book chapter,Journal article)>
<!ATTLIST Author Title Year CDATA#REQUIRED>
<!ELEMENT Conference paper (Author,Title,URL)>
<!ELEMENT Author #PCDATA>
<!ELEMENT Title #PCDATA>
<!ELEMENT URL #PCDATA>

这是因为您有一个名为 Conference paper 的元素。名称中不能有空格。见 spec for more details. Specifically the definitions of NameStartChar and NameChar.

也许使用ConferencePaperConference_paperConference-paper

您将遇到与 Book chapterJournal article 相同的问题。

我还注意到这些额外的问题:

  • 声明<!ATTLIST Author Title Year CDATA#REQUIRED>无效。有关应如何构建 ATTLIST 的说明,请参阅 Attribute-List Declarations
  • 您需要在 AuthorTitleURL 的元素声明中将 #PCDATA 括在括号(内容模型)中。 (喜欢 <!ELEMENT Author (#PCDATA)>)有关详细信息,请参阅 Element Type Declarations