[NeXus-definitions-tickets] [NeXusDefinitions] #266: implement difference in rules between base classes and application definitions
NeXus Base Classes and Instrument Definitions
noreply at nexusformat.org
Sun Sep 15 23:03:28 BST 2013
#266: implement difference in rules between base classes and application
definitions
-------------------------+--------------------------
Reporter: Pete Jemian | Owner: Pete Jemian
Type: defect | Status: new
Priority: major | Milestone:
Component: general | Resolution:
Keywords: NXDL schema |
-------------------------+--------------------------
Comment (by Pete Jemian):
Implementing this rule may be a bit trickier than it first appears.
What is needed is to have separate declarations of the NXDL rules defining
a ''minOccurs'' attribute for the different categories of NXDL
definitions. In file '''nxdl.xsd''':
1. Under {{{<xs:complexType name="groupType">}}}
{{{
<xs:attribute name="minOccurs" use="optional" default="0"
type="xs:nonNegativeInteger">
}}}
2. Under {{{<xs:complexType name="fieldType">}}}
{{{
<xs:attribute name="minOccurs" use="optional" default="0"
type="nx:nonNegativeUnbounded">
}}}
(note: The use of the NXDL type ''nx:nonNegativeUnbounded'' should
probably be changed to ''xs:nonNegativeInteger'' as it is not likely to
use {{{minOccurs="unbounded"}}} in an NXDL definition.)
These are the rules to be implemented for the '''minOccurs''' attributes:
|| **NXDL category** || **default** || **type** ||
|| ''base classes'' || 0 || {{{xs:nonNegativeInteger}}} ||
|| ''application definitions'' || 1 || {{{xs:PositiveInteger}}} ||
|| ''contributed definitions'' || 0 || {{{xs:nonNegativeInteger}}} ||
The difficulty is to impose the rule on the proper class with the XML
Schema file. Apparently, this specific type of feature is a principle
feature addition of the {{{xml version="1.1"}}} (XML second edition)
definition. (http://www.w3.org/TR/xml11/) XML 1.1 is not very popular
and many tools will report the declaration {{{xml version="1.1"}}} as an
error. According to http://en.wikipedia.org/wiki/Xml:
XML 1.1 is not very widely implemented and is recommended for use only
by those who need its unique features.
This will take a bit more investigation.
--
Ticket URL: <http://trac.nexusformat.org/definitions/ticket/266#comment:1>
NeXus Base Classes and Instrument Definitions <http://www.nexusformat.org/>
NeXus Base Classes and Instrument Definitions
More information about the NeXus-definitions-tickets
mailing list