The SVG spec refers the reader to the XML Base spec for the characters that may appear in the value of an id
attribute.
SVG规范将读者引用到可能出现在id属性值中的字符的XML Base规范。
The XML Base spec, however, does not spell out these characters, AFAICT. Instead, it makes its recommendations in terms of "Unicode properties" ID_Start
and ID_Continue
.
但是,XML Base规范没有说明这些字符,AFAICT。相反,它根据“Unicode属性”ID_Start和ID_Continue提出建议。
I am looking for a table (or tables) listing explicitly those characters that have the ID_Start
and/or ID_Continue
properties.
我正在寻找一个表(或表)明确列出具有ID_Start和/或ID_Continue属性的那些字符。
(In case that different applications or XML-based standards may specify their own sets of characters with the ID_Start
and/or the ID_Continue
properties, I am interested in HTML5-embeded SVG.)
(如果不同的应用程序或基于XML的标准可以使用ID_Start和/或ID_Continue属性指定自己的字符集,我对HTML5嵌入式SVG感兴趣。)
2 个解决方案
#1
1
I found a repo on Github that generates bunch of different tables using Python scripts based on Unicode standard. For example here are tables for ID_START
, ID_CONTINUE
, XID_START
, XID_CONTINUE
etc: https://github.com/sourtin/libucd/blob/master/src/tables/bool.rs
我在Github上发现了一个repo,它使用基于Unicode标准的Python脚本生成大量不同的表。例如,这里有ID_START,ID_CONTINUE,XID_START,XID_CONTINUE等表:https://github.com/sourtin/libucd/blob/master/src/tables/bool.rs
Edit: I think they are parsed from XML databases provided in: http://www.unicode.org/Public/5.2.0/ucdxml/
编辑:我认为它们是从以下提供的XML数据库中解析的:http://www.unicode.org/Public/5.2.0/ucdxml/
#2
0
Seems that the allowed character range is defined :
似乎定义了允许的字符范围:
An attribute value is:
属性值为:
AttValue ::= '"' ([^<&"] | Reference)* '"'
| "'" ([^<&'] | Reference)* "'"
http://www.w3.org/TR/2008/REC-xml-20081126/#NT-AttValue
A Reference is:
参考是:
Reference ::= EntityRef | CharRef
http://www.w3.org/TR/2008/REC-xml-20081126/#NT-Reference
CharRef bring us to Char here:
CharRef将我们带到Char:
Char ::= #x9 | #xA | #xD | [#x20-#xD7FF] | [#xE000-#xFFFD] | [#x10000-#x10FFFF] /* any Unicode character, excluding the surrogate blocks, FFFE, and FFFF. */
#1
1
I found a repo on Github that generates bunch of different tables using Python scripts based on Unicode standard. For example here are tables for ID_START
, ID_CONTINUE
, XID_START
, XID_CONTINUE
etc: https://github.com/sourtin/libucd/blob/master/src/tables/bool.rs
我在Github上发现了一个repo,它使用基于Unicode标准的Python脚本生成大量不同的表。例如,这里有ID_START,ID_CONTINUE,XID_START,XID_CONTINUE等表:https://github.com/sourtin/libucd/blob/master/src/tables/bool.rs
Edit: I think they are parsed from XML databases provided in: http://www.unicode.org/Public/5.2.0/ucdxml/
编辑:我认为它们是从以下提供的XML数据库中解析的:http://www.unicode.org/Public/5.2.0/ucdxml/
#2
0
Seems that the allowed character range is defined :
似乎定义了允许的字符范围:
An attribute value is:
属性值为:
AttValue ::= '"' ([^<&"] | Reference)* '"'
| "'" ([^<&'] | Reference)* "'"
http://www.w3.org/TR/2008/REC-xml-20081126/#NT-AttValue
A Reference is:
参考是:
Reference ::= EntityRef | CharRef
http://www.w3.org/TR/2008/REC-xml-20081126/#NT-Reference
CharRef bring us to Char here:
CharRef将我们带到Char:
Char ::= #x9 | #xA | #xD | [#x20-#xD7FF] | [#xE000-#xFFFD] | [#x10000-#x10FFFF] /* any Unicode character, excluding the surrogate blocks, FFFE, and FFFF. */