るりまサーチ

最速Rubyリファレンスマニュアル検索!
24件ヒット [1-24件を表示] (0.042秒)
トップページ > クエリ:param[x] > 種類:インスタンスメソッド[x] > クエリ:ruby[x] > クエリ:require[x] > クラス:REXML::DocType[x]

別のキーワード

  1. net/imap param
  2. win32ole win32ole_param
  3. bodytypebasic param
  4. win32ole_param new
  5. win32ole_param name

ライブラリ

キーワード

検索結果

REXML::DocType#write(output, indent = 0, transitive = false, ie_hack = false) -> () (38.0)

output に DTD を出力します。

...@param output 出力先の IO オブジェクト
@param indent インデントの深さ。指定しないでください。
@param transitive 無視されます。指定しないでください。
@param ie_hack 無視されます。指定しないでください。

//emlist[][ruby]{
require
'rex...
...new(<<EOS).doctype
<!DOCTYPE books [
<!ELEMENT book (comment)>
<!ELEMENT comment (#PCDATA)>
<!ATTLIST book
author CDATA #REQUIRED
title CDATA #REQUIRED
publisher CDATA "foobar publisher">
<!ENTITY p "foobar publisher">
<!ENTITY % q "quzz">
]>
EOS

doctype.write(STDOUT)...

REXML::DocType#attribute_of(element, attribute) -> String | nil (26.0)

DTD 内の属性リスト宣言で、 element という名前の要素の attribute という 名前の属性のデフォルト値を返します。

...す。

@param element 要素名(文字列)
@param attribute 属性名(文字列)

//emlist[][ruby]{
require
'rexml/document'

doctype = REXML::Document.new(<<EOS).doctype
<!DOCTYPE books [
<!ELEMENT book (comment)>
<!ELEMENT comment (#PCDATA)>
<!ATTLIST book
author CDATA #REQUIRED...
...title CDATA #REQUIRED
publisher CDATA "foobar publisher">
]>
EOS

p doctype.attribute_of("book", "publisher") # => "foobar publisher"
p doctype.attribute_of("bar", "foo") # => nil
p doctype.attribute_of("book", "baz") # => nil
p doctype.attribute_of("book", "title") # => nil
//}...