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. xsd:enumeration from XML file

xsd:enumeration from XML file

Scheduled Pinned Locked Moved XML / XSL
xmldatabasetutorialquestion
2 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.
  • A Offline
    A Offline
    Andre xxxxxxx
    wrote on last edited by
    #1

    Is it possible to use the values from a XML file as the restriction/enumeration in a schema? The only way I know off is to use XSL to generate a XSD file that only contains the enumeration and then include it into the other XSD file. For example a customers.xml and a order.xsd as the schmema for orders.xml, where the name should be restricted to those in customers.xml.

    S 1 Reply Last reply
    0
    • A Andre xxxxxxx

      Is it possible to use the values from a XML file as the restriction/enumeration in a schema? The only way I know off is to use XSL to generate a XSD file that only contains the enumeration and then include it into the other XSD file. For example a customers.xml and a order.xsd as the schmema for orders.xml, where the name should be restricted to those in customers.xml.

      S Offline
      S Offline
      Stefan Troschuetz
      wrote on last edited by
      #2

      Andre Buenger wrote:

      The only way I know off is to use XSL to generate a XSD file that only contains the enumeration and then include it into the other XSD file.

      Not the only way (e.g. you could put the enumeration into orders.xsd and use DOM to change it according to the content of customers.xml), but I think your approach is better and far more practible, so in my opinion you should go for it.


      "Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning." - Rick Cook

      www.troschuetz.de

      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