Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. XML / XSL
  4. XML Schema(s): Help Needed

XML Schema(s): Help Needed

Scheduled Pinned Locked Moved XML / XSL
xmldatabasehelptutorial
6 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    mlauzon27
    wrote on last edited by
    #1

    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

    J 1 Reply Last reply
    0
    • M mlauzon27

      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

      J Offline
      J Offline
      JussiL
      wrote on last edited by
      #2

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

      M 1 Reply Last reply
      0
      • J JussiL

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

        M Offline
        M Offline
        mlauzon27
        wrote on last edited by
        #3

        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

        J 1 Reply Last reply
        0
        • M mlauzon27

          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

          J Offline
          J Offline
          JussiL
          wrote on last edited by
          #4

          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

          M 1 Reply Last reply
          0
          • J JussiL

            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

            M Offline
            M Offline
            mlauzon27
            wrote on last edited by
            #5

            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:

            J 1 Reply Last reply
            0
            • M mlauzon27

              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:

              J Offline
              J Offline
              JussiL
              wrote on last edited by
              #6

              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.

              1 Reply Last reply
              0
              Reply
              • Reply as topic
              Log in to reply
              • Oldest to Newest
              • Newest to Oldest
              • Most Votes


              • Login

              • Don't have an account? Register

              • Login or register to search.
              • First post
                Last post
              0
              • Categories
              • Recent
              • Tags
              • Popular
              • World
              • Users
              • Groups