Constants
PEREFERENCE_RE = /#{PEREFERENCE}/um
ENTITYDECL = /\s*(?:#{GEDECL})|(?:#{PEDECL})/um
GEDECL = ""
PEDECL = ""
ENTITYDEF = "(?:#{ENTITYVALUE}|(?:#{EXTERNALID}(#{NDATADECL})?))"
PEDEF = "(?:#{ENTITYVALUE}|#{EXTERNALID})"
ENTITYVALUE = %Q{((?:"(?:[^%&"]|#{PEREFERENCE}|#{REFERENCE})*")|(?:'([^%&']|#{PEREFERENCE}|#{REFERENCE})*'))}
PEREFERENCE = "%#{NAME};"
NDATADECL = "\\s+NDATA\\s+#{NAME}"
EXTERNALID = "(?:(?:(SYSTEM)\\s+#{SYSTEMLITERAL})|(?:(PUBLIC)\\s+#{PUBIDLITERAL}\\s+#{SYSTEMLITERAL}))"
PUBIDLITERAL = %Q{("[#{PUBIDCHAR}']*"|'[#{PUBIDCHAR}]*')}
SYSTEMLITERAL = %Q{((?:"[^"]*")|(?:'[^']*'))}
PUBIDCHAR = "\x20\x0D\x0Aa-zA-Z0-9\\-()+,./:=?;!*@$_%#"
Attributes
[R] | pubid | |
[R] | ndata | |
[R] | ref | |
[R] | external | |
[R] | name |