2015-12-16 00:07:31 -05:00
|
|
|
# frozen_string_literal: false
|
2003-06-09 21:31:01 -04:00
|
|
|
require "rexml/child"
|
|
|
|
module REXML
|
2008-10-01 09:46:53 -04:00
|
|
|
module DTD
|
|
|
|
class ElementDecl < Child
|
|
|
|
START = "<!ELEMENT"
|
|
|
|
START_RE = /^\s*#{START}/um
|
2014-11-22 19:00:38 -05:00
|
|
|
# PATTERN_RE = /^\s*(#{START}.*?)>/um
|
|
|
|
PATTERN_RE = /^\s*#{START}\s+((?:[:\w][-\.\w]*:)?[-!\*\.\w]*)(.*?)>/
|
2008-10-01 09:46:53 -04:00
|
|
|
#\s*((((["']).*?\5)|[^\/'">]*)*?)(\/)?>/um, true)
|
2003-06-09 21:31:01 -04:00
|
|
|
|
2008-10-01 09:46:53 -04:00
|
|
|
def initialize match
|
|
|
|
@name = match[1]
|
|
|
|
@rest = match[2]
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
2003-06-09 21:31:01 -04:00
|
|
|
end
|