Attribute returns the original attribute using "att:elem" format for the keys.
()
| 137 | |
| 138 | // Attribute returns the original attribute using "att:elem" format for the keys. |
| 139 | func (ma *MappedAttributeExpr) Attribute() *AttributeExpr { |
| 140 | att := DupAtt(ma.AttributeExpr) |
| 141 | obj := AsObject(att.Type) |
| 142 | for _, nat := range *obj { |
| 143 | if elem := ma.ElemName(nat.Name); elem != nat.Name { |
| 144 | obj.Rename(nat.Name, nat.Name+":"+elem) |
| 145 | } |
| 146 | } |
| 147 | return att |
| 148 | } |
| 149 | |
| 150 | // ElemName returns the transport element name of the given object key. It |
| 151 | // returns keyName if it's a key of the mapped attribute object type. It panics |
no test coverage detected