<em**************@fastmail.fmwrote in message
news:11**********************@i3g2000cwc.googlegro ups.com...
Hi
<ClubNight Name = "Go club" Date = "2006-09-09">
Discussed a few simple proverbs.
<Attendee Name = "RJ"/>
<Attendee Name = "TT"/>
<Attendee Name = "RB"/>
</ClubNight>
I'm trying to work out if I can actually define this as a complex type
in my schema.
I can do it no problems without the text 'Discussed a few simple
proverbs." but no matter how I fiddle with extending a simple type and
so on, I just can't get it working.
Is it actually possible? Thanks for any advice.
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
elementFormDefault="qualified">
<xs:element name="ClubNight">
<xs:complexType mixed="true">
<xs:sequence>
<xs:element minOccurs="0" maxOccurs="unbounded" ref="Attendee"/>
</xs:sequence>
<xs:attribute name="Date" use="required" type="xs:NMTOKEN"/>
<xs:attribute name="Name" use="required"/>
</xs:complexType>
</xs:element>
<xs:element name="Attendee">
<xs:complexType>
<xs:attribute name="Name" use="required" type="xs:NCName"/>
</xs:complexType>
</xs:element>
</xs:schema>
Emma, to give credit where it's due, this was generated by Stylus Studio
(
http://www.stylusstudio.com/).
John
BTW, if you have a choice, I'd put the text in an element, like:
<NotesDiscussed a few simple proverbs.</Notes>
This would allow for greater flexibility later on. You could, for instance,
structure the notes, or include XHTML in them.