internalize rexml
[booh] / lib / booh / rexml / xmltokens.rb
1 module REXML
2         # Defines a number of tokens used for parsing XML.  Not for general
3         # consumption.
4         module XMLTokens
5                 NCNAME_STR= '[\w:][\-\w\d.]*'
6                 NAME_STR= "(?:#{NCNAME_STR}:)?#{NCNAME_STR}"
7
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]+;)"
13
14                 #REFERENCE = "(?:#{ENTITYREF}|#{CHARREF})"
15                 #ENTITYREF = "&#{NAME};"
16                 #CHARREF = "&#\\d+;|&#x[0-9a-fA-F]+;"
17         end
18 end