るりまサーチ

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

別のキーワード

  1. _builtin to_i
  2. fiddle to_i
  3. matrix elements_to_i
  4. kernel $-i
  5. csv to_i

ライブラリ

クラス

モジュール

キーワード

検索結果

REXML::Attribute#namespace(arg = nil) -> String | nil (21337.0)

属性の名前空間の URI を返します。

...の URI を返します。

URI が定義されていない場合は nil を返します。

@param arg この値を指定すると、その属性の名前空間でなく、arg という名前空間
の URI が返されます。
通常は省略します。

//emlist[][ruby]{
require 'r...
...exml/document'
e = REXML::Element.new("el")
e.add_attribute("xmlns:ns", "http://www.example.com/ns")
e.add_attribute("ns:r", "rval")
p e.attributes.get_attribute("r").prefix # => "ns"
p e.attributes.get_attribute("r").namespace # => "http://www.example.com/ns"
//}...

Kernel#namespace(name = nil) { ... } -> Rake::NameSpace (18332.0)

新しい名前空間を作成します。

...新しい名前空間を作成します。

与えられたブロックを評価する間は、その名前空間を使用します。

例:
ns
= namespace "nested" do
task :run
end
task_run = ns[:run] # find :run in the given namespace.

@see Rake::TaskManager#in_namespace...

REXML::Attributes#get_attribute_ns(namespace, name) -> REXML::Attribute | nil (15454.0)

namespace と name で特定される属性を返します。

...namespace と name で特定される属性を返します。

namespace
で名前空間を、 name で prefix を含まない属性名を
指定します。

指定された属性が存在しない場合は nil を返します。

XML プロセッサが prefix を置き換えてしまった場合...
...く指定することができます。

@param namespace 名前空間(URI, 文字列)
@param name 属性名(文字列)

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

doc = REXML::Document.new(<<-EOS)
<root xmlns:foo="http://example.org/foo"
xmlns:bar="http://example.org/bar">
<a foo:att='1' b...
...ot/a").first

a.attributes.get_attribute_ns("", "att") # => att='&lt;'
a.attributes.get_attribute_ns("http://example.org/foo", "att") # => foo:att='1'
a.attributes.get_attribute_ns("http://example.org/baz", "att") # => nil
a.attributes.get_attribute_ns("http://example.org/foo", "attt") # => nil
//}...

REXML::Namespace#has_name?(other, ns = nil) -> bool (3241.0)

self が other と ns で指定した名前を持っているならば真を返します。

...self が other と ns で指定した名前を持っているならば真を返します。

ns
が nil でない場合は名前空間も比較されます。
other が ":" を含んでいる(つまり prefix を含んでいる)場合は
REXML::Namespace#fully_expanded_name と other を比較しま...
...す。
どちらでもない場合は other と REXML::Namespace#name を直接
比較します。

@param other 比較する名前(文字列)
@param ns 比較する名前空間(文字列)...