XSD中group问题
用xmllint检测的时候,总是在画虚线部分出现element group: Schemas parser error : Element '{http://www.w3.org/2001/XMLSchema}group': The attribute 'ref' is required but missing.这个问题,请问应该如何解决~
<?xml version="1.0" encoding="ISO-8859-1"?> <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified"> <xs:element name="houses"> <xs:complexType> <xs:sequence> <xs:element name="house" maxOccurs="unbounded"> <xs:complexType> <xs:sequence> <xs:group name="addressGroup"> ---------------------------------------------- <xs:choice> <xs:element name="street" type="xs:string"/> <xs:element name="postal_code" type="xs:integer"/> <xs:element name="city" type="xs:string"/> <xs:element name="country" type="xs:string"/> </xs:choice> </xs:group> <xs:element name="address"> <xs:complexType> <xs:sequence> <xs:group ref="addressGroup"/> </xs:sequence> </xs:complexType> </xs:element> </xs:sequence> <xs:attribute name="id" type="xs:ID"/> </xs:complexType> </xs:element> </xs:sequence> </xs:complexType> </xs:element> </xs:schema>