るりまサーチ

最速Rubyリファレンスマニュアル検索!
88件ヒット [1-88件を表示] (0.092秒)
トップページ > クエリ:-[x] > クエリ:NIL[x] > クエリ:attlistdecl[x]

別のキーワード

  1. _builtin -
  2. open-uri open
  3. irb/input-method gets
  4. irb/input-method new
  5. matrix -

検索結果

REXML::StreamListener#attlistdecl(element_name, attributes, raw_content) -> () (18213.0)

DTDの属性リスト宣言をパースしたときに呼び出されるコールバックです。

...されます
@param attributes 属性名とそのデフォルト値の対応が
{ 属性名文字列 => デフォルト値文字列(無ければnil) } という
ハッシュテーブルで渡されます
@param raw_content 文書内の属性リスト宣言の文字列がそのまま渡さ...
...れます

=== 例
<!ATTLIST a att CDATA #REQUIRED xyz CDATA "foobar">
という属性リスト宣言に対しては
element_name: "a"
attributes: {"att"=>nil, "xyz"=>"foobar"}
raw_content: " \n<!ATTLIST a att CDATA #REQUIRED xyz CDATA \"foobar\">"
という引数が渡されます。...

REXML::SAX2Listener#attlistdecl(element, pairs, contents) -> () (18207.0)

DTDの属性リスト宣言に対し呼び出されるコールバックメソッドです。

...渡されます
@param pairs 属性名とそのデフォルト値の対応が
{ 属性名文字列 => デフォルト値文字列(無ければnil) } という
ハッシュテーブルで渡されます
@param contents 文書内の属性リスト宣言の文字列がそのまま渡されま...

REXML::AttlistDecl#[](key) -> String | nil (3207.0)

key という属性名のデフォルト値を返します。

...key という属性名のデフォルト値を返します。

key という名前の属性が存在しない、もしくは
デフォルト値を持たない場合は nil を返します。...

REXML::AttlistDecl#each {|name, value| ... } -> () (3106.0)

それぞれの属性名、デフォルト値を引数として ブロックを順に呼び出します。

...それぞれの属性名、デフォルト値を引数として
ブロックを順に呼び出します。

デフォルト値を持たない属性に関しては nil が渡されます。...

rexml/parsers/pullparser (132.0)

プル方式の XML パーサ。

...ターゲット文字列, 内容文字列 | nil)
XML処理命令(Processing Instruction, PI)
: comment (コメント文字列)
コメント
: start_doctype (ルート要素名, "SYSTEM" | "PUBLIC" | nil, システム識別子 | nil, 公開識別子 | nil)
DTD 開始。判定は REXML::Parsers:...
...? ではない
: end_doctype ()
DTD 終了
: attlistdecl (要素名, 属性名とデフォルト値, 宣言文字列)
DTDの属性リスト宣言。属性名とデフォルト値 は { 属性名文字列 => デフォルト値文字列(なければnil) } という Hash
: elementdecl (宣言文字...
...ィング文字列 | nil, standalone ("yes" | "no" | nil))
XML宣言
: externalentity (エンティティ文字列)
doctype内のパラメータ実体参照。

//emlist[][ruby]{
require 'rexml/parsers/pullparser'
xml = <<EOS
<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/cs...

絞り込み条件を変える

rexml/parsers/ultralightparser (84.0)

パース結果を配列で作られた木構造により返すパーサ。

...属性値文字列 } という Hash。
子ノードの配列は node[4..-1] で得られる。
: [:text, 正規化文字列]
テキストノード
: [:processing_instruction, ターゲット文字列, 内容文字列 | nil]
XML処理命令(Processing Instruction, PI)
: [:comment ,コメント...
...: [:start_doctype, 親ノード, ルート要素名, "SYSTEM" | "PUBLIC" | nil, システム識別子 | nil, 公開識別子 | nil, *子ノード]
DTD。子ノードの配列は node[6..-1] で得られる。
: [:attlistdecl, 要素名, 属性名とデフォルト値, 宣言文字列]
DTDの属...
...値文字列(なければnil) } という Hash
: [:elementdecl, 宣言文字列]
DTDの要素宣言
: [:entitydecl, *パラメータ]
DTDの実体宣言
: [:notationdecl, 記法名文字列, "PUBLIC" | "SYSTEM" | nil, 公開識別子文字列 | nil, URI文字列 | nil]
DTDの記法宣言
: [:c...

rexml/parsers/sax2parser (78.0)

SAX2 と同等の API を持つストリーム式の XML パーサ。

...[仕様確認サンプル][ruby]{
require 'rexml/parsers/sax2parser'
require 'rexml/sax2listener'

xml = <<EOS
<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/css" href="style.css"?>
<!DOCTYPE root SYSTEM "foo" [
<!ELEMENT root (a+)>
<!ELEMENT a>
<!ENTITY bar "barbarbarbar"...
..."1.0", "UTF-8", nil]
# >> [:progress, 39]
# >> [:characters, "\n"]
# >> [:progress, 91]
# >> [:processing_instruction, "xml-stylesheet", " type=\"text/css\" href=\"style.css\""]
# >> [:progress, 91]
# >> [:characters, "\n"]
# >> [:progress, 144]
# >> [:doctype, "root", "SYSTEM", "foo", nil]
# >> [:p...
...90]
# >> [:attlistdecl, "a", {"att"=>nil, "xyz"=>"foobar"}, " \n <!ATTLIST a att CDATA #REQUIRED xyz CDATA \"foobar\">"]
# >> [:progress, 245]
# >> [:notationdecl, "foobar", "SYSTEM", nil, "http://example.org/foobar.dtd"]
# >> [:progress, 683]
# >> [:entitydecl, "HTMLsymbol", "PUBLIC", "-//W3C//ENT...

rexml/parsers/streamparser (66.0)

ストリーム式の XML パーサ。

...re 'rexml/parsers/baseparser'
require 'rexml/parsers/streamparser'
require 'rexml/streamlistener'

xml = <<EOS
<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/css" href="style.css"?>
<!DOCTYPE root SYSTEM "foo" [
<!ELEMENT root (a+)>
<!ELEMENT a>
<!ENTITY bar "barbarbarbar"...
...&amp;&amp; <!-- comment here--> &bar;
</root>
EOS

class Listener
def method_missing(name, *args)
p [name, *args]
end
def respond_to_missing?(sym, include_private)
true
end
end

REXML::Parsers::StreamParser.new(xml, Listener.new).parse
# >> [:xmldecl, "1.0", "UTF-8", nil]
# >> [:text...
...ction, "xml-stylesheet", " type=\"text/css\" href=\"style.css\""]
# >> [:text, "\n"]
# >> [:doctype, "root", "SYSTEM", "foo", nil]
# >> [:elementdecl, "<!ELEMENT root (a+)"]
# >> [:elementdecl, "<!ELEMENT a"]
# >> [:entitydecl, ["bar", "barbarbarbar"]]
# >> [:attlistdecl, "a", {"att"=>nil, "xyz"=>"f...