Data Typing in XML is Weak
<xsd:schema xmlns:xsd="http://www.w3.org/2000/10/XMLSchema"> <xsd:annotation> <xsd:documentation> Song schema for XML and Java Example at SD2000 East Copyright 2000 Elliotte Rusty Harold. </xsd:documentation> </xsd:annotation> <xsd:element name="SONG" type="songType"/> <xsd:complexType name="songType" content="elementOnly""> <xsd:element name="TITLE" type="xsd:string"/> <xsd:element name="PHOTO" type="photoType" minOccurs="0" maxOccurs="1"/> <xsd:element name="COMPOSER" type="xsd:string" minOccurs="1" maxOccurs="unbounded"/> <xsd:element name="PRODUCER" type="xsd:string" minOccurs="0" maxOccurs="unbounded"/> <xsd:element ref="publisher" minOccurs="0" maxOccurs="1"/> <xsd:element name="LENGTH" type="xsd:string"/> <xsd:element name="YEAR" type="xsd:string"/> <xsd:element name="ARTIST" type="xsd:string" minOccurs="1" maxOccurs="unbounded"/> <xsd:attribute name="xmlns" type="xsd:NMTOKEN" use="fixed" value="http://ibiblio.org/xml/namespace/song"/> <xsd:attribute name="xmlns:xlink" type="xsd:NMTOKEN" use="fixed" value="http://www.w3.org/1999/xlink"/> </xsd:complexType> <xsd:complexType name="photoType" content="empty"> <xsd:attribute name="xlink:type" type="xsd:NMTOKEN" use="fixed" value="simple"/> <xsd:attribute name="xlink:show" type="xsd:NMTOKEN" use="fixed" value="embed"/> <xsd:attribute name="xlink:href" type="xsd:uri-reference" use="fixed" value="simple"/> <xsd:attribute name="ALT" type="xsd:string"/> <xsd:attribute name="WIDTH" type="xsd:positive-integer"/> <xsd:attribute name="HEIGHT" type="xsd:positive-integer"/> </xsd:complexType> <xsd:element name="PUBLISHER"> <xsd:complexType base='xsd:string' derivedBy='extension' content="textOnly"> <xsd:attribute name="xlink:type" type="xsd:NMTOKEN" use="fixed" value="simple"/> <xsd:attribute name="xlink:href" type="xsd:uri-reference" /> </xsd:complexType> </xsd:element> </xsd:schema>