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. Newbie needs help with a schema.

Newbie needs help with a schema.

Scheduled Pinned Locked Moved XML / XSL
xmlhelpdatabasetoolsregex
3 Posts 2 Posters 11 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.
  • N Offline
    N Offline
    nay
    wrote on last edited by
    #1

    I hate "why doesn't this work" posts but I'm at wits end. Here's a snippet of my xml schema (I took off the angle brackets so it would show up). msgIDType and TextFieldType are defined later in the file.

    ?xml version="1.0"?
    xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
    xsd:element name="message"
    xsd:complexType
    xsd:sequence
    xsd:element name="msgID" type="msgIDType"
    xsd:element name="TextField" type="TextFieldType"
    /xsd:sequence
    /xsd:complexType
    /xsd:element

    Now I'm using a simple validation script that is based on MSXML4 it returns this error...

    Error: End tag 'xsd:sequence' does not match the start tag 'xsd:element'

    I've checked all sequences and elements and each one has a matching end tag. I've also made sure that one doesn't begin before the other ends. So what else am I missing?:confused: nay

    M 1 Reply Last reply
    0
    • N nay

      I hate "why doesn't this work" posts but I'm at wits end. Here's a snippet of my xml schema (I took off the angle brackets so it would show up). msgIDType and TextFieldType are defined later in the file.

      ?xml version="1.0"?
      xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
      xsd:element name="message"
      xsd:complexType
      xsd:sequence
      xsd:element name="msgID" type="msgIDType"
      xsd:element name="TextField" type="TextFieldType"
      /xsd:sequence
      /xsd:complexType
      /xsd:element

      Now I'm using a simple validation script that is based on MSXML4 it returns this error...

      Error: End tag 'xsd:sequence' does not match the start tag 'xsd:element'

      I've checked all sequences and elements and each one has a matching end tag. I've also made sure that one doesn't begin before the other ends. So what else am I missing?:confused: nay

      M Offline
      M Offline
      Michael A Barnhart
      wrote on last edited by
      #2

      If all you removed was the angle brakets then your "middle" xsd:elements are not terminated. nay wrote: xsd:element name="msgID" type="msgIDType" xsd:element name="TextField" type="TextFieldType" should be: xsd:element name="msgID" type="msgIDType"/ xsd:element name="TextField" type="TextFieldType"/ And would give you the mentioned error. To be conscious that you are ignorant of the facts is a great step towards Knowledge. Benjamin Disraeli

      N 1 Reply Last reply
      0
      • M Michael A Barnhart

        If all you removed was the angle brakets then your "middle" xsd:elements are not terminated. nay wrote: xsd:element name="msgID" type="msgIDType" xsd:element name="TextField" type="TextFieldType" should be: xsd:element name="msgID" type="msgIDType"/ xsd:element name="TextField" type="TextFieldType"/ And would give you the mentioned error. To be conscious that you are ignorant of the facts is a great step towards Knowledge. Benjamin Disraeli

        N Offline
        N Offline
        nay
        wrote on last edited by
        #3

        Thanks for the reply! Unfortunately the code is at work so I cannot check it to see if that's what I did. I was sure I put the / on the end but who knows. It is the weekend so I'll worry about it on monday.:) nay

        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