定义dtd时会出现错误,如下所示:
<!ELEMENT line (property*)>
<!ATTLIST line showType (1|?|+|*) "1" >错误:
The name token is required in the enumerated type list for the "showType" attribute declaration.值不能是特殊字符,如"?“、"+”、"*“。要将字符更改为拉丁-1字符,如"& #42;“(在”#“前添加一个空格),将得到相同的错误。
如何解决这个问题?
谢谢!
发布于 2011-05-24 06:05:02
这是不可能的,因为您指定的所有枚举值必须符合XML建议所指定的Nmtokens。参见http://www.w3.org/TR/xml/#d0e3200。
Nmtokens的BNF可以在http://www.w3.org/TR/xml/#d0e804上看到。
https://stackoverflow.com/questions/2801303
复制相似问题