Apply the type referenced in the I{arrayType} to the content (child nodes) of the array. Each element (node) in the array that does not have an explicit xsi:type attribute is given one based on the I{arrayType}. @param content: An array content. @typ
(self, content, xty)
| 88 | return self |
| 89 | |
| 90 | def applyaty(self, content, xty): |
| 91 | """ |
| 92 | Apply the type referenced in the I{arrayType} to the content |
| 93 | (child nodes) of the array. Each element (node) in the array |
| 94 | that does not have an explicit xsi:type attribute is given one |
| 95 | based on the I{arrayType}. |
| 96 | @param content: An array content. |
| 97 | @type content: L{Content} |
| 98 | @param xty: The XSI type reference. |
| 99 | @type xty: str |
| 100 | @return: self |
| 101 | @rtype: L{Encoded} |
| 102 | """ |
| 103 | name = 'type' |
| 104 | ns = Namespace.xsins |
| 105 | parent = content.node |
| 106 | for child in parent.getChildren(): |
| 107 | ref = child.get(name, ns) |
| 108 | if ref is None: |
| 109 | parent.addPrefix(ns[0], ns[1]) |
| 110 | attr = ':'.join((ns[0], name)) |
| 111 | child.set(attr, xty) |
| 112 | return self |
| 113 | |
| 114 | def promote(self, content): |
| 115 | """ |
no test coverage detected