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: 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 http://www.quillsociety.org/ mlauzon@quillsociety.org
-
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: "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 http://www.quillsociety.org/ mlauzon@quillsociety.org
-
I haven't even tested if this is well formed so there might be some typos etc. but this modifed version from you schema shows the basic idea behind type extensions (or inheritance).
Can you -- or someone -- please give me an example XML document based on the schema you posted here...so I can reference it to something. Thanks, Michael Lauzon, Founder The Quill Society http://www.quillsociety.org/ mlauzon@quillsociety.org
-
Can you -- or someone -- please give me an example XML document based on the schema you posted here...so I can reference it to something. Thanks, Michael Lauzon, Founder The Quill Society http://www.quillsociety.org/ mlauzon@quillsociety.org
The schema itself was buggy as it had no root element and so on, but here's a refined version from it and below it you'll fin a sample xml-file. You still have to modify the schema so that it suites you purposes.. and here's a piece of xml which can be validated with the schema: Will Smith 20 1970-06-02
-
The schema itself was buggy as it had no root element and so on, but here's a refined version from it and below it you'll fin a sample xml-file. You still have to modify the schema so that it suites you purposes.. and here's a piece of xml which can be validated with the schema: Will Smith 20 1970-06-02
I've tried adding a simpleType to the XSD, but when I validate it using the W3C's online -- http://www.w3.org/2001/03/webdata/xsv -- XSV program I get errors...I was told to add a simpleType for a comments section, I've tried the following by adding onto the XSD you wrote here:
-
I've tried adding a simpleType to the XSD, but when I validate it using the W3C's online -- http://www.w3.org/2001/03/webdata/xsv -- XSV program I get errors...I was told to add a simpleType for a comments section, I've tried the following by adding onto the XSD you wrote here:
The way you declare the simpletype is incorrect. Check for examples from that tutorial you were pointed to in the other thread.. If I were you, I would also consider these things: - Why do you need simpleType for the comment-element? Why not just declare it like this: ? - Should the comment-element perhaps be under the root element (record)? - Do you really wan't to use sequences? Check what you can do for example with and tags.. and also check the use of minOccurs and maxOccurs attributes with those elements.