This project is read-only.
1
Vote

unique and default attributes

description

It looks like XML Notepad do not unique react on default attribute values or void attribute values what so ever. The MS Visual Studio 2015 do unique react on default attribute values but not void attribute values. Both reacts on set attribute values correct. I Believe them both should react on both cases? In both cases two times <ID>1</ID> for instance.

Unique statement (It is allowed with void attribute as one attribute amoung others, but the combination ID and attribute must be unique):
<xs:unique name="Invoice">
    <xs:selector xpath="xyz:Invoice"/>
    <xs:field xpath="xyz:ID/@Series"/>
    <xs:field xpath="xyz:ID"/>
</xs:unique>
XSD specification where MS VS 2015 reacts but XML Notpad don't on void Series attribute and both do react correctly if Series attribute is set to something like two times <ID Series="A">1</ID>:
<xs:complexType name="SeriesIDType">
    <xs:simpleContent>
        <xs:extension base="xs:positiveInteger">
        <xs:attribute name="Series"       type="xyz:IDtoken" default="X"/>
        </xs:extension>
    </xs:simpleContent>
</xs:complexType>
XSD specification where none of XML Notpad or MS VS 2015 don't reacts on void Series attribute but do react if Series attribute is set to something:
<xs:complexType name="SeriesIDType">
    <xs:simpleContent>
        <xs:extension base="xs:positiveInteger">
        <xs:attribute name="Series"       type="xyz:IDtoken"/>
        </xs:extension>
    </xs:simpleContent>
</xs:complexType>
IDtoken definition:
<xs:simpleType name="IDtoken">
    <xs:restriction base="xs:token">
        <xs:minLength value="1"/>
    </xs:restriction>
</xs:simpleType>
// Can't set the speller to English here using MSIE.

comments