在
XML Schema中,是否可以使用具有use =’required’和默认值的元素(例如< xs:attribute name =“Version”type =“U8”use =“required”default =“02” />)?
至少XMLSpy在这个上扼杀:
@H_301_6@[…] In attribute declaration ‘Version’,‘use’ must have the value ‘optional’ because the attribute ‘default’ is present.@H_301_6@查看XML Schema Part 1: Structures Second Edition产生3.2.3对属性声明的XML表示的约束:
@H_301_6@[…] If@H_301_6@所以答案显然是:不default
anduse
are both present,use
must have the ·actual value·optional
. […]