Saya mencoba sepanjang waktu untuk memvalidasi file XML dengan XSD dan mencoba berbagai opsi menambahkan elemen, urutan, tipe kompleks dan tidak ada yang menyelesaikan masalah.
Bisakah tolong seseorang memberi tahu saya, apa sebenarnya masalahnya? Terima kasih.
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<literature
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:NoNameSpaceSchemaLocation="exerciseLiteraturSchema.xsd">
<!-- First reference -->
<reference number="1">
<author>
<firstname>Ron</firstname>
<name>Jefferson</name>
</author>
<title>XML for Beginners</title>
<editor>McGraw Hill</editor>
<!-- <isbn>12-3344-567-00</isbn> -->
</reference>
</literature>
<?xml version="1.0" encoding="UTF-8"?>
<xsd:element name="literature">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="reference">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="author">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="title" type="xsd:string" />
<xsd:element name="editor" type="xsd:string" />
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:sequence>
<xsd:attribute name="number" type="xsd:integer" />
</xsd:complexType>
</xsd:element>