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