Hi I've changed my element type from xs:integer to xs:decimal, but when i try to validate my xml an error occurred: " '0.2' is not a valid value for 'integer'." I don't understand why the result type is integer yet. This is my xsd:
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns="https://www.w3schools.com"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
targetNamespace="https://www.w3schools.com">
<xs:element name="distribution">
<xs:complexType>
<xs:sequence>
<xs:element ref="type" minOccurs="1" maxOccurs="1"/>
<xs:element ref="value" minOccurs="1" maxOccurs="2"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name = "type">
<xs:simpleType>
<xs:restriction base="xs:string"/>
</xs:simpleType>
</xs:element>
<xs:element name="value">
<xs:simpleType>
<xs:restriction base="xs:decimal"/>
</xs:simpleType>
</xs:element>
And the xml I want to validate:
<?xml version="1.0" encoding="UTF-8"?>
<working xmlns="https://www.w3schools.com"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="processoproduttivo.xsd">
<resources> <!-- resources map-->
<resource resourcename="A1">
<resourcenumber>4</resourcenumber><!-- number of machines-->
<capacity>50</capacity><!-- machine's capacity-->
<distribution><!-- type of distribution-->
<type>Uniform</type>
<value>0.2</value>
<value>4</value>
</distribution>
</resource>
</resources>
</working>