Which ASCII characters are forbidden for use in SGML attributes?

点点圈 提交于 2019-12-23 22:06:44

问题


Apart from whitespace, quotation mark, equal sign, and tab, which other characters of the printable subset of ASCII are forbidden to be used as attribute names in SGML?


回答1:


By default, SGML allows only alphanumeric values for SGML names. What additional characters are allowed for SGML names is controlled by the SGML declaration; specifically UCNMCHAR and LCNMCHAR under NAMING.

For example, if you look at the SGML declaration for HTML 4, you'll see:

LCNMCHAR ".-_:"    
UCNMCHAR ".-_:"

This means that the characters ., -, _, and : are also allowed in SGML names (element/attribute/entity/etc).

NOTE: Only a letter is allowed as the first character of an SGML name.



来源:https://stackoverflow.com/questions/8496731/which-ascii-characters-are-forbidden-for-use-in-sgml-attributes

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!