るりまサーチ

最速Rubyリファレンスマニュアル検索!
372件ヒット [201-300件を表示] (0.015秒)
トップページ > クエリ:ctype[x] > クエリ:DocType[x]

別のキーワード

  1. closure ctype
  2. fiddle ctype
  3. ctype fiddle
  4. ctype fiddle::closure

検索結果

<< < 1 2 3 4 > >>

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

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

...re '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("boo...
...k", "publisher") # => "foobar publisher"
p doctype.attribute_of("bar", "foo") # => nil
p doctype.attribute_of("book", "baz") # => nil
p doctype.attribute_of("book", "title") # => nil
//}...

REXML::DocType#attributes_of(element) -> [REXML::Attribute] (6036.0)

DTD 内の属性リスト宣言で、 element という名前の要素に対し宣言されている 属性の名前とデフォルト値を REXML::Attribute の配列で返します。

...re '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.attributes_of("bo...
...ok")
# => [author='', title='', publisher='foobar publisher']
p doctype.attributes_of("book")[0].name # => "author"
p doctype.attributes_of("book")[0].value # => ""
//}...

REXML::DocType#entities -> { String => REXML::Entity } (6036.0)

DTD で宣言されている実体の集合を Hash で返します。

...
doctype
= REXML::Document.new(<<EOS).doctype
<!DOCTYPE foo [
<!ENTITY bar "barbarbarbar">
]>
EOS

p doctype.entities # => { "gt" => #<REXML::Entity: ...>,
# "lt" => #<REXML::Entity: ...>, ... }
p doctype.entities["bar"].to_s # => "<!ENTITY bar \"barbarbarbar\">"
p doctype...

REXML::DocType#entity(name) -> String | nil (6030.0)

name という実体参照名を持つ実体を文字列で返します。

...つ実体が存在しない場合には nil を返します。

@param name 実体参照名(文字列)

//emlist[][ruby]{
doctype
= REXML::Document.new(<<EOS).doctype
<!DOCTYPE foo [
<!ENTITY bar "barbarbarbar">
]>
EOS
p doctype.entity("bar") # => "barbarbar"
p doctype.entity("foo") # => nil
//}...

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

output に DTD を出力します。

...い。
@param ie_hack 無視されます。指定しないでください。

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

doctype
= REXML::Document.new(<<EOS).doctype
<!DOCTYPE books [
<!ELEMENT book (comment)>
<!ELEMENT comment (#PCDATA)>
<!ATTLIST book
author CDATA #REQUIRED
ti...
...tle CDATA #REQUIRED
publisher CDATA "foobar publisher">
<!ENTITY p "foobar publisher">
<!ENTITY % q "quzz">
]>
EOS

doctype
.write(STDOUT)
# =>
# <!DOCTYPE books [
# <!ELEMENT book (comment)>
# ....
//}...

絞り込み条件を変える

REXML::DocType#name -> String (6024.0)

ルート要素名を返します。

...ルート要素名を返します。

//emlist[][ruby]{
document = REXML::Document.new(<<EOS)
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
EOS
doctype
= document.doctype
p doctype.name # => "html"
//}...

REXML::DocType#node_type -> Symbol (6016.0)

Symbol :doctype を返します。

...Symbol :doctype を返します。...

REXML::DocType#add(child) -> () (6006.0)

child を子ノード列の最後に追加します。

...child を子ノード列の最後に追加します。

REXML::Parent#add を内部で呼び出します。
また、REXML::DocType#entities を更新します。

@param child 追加するノード...

REXML::DocType#context -> { Symbol => object } (6000.0)

DTD が属する文書の「コンテキスト」を返します。

DTD が属する文書の「コンテキスト」を返します。

具体的には親ノードである REXML::Document オブジェクトの
REXML::Element#context を返します。

コンテキストの具体的な内容については REXML::Element#context を
参照してください。
<< < 1 2 3 4 > >>