るりまサーチ

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

別のキーワード

  1. etc sc_xopen_enh_i18n
  2. rsa n
  3. rsa n=
  4. openssl n
  5. openssl n=

ライブラリ

キーワード

検索結果

REXML::DocType#notation(name) -> REXML::NotationDecl | nil (12402.0)

DTD に含まれている記法宣言 (REXML::NotationDecl) で name という名前を持つものを返します。

...DTD に含まれている記法宣言 (REXML::NotationDecl) で
n
ame という名前を持つものを返します。

n
ame という名前を持つ記法宣言が存在しない場合は nil を返します。

@param name 検索する記法名...

REXML::DocType#notations -> [REXML::NotationDecl] (12402.0)

DTD に含まれている記法宣言 (REXML::NotationDecl) を 配列で返します。

...DTD に含まれている記法宣言 (REXML::NotationDecl) を
配列で返します。...

REXML::DocType#external_id -> String | nil (12202.0)

DTD が外部サブセットを用いている場合は "SYSTEM", "PUBLIC" の いずれかの文字列を返します。

...の場合は nil を返します。

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

doctype = REXML::Document.new(<<EOS).doctype
<!DOCTYPE books [
<!ELEMENT books (book+)>
<!ELEMENT book (title,author)>
<!ELEMENT title (#PCDATA)>
<!ELEMENT author (#PCDATA)>
]>
EOS
doctype.name # => "books"
doctype.external_id # => nil
//}...

REXML::DocType#name -> String (12202.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#namespaces -> nil (12202.0)

nil を返します。

...nil を返します。...

絞り込み条件を変える

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

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

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

elementという名前の要素の属性値は宣言されていない、
elementという名前の要素にはattributeという名前の属性が宣...
... nil を返します。

@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
a
uthor CDATA...
...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
//}...

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

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

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

名前とデフォルト値のペアは、各 Attribute オブジェクトの
REXML::Attribute#name と
REXML::Attribute#value で表現さ...
...ment'

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

p doctype.attributes_of("book")
# => [aut...
...hor='', title='', publisher='foobar publisher']
p doctype.attributes_of("book")[0].name # => "author"
p doctype.attributes_of("book")[0].value # => ""
//}...

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

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

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

返される文字列は非正規化(REXML::Entity#unnormalized 参照)
された文字列が返されます。

n
ame という名前を持つ実体が存在しない場合には 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) -> () (202.0)

output に DTD を出力します。

...ドは deprecated です。REXML::Formatter で
出力してください。

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

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

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