Reading over the XML Schema specification, I can’t see an easy way to mark an attribute as being constant (e.g. in <foo bar="baz" /> the bar attribute must always be baz). The only method I have come up with so far is to use an enumeration with only one element. Is this the preferred method?
Reading over the XML Schema specification, I can’t see an easy way to mark
Share
<xs:attribute name="bar" type="xs:string" fixed="baz"/>will make the attribute to have the value baz as constant.