Imported File#ftype spec from rubyspecs.
[rbx.git] / lib / rexml / xmltokens.rb
blob6bbe5b07d534a13e4f9d3e24f4019dddeca68be5
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}"
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]+;"
17         end
18 end