View Full Version : Anyone good at XML Schema?

05-30-2002, 10:05 AM
I am using xml alongside my latest program....seems to be working out nicely, i just recently added functionality to include pictures in the XML files (a makeshift img tag that gets outputted by XSL)
basically, i'm having trouble putting an attribute inside my img tag, it says that i can only have one top element (in this case it has been set to be the portfolio tag) heres the code for the xml and schema, it's short.

<xs:schema xmlns:xs='http://www.w3.org/2001/XMLSchema' targetNamespace='http://www.w3schools.com' elementFormDefault='qualified'>
<xs:element name='porfolio'>
<xs:element name='academic' type='xs:string' />
<xs:element name='sport' type='xs:string' />
<xs:element name='extra' type='xs:string' />
<xs:element name='img' />
<xs:complexType name='img'>
<xs:attribute name='src' type='xs:anyURI' />

thanks for any help you can give me.