开发者

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>
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜