Module: REXML::Namespace
- Includes:
- XMLTokens
- Defined in:
- lib/compat/opal/rexml/namespace.rb
Constant Summary collapse
- NAME_WITHOUT_NAMESPACE =
/^#{NCNAME_STR}$/- NAMESPLIT =
/^(?:(#{NCNAME_STR}):)?(#{NCNAME_STR})/u
Constants included from XMLTokens
XMLTokens::NAME, XMLTokens::NAMECHAR, XMLTokens::NAME_CHAR, XMLTokens::NAME_START_CHAR, XMLTokens::NAME_STR, XMLTokens::NCNAME_STR, XMLTokens::NMTOKEN, XMLTokens::NMTOKENS, XMLTokens::REFERENCE
Instance Attribute Summary collapse
-
#expanded_name ⇒ Object
readonly
Returns the value of attribute expanded_name.
-
#name ⇒ Object
(also: #local_name)
Returns the value of attribute name.
-
#prefix ⇒ Object
Returns the value of attribute prefix.
Instance Method Summary collapse
Instance Attribute Details
#expanded_name ⇒ Object (readonly)
Returns the value of attribute expanded_name.
7 8 9 |
# File 'lib/compat/opal/rexml/namespace.rb', line 7 def @expanded_name end |
#name ⇒ Object Also known as: local_name
Returns the value of attribute name.
7 8 9 |
# File 'lib/compat/opal/rexml/namespace.rb', line 7 def name @name end |
#prefix ⇒ Object
Returns the value of attribute prefix.
8 9 10 |
# File 'lib/compat/opal/rexml/namespace.rb', line 8 def prefix @prefix end |
Instance Method Details
#fully_expanded_name ⇒ Object
50 51 52 53 54 |
# File 'lib/compat/opal/rexml/namespace.rb', line 50 def ns = prefix return "#{ns}:#@name" if ns.size > 0 @name end |
#has_name?(other, ns = nil) ⇒ Boolean
38 39 40 41 42 43 44 45 46 |
# File 'lib/compat/opal/rexml/namespace.rb', line 38 def has_name?( other, ns=nil ) if ns namespace() == ns and name() == other elsif other.include? ":" == other else name == other end end |