-1
我限制ipadress元素类型,如ipadress:port.This是代码。XSD将元素类型限制为ipadress类型
<xs:element name = "Ipadress">
<xs:simpleType>
<xs:restriction base = "xs:string">
<xs:pattern value = "[0-9][0-9][0-9].[0-9][0-9][0-9].[0-9][0-9][0-9].[0-9][0-9][0-9]:[0-9][0-9][0-9][0-9]"/>
</xs:restriction>
</xs:simpleType>
</xs:element>
但它并不work.Some ipadress如
<Ipadress> 127.0.0.1:123 </Ipadress>
将无法验证。
你应该拼一下'ipaddress' – 2017-12-16 07:12:32