Skip to Content
3
Sep 02, 2019 at 07:36 PM

CPI Message Mapping XSD Error

3960 Views

Hi experts,

I tried to upload an xsd file to a message mapping. But i have an issue - Attribute reference 'http://www.w3.org/XML/1998/namespace#lang' is unresolved

Below is my xsd file. Any ideas would be appreciated.

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<xs:schema attributeFormDefault="unqualified" elementFormDefault="qualified" xmlns:xs="http://www.w3.org/2001/XMLSchema">
    <xs:import namespace="http://www.w3.org/XML/1998/namespace" schemaLocation="http://www.w3.org/2001/xml.xsd"/>
    <xs:element name="catalog">
        <xs:complexType>
            <xs:sequence>
                <xs:element name="header">
                    <xs:complexType>
                        <xs:sequence>
                            <xs:element name="image-settings">
                                <xs:complexType>
                                    <xs:sequence>
                                        <xs:element name="external-location">
                                            <xs:complexType>
                                                <xs:sequence>
                                                    <xs:element type="xs:anyURI" name="http-url"/>
                                                    <xs:element type="xs:string" name="https-url"/>
                                                </xs:sequence>
                                            </xs:complexType>
                                        </xs:element>
                                        <xs:element name="view-types">
                                            <xs:complexType>
                                                <xs:sequence>
                                                    <xs:element type="xs:string" name="view-type" maxOccurs="unbounded" minOccurs="0"/>
                                                </xs:sequence>
                                            </xs:complexType>
                                        </xs:element>
                                        <xs:element type="xs:string" name="variation-attribute-id"/>
                                        <xs:element type="xs:string" name="alt-pattern"/>
                                        <xs:element type="xs:string" name="title-pattern"/>
                                    </xs:sequence>
                                </xs:complexType>
                            </xs:element>
                        </xs:sequence>
                    </xs:complexType>
                </xs:element>
                <xs:element name="product">
                    <xs:complexType>
                        <xs:sequence>
                            <xs:element type="xs:long" name="ean"/>
                            <xs:element type="xs:long" name="upc"/>
                            <xs:element type="xs:string" name="unit"/>
                            <xs:element type="xs:byte" name="min-order-quantity"/>
                            <xs:element type="xs:byte" name="step-quantity"/>
                            <xs:element name="display-name">
                                <xs:complexType>
                                    <xs:simpleContent>
                                        <xs:extension base="xs:string">
                                            <xs:attribute ref="xml:lang"/>
                                        </xs:extension>
                                    </xs:simpleContent>
                                </xs:complexType>
                            </xs:element>
                            <xs:element type="xs:string" name="store-force-price-flag"/>
                            <xs:element type="xs:string" name="store-non-inventory-flag"/>
                            <xs:element type="xs:string" name="store-non-revenue-flag"/>
                            <xs:element type="xs:string" name="store-non-discountable-flag"/>
                            <xs:element type="xs:string" name="online-flag"/>
                            <xs:element type="xs:string" name="available-flag"/>
                            <xs:element type="xs:string" name="searchable-flag"/>
                            <xs:element type="xs:string" name="page-attributes"/>
                            <xs:element name="custom-attributes">
                                <xs:complexType>
                                    <xs:sequence>
                                        <xs:element name="custom-attribute" maxOccurs="unbounded" minOccurs="0">
                                            <xs:complexType>
                                                <xs:simpleContent>
                                                    <xs:extension base="xs:string">
                                                        <xs:attribute type="xs:string" name="attribute-id" use="optional"/>
                                                        <xs:attribute ref="xml:lang"/>
                                                    </xs:extension>
                                                </xs:simpleContent>
                                            </xs:complexType>
                                        </xs:element>
                                    </xs:sequence>
                                </xs:complexType>
                            </xs:element>
                            <xs:element type="xs:string" name="pinterest-enabled-flag"/>
                            <xs:element type="xs:string" name="facebook-enabled-flag"/>
                            <xs:element name="store-attributes">
                                <xs:complexType>
                                    <xs:sequence>
                                        <xs:element type="xs:string" name="force-price-flag"/>
                                        <xs:element type="xs:string" name="non-inventory-flag"/>
                                        <xs:element type="xs:string" name="non-revenue-flag"/>
                                        <xs:element type="xs:string" name="non-discountable-flag"/>
                                    </xs:sequence>
                                </xs:complexType>
                            </xs:element>
                        </xs:sequence>
                        <xs:attribute type="xs:int" name="product-id"/>
                    </xs:complexType>
                </xs:element>
            </xs:sequence>
            <xs:attribute type="xs:string" name="catalog-id"/>
        </xs:complexType>
    </xs:element>
</xs:schema>