Evaluates to true if whitespace is respected for this
element. This is the case if:
Neither :respect_whitespace nor :compress_whitespace has
any value
The context has :respect_whitespace set to :all or an
array containing the name of this element, and
:compress_whitespace isn’t set to :all or an array
containing the name of this element.
The evaluation is tested against expanded_name, and so is namespace sensitive.
# File lib/rexml/element.rb, line 146
def whitespace
@whitespace = nil
if @context
if @context[:respect_whitespace]
@whitespace = (@context[:respect_whitespace] == :all or
@context[:respect_whitespace].include? expanded_name)
end
@whitespace = false if (@context[:compress_whitespace] and
(@context[:compress_whitespace] == :all or
@context[:compress_whitespace].include? expanded_name)
)
end
@whitespace = true unless @whitespace == false
@whitespace
end