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. Schema Validation

Schema Validation

Scheduled Pinned Locked Moved XML / XSL
xmlquestiondatabasehelp
4 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.
  • C Offline
    C Offline
    cobyjone
    wrote on last edited by
    #1

    I am trying to write a schema to validate an xml file. I can get it to validate everything correctly. I have one problem though. In the xml file, after a certain element, I am not going to know what will be there. ex. //After this point, the layout could change at any time (and without notice I might add) //and I don't want to have to keep changing the schema everytime the layout changes. Anyways, my question is, how would I write the schema to stop the validation at that point? Thanks.

    D 1 Reply Last reply
    0
    • C cobyjone

      I am trying to write a schema to validate an xml file. I can get it to validate everything correctly. I have one problem though. In the xml file, after a certain element, I am not going to know what will be there. ex. //After this point, the layout could change at any time (and without notice I might add) //and I don't want to have to keep changing the schema everytime the layout changes. Anyways, my question is, how would I write the schema to stop the validation at that point? Thanks.

      D Offline
      D Offline
      DavidNohejl
      wrote on last edited by
      #2

      hi, xs:any should do the job. W3C XML Schema spec.[^] best regards, David 'DNH' Nohejl Never forget: "Stay kul and happy" (I.A.)

      C 1 Reply Last reply
      0
      • D DavidNohejl

        hi, xs:any should do the job. W3C XML Schema spec.[^] best regards, David 'DNH' Nohejl Never forget: "Stay kul and happy" (I.A.)

        C Offline
        C Offline
        cobyjone
        wrote on last edited by
        #3

        When I change it I get this exception "The 'http://www.w3.org/2001/XMLSchema:any' element is not supported in this context". Any advice.

        C 1 Reply Last reply
        0
        • C cobyjone

          When I change it I get this exception "The 'http://www.w3.org/2001/XMLSchema:any' element is not supported in this context". Any advice.

          C Offline
          C Offline
          cobyjone
          wrote on last edited by
          #4

          Nevermind, I changed it to Maybe not that exactly, but it worked. Thanks for the help

          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