るりまサーチ

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

別のキーワード

  1. matrix l
  2. lupdecomposition l
  3. kernel $-l
  4. _builtin $-l
  5. l matrix

ライブラリ

モジュール

検索結果

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

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

...呼び出されるコールバックです。

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

=== 例
<!ATTLIST a att CDATA #REQUIRED xyz CDATA "foobar">
という属性リスト宣言に対しては
element_name: "a"
attr
ibutes: {"att"=>nil, "xyz"=>"foobar"}
raw_content: " \n<!ATTLIST a att CDATA #REQUIRED xyz CDATA \"foobar\">"
という...

rexml/parsers/streamparser (6012.0)

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

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

rexml の XML パーサの中では高速ですが、機能は限定的です。
もう少し高機能なストリーム式パーサが必要な場合は
REXML::Parsers::SAX2Parser を用いてください。

パーサからはコールバックによって...
...//emlist[][ruby]{
require 'rexml/parsers/baseparser'
require 'rexml/parsers/streamparser'
require 'rexml/streamlistener'
class Listener
include REXML::StreamListener
def initialize
@events = []
end

def text(text)
@events << "text[#{text}]"
end

def tag_start(name, attrs)
@...
...uction, "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"=>"...