21 | | <xsd:complexType name="vtopolanType"> |
| 21 | <xsd:complexType name="visnodeType"> |
| 22 | <xsd:annotation> |
| 23 | <xsd:documentation> |
| 24 | Node in the visualization of a federated experiment (Emulab |
| 25 | legacy). Fields include the local hostname of the node, x,y |
| 26 | coordinates in a 2-dimensional representation, and whether the |
| 27 | node in the visualization is a host or a LAN. |
| 28 | </xsd:documentation> |
| 29 | </xsd:annotation> |
| 30 | <xsd:sequence> |
| 31 | <xsd:element name="name" type="xsd:string"/> |
| 32 | <xsd:element name="x" type="xsd:int"/> |
| 33 | <xsd:element name="y" type="xsd:int"/> |
| 34 | <xsd:element name="type" type="xsd:string"/> |
| 35 | </xsd:sequence> |
| 36 | </xsd:complexType> |
| 37 | |
| 38 | <xsd:complexType name="vtopolanType"> |
| 79 | Some elements are repeated multiple times in a type, or are optional, as noted by the {{{maxOccurs}}} and {{{minOccurs}}} attributes. Elements that have {{{maxOccurs="1"}}} and {{{minOccurs="0"}}} defined in the XSD are optional fields and may either occur in the sequence/dict or not. Elements with {{{maxOccurs="unbounded"}}} and {{{minOccurs="0"}}} defined in the XSD are repeated elements. If none appear, the key is missing from the dict, if one or more are present the value mapped to the element name in the dict is a list of hashes, one for each copy of the repeatable element present. |
| 80 | |
| 81 | For example, the {{{vtopoType}}} from [source:wsdl/trunk/fedd_types.xsd fedd_types.xsd] includes a pair of repeated elements. It is defined in XSD as: |
| 82 | |
| 83 | {{{ |
| 84 | <xsd:complexType name="vtopoType"> |
| 85 | <xsd:annotation> |
| 86 | <xsd:documentation> |
| 87 | The virtual topology of a federated experiment (Emulab legacy). |
| 88 | </xsd:documentation> |
| 89 | </xsd:annotation> |
| 90 | <xsd:sequence> |
| 91 | <xsd:element name="node" type="tns:vtoponodeType" minOccurs="0" |
| 92 | maxOccurs="unbounded" /> |
| 93 | <xsd:element name="lan" type="tns:vtopolanType" minOccurs="0" |
| 94 | maxOccurs="unbounded"/> |
| 95 | </xsd:sequence> |
| 96 | </xsd:complexType> |
| 97 | }}} |
| 98 | |
| 99 | An example of that datatype that only |