DTD:
<!ELEMENT img EMPTY>
<!ATTLIST img
alt CDATA #REQUIRED
src CDATA #REQUIRED
width CDATA #IMPLIED
height CDATA #IMPLIED>
XML Schema:
<xsd:attributeGroup name="imgAttributes">
<xsd:attribute name="alt" type="xsd:string" use="required"/>
<xsd:attribute name="src" type="xsd:NMTOKEN" use="required"/>
<xsd:attribute name="width" type="xsd:integer"/>
<xsd:attribute name="height" type="xsd:integer"/>
</xsd:attributeGroup>
<xsd:element name="img">
<xsd:complexType>
<xsd:attributeGroup ref="imgAttributes"/>
<xsd:complexType>
</xsd:element>