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