Skip to content

Commit

Permalink
Merge pull request #550 from nexusformat/issue_546_minOccurs_not_allo…
Browse files Browse the repository at this point in the history
…wed_here

Issue 546 minOccurs=0 to required=false
  • Loading branch information
prjemian authored Apr 5, 2017
2 parents 485df90 + 2a7008e commit 3280bce
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 28 deletions.
10 changes: 5 additions & 5 deletions applications/NXmx.nxdl.xml
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@
<dim index="1" value="np" />
<dim index="2" value="i" />
<dim index="3" value="j" />
<dim index="4" value="k" minOccurs="0"/>
<dim index="4" value="k" required="false"/>
</dimensions>
</field>

Expand Down Expand Up @@ -337,7 +337,7 @@
<dimensions rank="dataRank">
<dim index="1" value="i" />
<dim index="2" value="j" />
<dim index="3" value="k" minOccurs="0"/>
<dim index="3" value="k" required="false"/>
</dimensions>
</field>

Expand All @@ -353,7 +353,7 @@
<dimensions rank="dataRank">
<dim index="1" value="i" />
<dim index="2" value="j" />
<dim index="3" value="k" minOccurs="0"/>
<dim index="3" value="k" required="false"/>
</dimensions>
</field>

Expand All @@ -362,7 +362,7 @@
<dimensions rank="dataRank">
<dim index="1" value="i" />
<dim index="2" value="j" />
<dim index="3" value="k" minOccurs="0"/>
<dim index="3" value="k" required="false"/>
</dimensions>
</field>

Expand Down Expand Up @@ -410,7 +410,7 @@
<dimensions rank="dataRank">
<dim index="1" value="i" />
<dim index="2" value="j" />
<dim index="3" value="k" minOccurs="0"/>
<dim index="3" value="k" required="false"/>
</dimensions>
</field>

Expand Down
28 changes: 5 additions & 23 deletions base_classes/NXtransformations.nxdl.xml
Original file line number Diff line number Diff line change
Expand Up @@ -96,11 +96,6 @@
attribute multiplied by the field value, and :math:`R` is defined as a rotation
about an axis in the direction of ``vector``, of angle of the field value.
</doc>
<!-- see: http://wiki.nexusformat.org/Main_Page/NXdetector_2012_10
This entire explanation is not clear.
-->

<field name="AXISNAME" nameType="any" units="AXISUNITS" type="NX_NUMBER" maxOccurs="unbounded">
<doc>
Units need to be appropriate for translation or rotation
Expand All @@ -113,21 +108,20 @@
The values given should be the start points of exposures for the corresponding
frames. The end points should be given in ``AXISNAME_end``.
</doc>
<attribute name="transformation_type" minOccurs="0">
<attribute name="transformation_type" optional="true">
<doc>
The transformation_type may be ``translation``, in which case the
values are linear displacements along the axis, ``rotation``,
in which case the values are angular rotations around the axis.

If this attribute is omitted, this is an axis for which there
is no motion to be specifies, such as the direction of gravity,
or the direction to the source, or a basis vector of a
coordinate frame.
If this attribute is omitted, this field does not specify a transformation
of an object, but is used to document a general axis or direction,
such as the direction of gravity, or of the source.
As such it cannot be used in a depends_on transformation chain.
</doc>
<enumeration>
<item value="translation" />
<item value="rotation" />
<!-- <item value="general" /> -->
</enumeration>
</attribute>
<attribute name="vector" type="NX_NUMBER">
Expand Down Expand Up @@ -168,17 +162,6 @@
at the corresponding positions given in the ``AXISNAME`` field.
</doc>
</field>
<!-- as per NIAC discussion, 13 Oct 2016, we have removed AXISNAME_range as duplicative.
<field name="AXISNAME_range" units="AXISUNITS" nameType="any" type="NX_NUMBER" minOccurs="0">
<doc>
AXISNAME_range is a placeholder for a name constructed from the actual
name of an axis to which ``_range`` has been appended.
The values in this optional field are differences between the values
in the field AXISNAME_end and the field AXISNAME.
</doc>
</field>
-->
<field name="AXISNAME_increment_set" units="AXISUNITS" nameType="any" type="NX_NUMBER" minOccurs="0">
<doc>
``AXISNAME_increment_set`` is a placeholder for a name constructed from the actual
Expand All @@ -192,4 +175,3 @@
</doc>
</field>
</definition>

14 changes: 14 additions & 0 deletions nxdl.xsd
Original file line number Diff line number Diff line change
Expand Up @@ -1215,6 +1215,20 @@
</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="required" type="nx:NX_BOOLEAN" default="true">
<xs:annotation>
<xs:documentation>
This dimension is required (true: default) or not required (false).

The default value is ``true``.

When ``required="false"`` is
specified, all subsequent ``&lt;dim`` nodes
(with higher ``index`` value)
**must** also have ``required="false"``.
</xs:documentation>
</xs:annotation>
</xs:attribute>
</xs:complexType>
</xs:element>
</xs:sequence>
Expand Down

0 comments on commit 3280bce

Please sign in to comment.