from lookup table values to enum in xml schema

Discussion in 'XML' started by s o, Apr 12, 2005.

  1. s o

    s o Guest

    Hi,

    I'm creating a xml schema for my existing database. I've about a dozen
    lookup tables, such as States, Unit of Measures, etc. I figured the
    most logical way to represent them is to create have a simpletype for
    each table and enumerate the values inside each type. The only
    drawback I see is that this makes my schema tightly coupled to my db,
    for any change in the lookup values, I'd have to change the schema,
    regenerate the JAXB classes, etc. Is there a better way than using
    enum or is there way to do dynamicly load the values? Thanks.

    s o
     
    s o, Apr 12, 2005
    #1
    1. Advertising

  2. s o wrote:


    > I'm creating a xml schema for my existing database. I've about a dozen
    > lookup tables, such as States, Unit of Measures, etc. I figured the
    > most logical way to represent them is to create have a simpletype for
    > each table and enumerate the values inside each type. The only
    > drawback I see is that this makes my schema tightly coupled to my db,
    > for any change in the lookup values, I'd have to change the schema,
    > regenerate the JAXB classes, etc. Is there a better way than using
    > enum or is there way to do dynamicly load the values?


    A schema doesn't need to be a static document, you could fetch the
    schema by URL from an ASP or PHP or JSP server application that builds
    the schema on the fly.

    --

    Martin Honnen
    http://JavaScript.FAQTs.com/
     
    Martin Honnen, Apr 12, 2005
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. s o
    Replies:
    0
    Views:
    505
  2. Markus
    Replies:
    1
    Views:
    1,611
    Markus
    Nov 23, 2005
  3. Ian Mayo
    Replies:
    0
    Views:
    490
    Ian Mayo
    Jun 2, 2004
  4. Stanimir Stamenkov
    Replies:
    3
    Views:
    1,295
    Stanimir Stamenkov
    Apr 25, 2005
  5. Replies:
    3
    Views:
    2,951
Loading...

Share This Page