How do we put attributes inside an element in a XML schema?

Anguish

New Member
\[code\]<?xml version="1.0" encoding="UTF-8"?><xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" targetNamespace="http://www.google.com" xmlns="http://www.google.com" elementFormDefault="qualified"><xsd:element name ="students"> <xsd:simpleContent> <xsd:extension base="xsd:string"> <xsd:attribute name="IDNUMBER" type="integer" use="required"/> </xsd:extension> </xsd:simpleContent> <xsd:complexType> <xsd:sequence> <xsd:element name ="guy"> <xsd:complexType> <xsd:sequence> </xsd:sequence> </xsd:complexType> </xsd:element> </xsd:sequence> </xsd:complexType></xsd:element></xsd:schema>\[/code\]I don't quite understand why it doesn't work. I tried putting attributes and stuff, but I get all sort of errors that doesn't quite seem to have anything to do with what's actually wrong. Earlier, I got Error3033: The content is not valid. Expected is (annotation?, (element | group | choice | sequence | any)*). Now, I get something else.
 
Back
Top