The issue was solved with the following files and content:
input.xml
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<Mobiles
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="input.xsd">
<Mobile>
<Model>G975F</Model>
<OS>Android</OS>
<Origin>USA</Origin>
<Material>Plastic</Material>
<Samsung>
<Wlan>802.11</Wlan>
<CardSlot>MicroSD</CardSlot>
<RadioAvailability>true</RadioAvailability>
<BluetoothAvailability>true</BluetoothAvailability>
</Samsung>
</Mobile>
<Mobile>
<Model>G986</Model>
<OS>Android</OS>
<Origin>USA-Israel</Origin>
<Material>Silicon-Plastic</Material>
<Samsung>
<Wlan>802.11</Wlan>
<CardSlot>MicroSD</CardSlot>
<RadioAvailability>true</RadioAvailability>
<BluetoothAvailability>false</BluetoothAvailability>
</Samsung>
</Mobile>
<Mobile>
<Model>G770F</Model>
<OS>Android</OS>
<Origin>Israel</Origin>
<Material>Silicon-Plastic</Material>
<Samsung>
<Wlan>802.11</Wlan>
<CardSlot>MicroSD</CardSlot>
<RadioAvailability>true</RadioAvailability>
<BluetoothAvailability>false</BluetoothAvailability>
</Samsung>
</Mobile>
</Mobiles>
To be more specific: I've modified xml to realize correct linking an XSD to an XML document without namespaces:
<Mobiles
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="input.xsd">
Hence input.xsd looks like:
<?xml version="1.0" encoding="UTF-8"?>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<xsd:element name="Mobiles">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="Mobile" type="Mobile" maxOccurs="unbounded"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:complexType name="Mobile">
<xsd:sequence>
<xsd:element name="Model" type="xsd:string"/>
<xsd:element name="OS">
<xsd:simpleType>
<xsd:restriction base="xsd:string">
<xsd:enumeration value="Android"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
<xsd:element name="Origin" type="xsd:string"/>
<xsd:element name="Material" type="xsd:string"/>
<xsd:element name="Samsung" type="Samsung"/>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="Samsung" mixed="true">
<xsd:sequence>
<xsd:element name="Wlan">
<xsd:simpleType>
<xsd:restriction base="xsd:string">
<xsd:enumeration value="802.11"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
<xsd:element name="CardSlot" type="xsd:string"/>
<xsd:element name="RadioAvailability" type="xsd:boolean" default="true"/>
<xsd:element name="BluetoothAvailability" type="xsd:boolean" default="false"/>
</xsd:sequence>
</xsd:complexType>
</xsd:schema>
without using input_noTargetNamespace.xsd
because of redundancy.
And for xsd file I've changed:
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:w3s="https://www.w3schools.com"
targetNamespace="https://www.w3schools.com">
simply to
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…