|
def DocType.pull source
md = source.match( PATTERN_RE, true )
identity = md[1]
close = md[2]
identity =~ IDENTITY
name = $1
raise "DOCTYPE is missing a name" if name.nil?
pub_sys = $2.nil? ? nil : $2.strip
long_name = $3.nil? ? nil : $3.strip
uri = $4.nil? ? nil : $4.strip
[name, pub_sys, long_name, uri, close]
end
|