from lookup table values to enum in xml schema

S

s o

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
 
M

Martin Honnen

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.
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,776
Messages
2,569,603
Members
45,190
Latest member
ClayE7480

Latest Threads

Top