I have the following schema, which I believe needs to be fleshed out more to make it more powerful, can someone please help and also point me in the right direction...hopefully once my project gets approved on SourceForge I will be adding this as well as something else I have to the project. Anyeverhow, here is the schema as it stands right now:
If you can make any changes to it, please do...any and all help would be very much appreciated.
Someone said the following to me as well, although I am having problems understanding what he is implying, probably because he didn't include an example:
If I can get this up and running, I will eventually need to be able to easily change some things in it to get it working with a second project that I have on SourceForge.
Michael Lauzon, Founder
The Quill Society
mlauzon@quillsociety.org
Code:
<?xml version="1.0" encoding="utf-8"?>
<xs:schema xmlns:xs="[URL unfurl="true"]http://www.w3.org/2001/XMLSchema">[/URL]
<xs:element name="student">
<xs:complexType>
<xs:sequence>
<xs:element name="stunum" type="xs:integer" />
<xs:element name="lastname" type="xs:string" />
<xs:element name="firstname" type="xs:string" />
<xs:element name="age" type="xs:integer" />
<xs:element name="dateborn" type="xs:date" />
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="address">
<xs:complexType>
<xs:sequence>
<xs:element name="pnum" type="xs:integer" />
<xs:element name="addnum" type="xs:integer" />
<xs:element name="street" type="xs:string" />
<xs:element name="city" type="xs:string" />
<xs:element name="country" type="xs:string" />
<xs:element name="poczip" type="xs:string" />
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema>
If you can make any changes to it, please do...any and all help would be very much appreciated.
Someone said the following to me as well, although I am having problems understanding what he is implying, probably because he didn't include an example:
In your case, it depends on where you're going with this, but I'd consider creating a ComplexType for a "person" and then define your "Student" as an extension of the Person type, adding perhaps the student ID. That way, if you added Instructor, you'd be able to re-use the generalized part of the definition of a person (since Instructors and Students both have some things in common).
If I can get this up and running, I will eventually need to be able to easily change some things in it to get it working with a second project that I have on SourceForge.
Michael Lauzon, Founder
The Quill Society
mlauzon@quillsociety.org