XML Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsProgramming Languages - MoreXML Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old May 28th, 2004, 01:00 PM
mlauzon mlauzon is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Feb 2003
Location: Halifax, Nova Scotia, Canada, North America, Planet Earth, (Inner) Sol System, Milky Way Galaxy, Universe
Posts: 15 mlauzon User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 18 m 27 sec
Reputation Power: 0
Send a message via MSN to mlauzon
Question XML Schema(s): Help Needed

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:

Code:
<?xml version="1.0" encoding="utf-8"?>


<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">


<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:

Quote:
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).




---
Michael Lauzon, Founder
The Quill Society
http://www.quillsociety.org/
mlauzon@quillsociety.org

Reply With Quote
  #2  
Old May 28th, 2004, 01:25 PM
mlauzon mlauzon is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Feb 2003
Location: Halifax, Nova Scotia, Canada, North America, Planet Earth, (Inner) Sol System, Milky Way Galaxy, Universe
Posts: 15 mlauzon User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 18 m 27 sec
Reputation Power: 0
Send a message via MSN to mlauzon
I forgot to mention, if we 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.

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming Languages - MoreXML Programming > XML Schema(s): Help Needed


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 3 hosted by Hostway
Stay green...Green IT