W3C home > Mailing lists > Public > xmlschema-dev@w3.org > April 2003

Referencing common constants

From: Gustav Lidén <gustav.liden@ctakt.com>
Date: Mon, 7 Apr 2003 13:04:11 +0200
To: <xmlschema-dev@w3.org>
Message-ID: <LIEBJCEAEPIPKJIECCGHIEFIDBAA.gustav.liden@ctakt.com>

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 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 11 January 2011 00:14:36 GMT