[NeXus-tech] propose adding default for nxdl:definition/@extends
Peterson, Peter
petersonpf at ornl.gov
Thu Nov 20 16:14:48 GMT 2008
The point of default is basically to back door a use="required" on
people without them feeling obliged. So if extends isn't present then
someone using a validating parser will get NXobject as the value.
Something similar for primitives would happen as well. The only downside
to this is if somebody doesn't have a validating parser, or doesn't use
the schema, then they lose this feature.
P^2
Pete Jemian wrote:
> Turns out use="required" and default="NXobject" are mutually exclusive.
> With a default, then use="optional" is the rule.
>
> When we use primitiveType, it is always with use="required" which is
> what we want.
>
> Thus, both suggestions will not pass the XSD rules.
>
> No changes.
>
> Peterson, Peter F. (pf9) wrote:
>> Only if we can set the default primitive type for fields and attributes to
>> be NX_CHAR.
>>
>> P^2
>>
>>
>> On 11/19/08 7:03 PM, "Pete Jemian" <prjemian at gmail.com> wrote:
>>
>>
>>> In the "definition" element, can we default the "extends" attribute to
>>> NXobject?
>>>
>>> <xs:complexType name="definitionType">
>>> <xs:group ref="nx:groupGroup" minOccurs="0" maxOccurs="unbounded" />
>>> <xs:attribute name="name" use="required" />
>>> <xs:attribute name="type" use="required"
>>> type="nx:definitionTypeAttr" />
>>> <xs:attribute name="extends" use="required" />
>>> </xs:complexType>
>>>
>>> change to
>>> <xs:attribute name="extends" use="required" default="NXobject" />
>>>
>>
>
More information about the NeXus-tech
mailing list