48件ヒット
[1-48件を表示]
(0.008秒)
ライブラリ
-
rexml
/ document (48)
キーワード
-
attribute
_ of (12) -
attributes
_ of (12) -
external
_ id (12) - write (12)
検索結果
先頭4件
-
REXML
:: DocType # attributes _ of(element) -> [REXML :: Attribute] (19.0) -
DTD 内の属性リスト宣言で、 element という名前の要素に対し宣言されている 属性の名前とデフォルト値を REXML::Attribute の配列で返します。
...ATA)>
<!ATTLIST book
author CDATA #REQUIRED
title CDATA #REQUIRED
publisher CDATA "foobar publisher">
]>
EOS
p doctype.attributes_of("book")
# => [author='', title='', publisher='foobar publisher']
p doctype.attributes_of("book")[0].name # => "author"
p doctype.attribu... -
REXML
:: DocType # external _ id -> String | nil (13.0) -
DTD が外部サブセットを用いている場合は "SYSTEM", "PUBLIC" の いずれかの文字列を返します。
...me # => "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 # attribute _ of(element , attribute) -> String | nil (7.0) -
DTD 内の属性リスト宣言で、 element という名前の要素の attribute という 名前の属性のデフォルト値を返します。
...ocument'
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", "publis... -
REXML
:: DocType # write(output , indent = 0 , transitive = false , ie _ hack = false) -> () (7.0) -
output に DTD を出力します。
...ocument'
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">
<!ENTITY p "foobar publisher">
<!ENTITY % q "q...