Class: Meteor::Ml::Xhtml5::ParserImpl

Inherits:
Meteor::Ml::Xhtml::ParserImpl show all
Defined in:
lib/meteor.rb

Overview

XHTML5 parser (XHTML5パーサ)

Constant Summary collapse

CHARSET =
'charset'.freeze
UTF8 =
'utf-8'.freeze
ATTR_LOGIC =
Array

論理値で指定する属性

['disabled'.freeze, 'readonly'.freeze, 'checked'.freeze, 'selected'.freeze, 'multiple'.freeze, 'required'.freeze]
DISABLE_ELEMENT =
Array

disabled属性のある要素

['input'.freeze, 'textarea'.freeze, 'select'.freeze, 'optgroup'.freeze, 'fieldset'.freeze]
REQUIRE_ELEMENT =
Array

required属性のある要素

['input'.freeze, 'textarea'.freeze]
REQUIRED =
'required'.freeze
REQUIRED_M =
'\\srequired="[^"]*"\\s|\\srequired="[^"]*"$'.freeze
REQUIRED_M1 =
'\\srequired="([^"]*)"\\s|\\srequired="([^"]*)"$'.freeze
REQUIRED_R =
'required="[^"]*"'.freeze
REQUIRED_U =
'required="required"'.freeze
@@pattern_required_m =
Regexp.new(REQUIRED_M)
@@pattern_required_m1 =
Regexp.new(REQUIRED_M1)
@@pattern_required_r =
Regexp.new(REQUIRED_R)

Constants inherited from Meteor::Ml::Xhtml::ParserImpl

Meteor::Ml::Xhtml::ParserImpl::BR_1, Meteor::Ml::Xhtml::ParserImpl::BR_2, Meteor::Ml::Xhtml::ParserImpl::BR_3, Meteor::Ml::Xhtml::ParserImpl::CHECKED, Meteor::Ml::Xhtml::ParserImpl::CHECKED_M, Meteor::Ml::Xhtml::ParserImpl::CHECKED_M1, Meteor::Ml::Xhtml::ParserImpl::CHECKED_R, Meteor::Ml::Xhtml::ParserImpl::CHECKED_U, Meteor::Ml::Xhtml::ParserImpl::CONTENT, Meteor::Ml::Xhtml::ParserImpl::CONTENT_TYPE, Meteor::Ml::Xhtml::ParserImpl::DISABLED, Meteor::Ml::Xhtml::ParserImpl::DISABLED_M, Meteor::Ml::Xhtml::ParserImpl::DISABLED_M1, Meteor::Ml::Xhtml::ParserImpl::DISABLED_R, Meteor::Ml::Xhtml::ParserImpl::DISABLED_U, Meteor::Ml::Xhtml::ParserImpl::FALSE, Meteor::Ml::Xhtml::ParserImpl::HTTP_EQUIV, Meteor::Ml::Xhtml::ParserImpl::INPUT, Meteor::Ml::Xhtml::ParserImpl::KAIGYO_CODE, Meteor::Ml::Xhtml::ParserImpl::META, Meteor::Ml::Xhtml::ParserImpl::META_S, Meteor::Ml::Xhtml::ParserImpl::MULTIPLE, Meteor::Ml::Xhtml::ParserImpl::MULTIPLE_M, Meteor::Ml::Xhtml::ParserImpl::MULTIPLE_M1, Meteor::Ml::Xhtml::ParserImpl::MULTIPLE_R, Meteor::Ml::Xhtml::ParserImpl::MULTIPLE_U, Meteor::Ml::Xhtml::ParserImpl::NBSP_2, Meteor::Ml::Xhtml::ParserImpl::NBSP_3, Meteor::Ml::Xhtml::ParserImpl::OPTION, Meteor::Ml::Xhtml::ParserImpl::PATTERN_ESCAPE, Meteor::Ml::Xhtml::ParserImpl::PATTERN_ESCAPE_CONTENT, Meteor::Ml::Xhtml::ParserImpl::PATTERN_UNESCAPE, Meteor::Ml::Xhtml::ParserImpl::RADIO, Meteor::Ml::Xhtml::ParserImpl::READONLY, Meteor::Ml::Xhtml::ParserImpl::READONLY_M, Meteor::Ml::Xhtml::ParserImpl::READONLY_M1, Meteor::Ml::Xhtml::ParserImpl::READONLY_R, Meteor::Ml::Xhtml::ParserImpl::READONLY_TYPE, Meteor::Ml::Xhtml::ParserImpl::READONLY_U, Meteor::Ml::Xhtml::ParserImpl::SELECT, Meteor::Ml::Xhtml::ParserImpl::SELECTED, Meteor::Ml::Xhtml::ParserImpl::SELECTED_M, Meteor::Ml::Xhtml::ParserImpl::SELECTED_M1, Meteor::Ml::Xhtml::ParserImpl::SELECTED_R, Meteor::Ml::Xhtml::ParserImpl::SELECTED_U, Meteor::Ml::Xhtml::ParserImpl::TABLE_FOR_ESCAPE_, Meteor::Ml::Xhtml::ParserImpl::TABLE_FOR_ESCAPE_CONTENT_, Meteor::Ml::Xhtml::ParserImpl::TEXTAREA, Meteor::Ml::Xhtml::ParserImpl::TRUE, Meteor::Ml::Xhtml::ParserImpl::TYPE_L, Meteor::Ml::Xhtml::ParserImpl::TYPE_U

Constants inherited from Core::Kernel

Core::Kernel::AND_1, Core::Kernel::AND_2, Core::Kernel::AND_3, Core::Kernel::AP_1, Core::Kernel::AP_2, Core::Kernel::AP_3, Core::Kernel::ATTR_EQ, Core::Kernel::CLEAN_1, Core::Kernel::CLEAN_2, Core::Kernel::CSS_CLASS, Core::Kernel::CSS_ID, Core::Kernel::DOUBLE_QUATATION, Core::Kernel::EMPTY, Core::Kernel::EN_1, Core::Kernel::ERASE_ATTR_1, Core::Kernel::ESCAPE_ENTITY_REF, Core::Kernel::GET_ATTRS_MAP, Core::Kernel::GET_ATTR_1, Core::Kernel::GT_1, Core::Kernel::GT_2, Core::Kernel::GT_3, Core::Kernel::LT_1, Core::Kernel::LT_2, Core::Kernel::LT_3, Core::Kernel::MODE_AF, Core::Kernel::MODE_BF, Core::Kernel::MODE_UTF8, Core::Kernel::PATTERN_FIND_1, Core::Kernel::PATTERN_FIND_2_1, Core::Kernel::PATTERN_FIND_2_2, Core::Kernel::PATTERN_FIND_2_3, Core::Kernel::PATTERN_FIND_3_1, Core::Kernel::PATTERN_FIND_3_2, Core::Kernel::PATTERN_FIND_3_3, Core::Kernel::PATTERN_FIND_4, Core::Kernel::PATTERN_FIND_5, Core::Kernel::QO_2, Core::Kernel::QO_3, Core::Kernel::SEARCH_CX_1, Core::Kernel::SEARCH_CX_2, Core::Kernel::SEARCH_CX_3, Core::Kernel::SEARCH_CX_4, Core::Kernel::SEARCH_CX_5, Core::Kernel::SEARCH_CX_6, Core::Kernel::SET_ATTR_1, Core::Kernel::SET_CX_1, Core::Kernel::SET_CX_2, Core::Kernel::SET_CX_3, Core::Kernel::SET_CX_4, Core::Kernel::SET_MONO_1, Core::Kernel::SPACE, Core::Kernel::TAG_CLOSE, Core::Kernel::TAG_CLOSE3, Core::Kernel::TAG_OPEN, Core::Kernel::TAG_OPEN3, Core::Kernel::TAG_SEARCH_1_1, Core::Kernel::TAG_SEARCH_1_2, Core::Kernel::TAG_SEARCH_1_3, Core::Kernel::TAG_SEARCH_1_4, Core::Kernel::TAG_SEARCH_1_4_2, Core::Kernel::TAG_SEARCH_2_1, Core::Kernel::TAG_SEARCH_2_1_2, Core::Kernel::TAG_SEARCH_2_2, Core::Kernel::TAG_SEARCH_2_2_2, Core::Kernel::TAG_SEARCH_2_3, Core::Kernel::TAG_SEARCH_2_3_2, Core::Kernel::TAG_SEARCH_2_3_2_2, Core::Kernel::TAG_SEARCH_2_4, Core::Kernel::TAG_SEARCH_2_4_2, Core::Kernel::TAG_SEARCH_2_4_2_2, Core::Kernel::TAG_SEARCH_2_4_2_3, Core::Kernel::TAG_SEARCH_2_4_3, Core::Kernel::TAG_SEARCH_2_4_3_2, Core::Kernel::TAG_SEARCH_2_4_4, Core::Kernel::TAG_SEARCH_2_6, Core::Kernel::TAG_SEARCH_2_7, Core::Kernel::TAG_SEARCH_3_1, Core::Kernel::TAG_SEARCH_3_1_2, Core::Kernel::TAG_SEARCH_3_1_2_2, Core::Kernel::TAG_SEARCH_3_2, Core::Kernel::TAG_SEARCH_3_2_2, Core::Kernel::TAG_SEARCH_3_2_2_2, Core::Kernel::TAG_SEARCH_4_1, Core::Kernel::TAG_SEARCH_4_2, Core::Kernel::TAG_SEARCH_4_3, Core::Kernel::TAG_SEARCH_4_4, Core::Kernel::TAG_SEARCH_4_5, Core::Kernel::TAG_SEARCH_4_6, Core::Kernel::TAG_SEARCH_4_7, Core::Kernel::TAG_SEARCH_4_7_2, Core::Kernel::TAG_SEARCH_NC_1_1, Core::Kernel::TAG_SEARCH_NC_1_2, Core::Kernel::TAG_SEARCH_NC_1_3, Core::Kernel::TAG_SEARCH_NC_1_4, Core::Kernel::TAG_SEARCH_NC_1_4_2, Core::Kernel::TAG_SEARCH_NC_2_1, Core::Kernel::TAG_SEARCH_NC_2_1_2, Core::Kernel::TAG_SEARCH_NC_2_2, Core::Kernel::TAG_SEARCH_NC_2_2_2, Core::Kernel::TAG_SEARCH_NC_2_3, Core::Kernel::TAG_SEARCH_NC_2_3_2, Core::Kernel::TAG_SEARCH_NC_2_3_2_2, Core::Kernel::TAG_SEARCH_NC_2_4, Core::Kernel::TAG_SEARCH_NC_2_4_2, Core::Kernel::TAG_SEARCH_NC_2_4_2_2, Core::Kernel::TAG_SEARCH_NC_2_4_2_3, Core::Kernel::TAG_SEARCH_NC_2_4_3, Core::Kernel::TAG_SEARCH_NC_2_4_3_2, Core::Kernel::TAG_SEARCH_NC_2_4_4, Core::Kernel::TAG_SEARCH_NC_2_6, Core::Kernel::TAG_SEARCH_NC_2_7, Core::Kernel::TAG_SEARCH_NC_3_1, Core::Kernel::TAG_SEARCH_NC_3_1_2, Core::Kernel::TAG_SEARCH_NC_3_1_2_2, Core::Kernel::TAG_SEARCH_NC_3_2, Core::Kernel::TAG_SEARCH_NC_3_2_2, Core::Kernel::TAG_SEARCH_NC_3_2_2_2

Constants inherited from Parser

Parser::HTML, Parser::HTML5, Parser::XHTML, Parser::XHTML5, Parser::XML

Instance Attribute Summary

Attributes inherited from Core::Kernel

#doc_type, #document_hook, #element_cache, #element_hook

Instance Method Summary collapse

Methods inherited from Meteor::Ml::Xhtml::ParserImpl

#content_type, #parse

Methods inherited from Core::Kernel

#attr, #attr_map, #attrs, #character_encoding, #character_encoding=, #content, #cxtag, #document, #document=, #element, #elements, #elements_, #find, #flush, #parse, #read, #remove_element, #root_element, #shadow

Constructor Details

#initializeParserImpl #initialize(ps) ⇒ ParserImpl

initializer (イニシャライザ)

Overloads:


5263
5264
5265
5266
5267
5268
5269
5270
5271
5272
5273
5274
5275
# File 'lib/meteor.rb', line 5263

def initialize(*args)
  super()
  @@attr_logic = ATTR_LOGIC
  @doc_type = Parser::XHTML5
  case args.length
    when ZERO
      #initialize_0

    when ONE
      initialize_1(args[0])
    else
      raise ArgumentError
  end
end