HexBinary Restriction in XSD
I need to restrict a HexBinary to exactly 20 bytes, 40 hex digits. How can this b开发者_如何学Goe done?
You can use the length facet with hexBinary (or minLength and maxLength) to constrain the length of the value in octets. So you want
<xs:simpleType>
<xs:restriction base="xs:hexBinary">
<xs:length value="20"/>
</xs:restriction>
</xs:simpleType>
精彩评论