method
decode_attrs
v1_8_6_287 -
Show latest stable
- Class:
SOAP::EncodingStyle::SOAPHandler
decode_attrs(ns, attrs)private
No documentation available.
# File lib/soap/encodingstyle/soapHandler.rb, line 483
def decode_attrs(ns, attrs)
is_nil = false
type = nil
arytype = nil
root = nil
offset = nil
position = nil
href = nil
id = nil
extraattr = {}
attrs.each do |key, value|
qname = ns.parse(key)
case qname.namespace
when XSD::InstanceNamespace
case qname.name
when XSD::NilLiteral
is_nil = NilLiteralMap[value] or
raise EncodingStyleError.new("cannot accept attribute value: #{value} as the value of xsi:#{XSD::NilLiteral} (expected 'true', 'false', '1', or '0')")
next
when XSD::AttrType
type = value
next
end
when EncodingNamespace
case qname.name
when AttrArrayType
arytype = value
next
when AttrRoot
root = RootLiteralMap[value] or
raise EncodingStyleError.new(
"illegal root attribute value: #{value}")
next
when AttrOffset
offset = value
next
when AttrPosition
position = value
next
end
end
if key == 'href'
href = value
next
elsif key == 'id'
id = value
next
end
qname = ns.parse_local(key)
extraattr[qname] = decode_attr_value(ns, qname, value)
end
return is_nil, type, arytype, root, offset, position, href, id, extraattr
end