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. Problem creating working XSD with restrictions

Problem creating working XSD with restrictions

Scheduled Pinned Locked Moved XML / XSL
xmltutorialquestiondatabasehelp
1 Posts 1 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
    clatten
    wrote on last edited by
    #1

    I have a couple of xml files I'd like to create xsd schemas for. This is not so difficult but the problem is that the strcuture of the xml file (something I can't easily influence) is strange. The files problem section look like this: 1.0

    .jpg 128 128 65536 X Model X X1 7592597B-E087-4565-9BAC-596C096EBB2C X2 523DC659-B6F8-4b38-8EEB-B19E7AC7F2E3 1:1 TCFILETRANSFER 1 \\

    My problem is not that I can create a working schema. It is that I'd like to have restrictions on all key elements which I cannot figure out how to do since they are all of different types. For example key name="defaultImageType" has a string as value and i'd like to have a restriction xs:enumeration value=".jpg | .bmp | .gif" but I also want to have key name="imageHeight with type xs:positiveInteger and so on. Is this possible, to have different types on elements with same name? Apparently the xml file works. And if it is allowed how can I do the schema? /Clatten

    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