我阅读了可扩展标记语言 (XML) 1.0(第五版)W3C 建议 2008 年 11 月 26 日
3.2 元素类型声明具有:元素类型声明采用以下形式:元素类型声明
elementdecl ::= <!ELEMENT Name contentspec >
contentspec ::= 'EMPTY' | 'ANY' | Mixed | children
而在3.2.1 Element Content中有: Element-content Models
children ::= (choice | seq) ('?' | '*' | '+')?
cp ::= (Name | choice | seq) ('?' | '*' | '+')?
choice ::= '(' S? cp ( S? '|' S? cp )+ S? ')'
seq ::= '(' S? cp ( S? ',' S? cp )* S? ')'
之后我有疑问。“contentspec”和“content model”有什么不同。
也许 contentspec是 ANY, PCDATA, Mixed, children。
并且只有孩子有'内容模型':(elemName1 | elemName2, elemName3, elemET)。
(名称 | , '?' '*' '+'), 序列, 选择 - 就是'内容模型'。正确的?
Mixed有“内容模型”吗?
在教程中经常写:
<!ELEMENT Name content_model >