method

decode_attrs

Importance_0
v1_8_7_330 - Show latest stable - 0 notes - Class: SOAP::EncodingStyle::SOAPHandler
decode_attrs(ns, attrs) private

No documentation

This method has no description. You can help the Ruby community by adding new notes.

Hide source
# 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
Register or log in to add new notes.