from lookup table values to enum in xml schema

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • s o

    from lookup table values to enum in xml schema

    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

  • Martin Honnen

    #2
    Re: from lookup table values to enum in xml schema



    s o wrote:

    [color=blue]
    > 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?[/color]

    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

    Comment

    Working...