Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 24 additions & 12 deletions dap4/dap4.xsd
Original file line number Diff line number Diff line change
Expand Up @@ -256,22 +256,34 @@
</xs:complexType>

<xs:complexType name="StructureType">
<xs:complexContent>
<xs:extension base="BaseType">
<xs:group ref="VariableTypes" minOccurs="1" maxOccurs="unbounded"/>
</xs:extension>
</xs:complexContent>
<xs:annotation>
<xs:documentation>A Structure groups a list of variables so that the
collection can be manipulated as a single item. The fields (or Variables)
in a Structure MAY be of any type, including Structure or Sequence. The
order of items in the Structure is significant only in relation to the
serialized representation of that Structure.</xs:documentation>
</xs:annotation>
<xs:sequence>
<xs:group ref="VariableTypes" minOccurs="1" maxOccurs="unbounded"/>
<xs:element ref="Dim" minOccurs="0" maxOccurs="unbounded"/>
</xs:sequence>
<xs:attribute name="name" type="xs:string"/>
</xs:complexType>


<xs:complexType name="SequenceType">
<xs:complexContent>
<xs:extension base="BaseType">
<xs:group ref="VariableTypes" minOccurs="1" maxOccurs="unbounded"/>
</xs:extension>
</xs:complexContent>
<xs:complexType name="SequenceType">
<xs:annotation>
<xs:documentation>A Sequence is intended to represent a sequence of instances of objects.
A Sequence was introduced to replace the concept of variable length dimensions.
.</xs:documentation>
</xs:annotation>
<xs:sequence>
<xs:group ref="VariableTypes" minOccurs="1" maxOccurs="unbounded"/>
<xs:element ref="Dim" minOccurs="0" maxOccurs="unbounded"/>
</xs:sequence>
<xs:attribute name="name" type="xs:string"/>
</xs:complexType>


<xs:simpleType name="EnumBaseType">
<xs:restriction base="xs:string">
<xs:enumeration value="Byte"/>
Expand Down
23 changes: 23 additions & 0 deletions tests/data/Structure_test3.dmr
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<Dataset
name="test_struct_array.nc"
dapVersion="4.0"
dmrVersion="1.0"
xmlns="http://xml.opendap.org/ns/DAP/4.0#"
xmlns:dap="http://xml.opendap.org/ns/DAP/4.0#">
<Structure name="s">
<Int32 name="x"/>
<Int32 name="y"/>
<Dim size="2"/>
<Dim size="2"/>
</Structure>
<Attribute name="_dap4.ce" type="String">
<Value value="/s[0:2:3][0:1]"/>
</Attribute>
<Attribute name="_DAP4_Little_Endian" type="UInt8">
<Value value="1"/>
</Attribute>
<Attribute name="_NCProperties" type="String">
<Value value="version=2,netcdf=4.9.1-development,hdf5=1.12.2"/>
</Attribute>
</Dataset>