2 # Defines a number of tokens used for parsing XML. Not for general
5 NCNAME_STR= '[\w:][\-\w\d.]*'
6 NAME_STR= "(?:#{NCNAME_STR}:)?#{NCNAME_STR}"
8 NAMECHAR = '[\-\w\d\.:]'
9 NAME = "([\\w:]#{NAMECHAR}*)"
10 NMTOKEN = "(?:#{NAMECHAR})+"
11 NMTOKENS = "#{NMTOKEN}(\\s+#{NMTOKEN})*"
12 REFERENCE = "(?:&#{NAME};|&#\\d+;|&#x[0-9a-fA-F]+;)"
14 #REFERENCE = "(?:#{ENTITYREF}|#{CHARREF})"
15 #ENTITYREF = "&#{NAME};"
16 #CHARREF = "&#\\d+;|&#x[0-9a-fA-F]+;"