1 <?xml version="1.0"?> 2 <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"> 3 4 <!-- Test whitespaces in <xs:element> 'substitutionGroup' attribute --> 5 <xs:element name=" name" type="xs:string"/> 6 <xs:element name="navn" substitutionGroup=" name "/> 7 8 <!-- Test whitespaces in <xs:element> 'name' and 'ref' attributes --> 9 <xs:element name=" address "> 10 <xs:complexType> 11 <xs:sequence> 12 <xs:element name="street" type="xs:string"/> 13 <xs:element name="building" type="xs:string"/> 14 <xs:element name="apt" type="xs:int"/> 15 </xs:sequence> 16 </xs:complexType> 17 </xs:element> 18 <xs:element name="personinfo"> 19 <xs:complexType> 20 <xs:all> 21 <xs:element name="firstname" type="xs:string"/> 22 <xs:element ref=" 23 address "/> 24 <xs:element name="city" type="xs:string"/> 25 <xs:element name="country" type="xs:string"/> 26 </xs:all> 27 </xs:complexType> 28 </xs:element> 29 30 <!-- Test whitespaces in <xs:attribute> 'name', 'type' and 'ref' attributes --> 31 <xs:simpleType name="typeForAttribute "> 32 <xs:restriction base=" xs:string"> 33 <xs:pattern value="[A-Z][A-Z]"/> 34 </xs:restriction> 35 </xs:simpleType> 36 <xs:attribute name=" code" type=" typeForAttribute"> 37 </xs:attribute> 38 <xs:complexType name="TestComplexType"> 39 <xs:attribute ref="code "/> 40 </xs:complexType> 41 42 <!-- Test whitespaces in <xs:attributeGroup> 'name' and 'ref' attributes --> 43 <xs:attributeGroup name="personattr 44 "> 45 <xs:attribute name="attr1" type="xs:string"/> 46 <xs:attribute name="attr2" type="xs:integer"/> 47 </xs:attributeGroup> 48 <xs:complexType name="person"> 49 <xs:attributeGroup ref=" personattr "/> 50 </xs:complexType> 51 52 <!-- Test whitespaces in <xs:group> 'name' and 'ref' attributes --> 53 <xs:group name=" customer"> 54 <xs:sequence> 55 <xs:element name="firstname" type="xs:string"/> 56 <xs:element name="secondname" type="xs:string"/> 57 </xs:sequence> 58 </xs:group> 59 <xs:complexType name="orderType"> 60 <xs:group ref="customer "/> 61 <xs:attribute name="itemId" type="xs:integer"/> 62 </xs:complexType> 63 <xs:element name="order" type="orderType"/> 64 65 </xs:schema>