Referencing common constants

My project is developing a set of web services designed to work
independently but complementing each other in functionality, for use mainly
by non-browser clients.

In doing this, we are defining each web service's business objects and
protocol in an xml-document, in order to auto-generate source code on both
the server and client side. For the protocol part, we want to define a set
of common constants to be referenced from the design documents, e.g. user
rights needed for calling a method.

Now, we have:
Service_definition.xsd  - an XML Schema
Service_X.xml           - XML files describing business objects and protocol
                          using the schema above

Should I define these types of constants etc as some kind of enumeration in
the xml schema or in an external common xml file (Service_commons.xml). I
have two main requirements:

R1. The constants should have a name, a value and a comment
R2. I want to make the Service_definition.xsd require that constants
referenced in a service definition actually exist.

Questions:
Q1. To my knowledge, R1 eliminates using restriction/enumeration structures
in the xsd, right?
Q2. If putting the constants in an external xml file, how can I achieve R2?

Regards,

Gustav

Received on Monday, 7 April 2003 07:09:39 UTC