<?xml version="1.0" encoding="UTF-8"?>
<invoices>
    <invoice no="234/2006" date="2006-10-24" ship-date="2006-10-24">
        <seller tax-id="677-15-91-304">
            <company>Marpol Ltd.</company>
            <address>ul. Bajeczna 15</address>
            <postcode>32-097</postcode>
            <city>Krakow</city>
        </seller>
        <buyer tax-id2="677-15-91-304">
            <surname>Brown</surname>
            <name>John</name>
            <address>Al. Pokoju 109</address>
            <postcode2>00-912</postcode2>
            <city2>Warszawa</city2>
        </buyer>
        <item type="goods">
            <name>brick</name>
            <quantity unit="pcs">12600</quantity>
            <unit-price currency="PLN">0.26</unit-price>
            <VAT>22</VAT>
        </item>
        <item type="goods">
            <name>cement</name>
            <quantity unit="kg">1420</quantity>
            <unit-price currency="PLN">3.50</unit-price>
            <VAT>7</VAT>
        </item>
    </invoice>
    <invoice no="75/FV/2006" date="2006-08-07" ship-date="2006-08-12">
        <seller tax-id="821-00-21-777">
            <company>Rowenta Ltd.</company>
            <address>ul. Kurczaby 394</address>
            <postcode>41-220</postcode>
            <city>Lublin</city>
        </seller>
        <buyer tax-id2="223-77-12-567">
            <company2>Budopol Ltd.</company2>
            <address>ul. Olszaniecka 3</address>
            <postcode2>12-201</postcode2>
            <city2>Olsztyn</city2>
        </buyer>
        <item type="goods">
            <name>window</name>
            <quantity unit="pcs">172</quantity>
            <unit-price currency="PLN">420</unit-price>
            <VAT>7</VAT>
        </item>
        <item type="goods">
            <name>emulsion paint</name>
            <quantity unit="l">47</quantity>
            <unit-price currency="PLN">35.20</unit-price>
            <VAT>22</VAT>
        </item>
        <item type="service">
            <name>delivery</name>
            <quantity unit="pcs">1</quantity>
            <unit-price currency="PLN">950</unit-price>
            <VAT>0</VAT>
        </item>
        <item type="service">
            <name>painting of external walls</name>
            <quantity unit="m2">140</quantity>
            <unit-price currency="PLN">37.20</unit-price>
            <VAT>7</VAT>
        </item>
        <item type="goods">
            <name>moulding</name>
            <quantity unit="pcs">17</quantity>
            <unit-price currency="PLN">21</unit-price>
            <VAT>22</VAT>
        </item>
        <item type="goods">
            <name>eco wallpaper adhesive</name>
            <quantity unit="pcs">8</quantity>
            <unit-price currency="PLN">47.2</unit-price>
            <VAT>3</VAT>
        </item>
    </invoice>
</invoices>

 <?xml version="1.0" encoding="utf-8"?>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">

<xsd:element name="invoices">
    <xsd:complexType>
        <xsd:sequence>
            <xsd:element name="invoice" minOccurs="1" maxOccurs="unbounded">                
                <xsd:complexType>    
                <xsd:sequence>
                    <xsd:element name="seller" maxOccurs="unbounded">
                        <xsd:complexType>
                            <xsd:sequence>
                                <xsd:element name="company" type="xsd:string"/>
                                <xsd:element name="address" type="xsd:string"/>
                                <xsd:element name="postcode">
                                    <xsd:simpleType>
                                        <xsd:restriction base="xsd:string">
                                            <xsd:length value="6"/>
                                        </xsd:restriction>
                                    </xsd:simpleType>    
                                </xsd:element>
                                <xsd:element name="city" type="xsd:string"/>
                            </xsd:sequence>
                                <xsd:attribute name="tax-id">
                                    <xsd:simpleType>
                                        <xsd:restriction base="xsd:string">
                                            <xsd:length value="13"/>
                                        </xsd:restriction>
                                    </xsd:simpleType>
                                </xsd:attribute>
                        </xsd:complexType>       
                    </xsd:element>
                    <xsd:element name="buyer" maxOccurs="unbounded">
                        <xsd:complexType>
                            <xsd:sequence>
                                <xsd:element name="company2" type="xsd:string"/>
                                <xsd:element name="surname" type="xsd:string"/>
                                <xsd:element name="name" type="xsd:string"/>
                                <xsd:element name="address" type="xsd:string"/>
                                <xsd:element name="postcode2">
                                    <xsd:simpleType>
                                        <xsd:restriction base="xsd:string">
                                            <xsd:length value="6"/>
                                        </xsd:restriction>
                                    </xsd:simpleType>    
                                </xsd:element>
                                <xsd:element name="city2" type="xsd:string"/>
                            </xsd:sequence>
                                <xsd:attribute name="tax-id2">
                                    <xsd:simpleType>
                                        <xsd:restriction base="xsd:string">
                                            <xsd:length value="13"/>
                                        </xsd:restriction>
                                    </xsd:simpleType>
                                </xsd:attribute>
                        </xsd:complexType>       
                    </xsd:element>
                    <xsd:element name="item" maxOccurs="unbounded">                    
                        <xsd:complexType>
                            <xsd:sequence>
                                <xsd:element name="name" type="xsd:string"/>
                                <xsd:element name="quantity" type="TypQuantity"/>            
                                <xsd:element name="unit-price" type="TypUnit-price"/>
                                <xsd:element name="VAT" type="TypVat"/>
                            </xsd:sequence>    
                                <xsd:attribute name="type">
                                    <xsd:simpleType>
                                        <xsd:restriction base="xsd:string">
                                            <xsd:enumeration value="goods"/>
                                            <xsd:enumeration value="service"/>
                                        </xsd:restriction>
                                    </xsd:simpleType>
                                </xsd:attribute>
                            </xsd:complexType>       
                    </xsd:element>    
                </xsd:sequence>
                    <xsd:attribute name="no" type="xsd:string"/>
                    <xsd:attribute name="date" type="xsd:string"/>
                    <xsd:attribute name="ship-date" type="xsd:string"/>
                </xsd:complexType>
            </xsd:element>
        </xsd:sequence>
    </xsd:complexType>
</xsd:element>
        
 <xsd:complexType name="TypQuantity">
                <xsd:simpleContent>
                        <xsd:extension base="xsd:string">
                                <xsd:attribute name="unit" type="TypUnit"/>
                        </xsd:extension>
                </xsd:simpleContent>
        </xsd:complexType>
        
 <xsd:complexType name="TypUnit-price">
                <xsd:simpleContent>
                        <xsd:extension base="xsd:string">
                                <xsd:attribute name="currency" type="xsd:string"/>
                        </xsd:extension>
                </xsd:simpleContent>
        </xsd:complexType>        
        
        <xsd:simpleType name="TypItem">
            <xsd:restriction base="xsd:string">
                <xsd:enumeration value="goods"/>
                <xsd:enumeration value="service"/>
            </xsd:restriction>
        </xsd:simpleType>
        
        
        
        
        
        <xsd:simpleType name="TypUnit">
            <xsd:restriction base="xsd:string">
                <xsd:enumeration value="kg"/>
                <xsd:enumeration value="pcs"/>
                <xsd:enumeration value="l"/>
                <xsd:enumeration value="m2"/>
            </xsd:restriction>
        </xsd:simpleType>
        
        <xsd:simpleType name="TypVat">
            <xsd:restriction base="xsd:integer">
                <xsd:enumeration value="22"/>
                <xsd:enumeration value="7"/>
                <xsd:enumeration value="3"/>
                <xsd:enumeration value="0"/>
            </xsd:restriction>
        </xsd:simpleType>
</xsd:schema>

przy walidacji wyskakuje mi błąd

Validation 38, 13 cvc-complex-type.2.4.a: Invalid content was found starting with element 'company'. One of '{surname}' is expected.

i nie wiem jak go wyeliminować, wiem o co chodzi ale nie mam pomysłu jak to zrobić.
inna sprawa to likwidacja city2, czyli trzeba zastosować zapewne namespace, ale nie wiem jak to zrobić