lang( language )public
UNTESTED
# File lib/rexml/functions.rb, line 325
def Functions::lang( language )
lang = false
node = @@context[:node]
attr = nil
until node.nil?
if node.node_type == :element
attr = node.attributes["xml:lang"]
unless attr.nil?
lang = compare_language(string(language), attr)
break
else
end
end
node = node.parent
end
lang
end Related methods
- Class methods
- boolean
- ceiling
- compare_language
- concat
- contains
- context=
- count
- false
- floor
- get_namespace
- id
- lang
- last
- local_name
- name
- namespace_context
- namespace_context=
- namespace_uri
- normalize_space
- not
- number
- position
- processing_instruction
- round
- send
- singleton_method_added
- starts_with
- string
- string_length
- string_value
- substring
- substring_after
- substring_before
- sum
- text
- translate
- true
- variables
- variables=