OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Multi-stage schema validation and schema design



I am designing XML Schemas for a B2B application and would
appreciate some comments as to the schema design options available
for multi-stage validation. I would like to use one namespace at the
moment.

SITUATION
==========

I have a simple "message" wrapper which is used to carry
transactions between back-end systems in different organisations.
 This wrapper contains sufficient information to determine the application
targetted by the transaction.

I would like to allow the message gateway to validate the message
"envelope"  of incoming messages sufficiently to route transactions
to the correct application. However, the gateway need know nothing
of the structure of the transactions themselves.

I envisage that the applications would then schema validate
the transactions.


SCHEMA VALIDATION
====================

There would appear to be two ways to proceed - global elements or
global types.


GLOBAL ELEMENTS

In this approach, I use global elements for any wrapper elements and each
transaction.

The downside is that I must include namespaces on these elements
in instance documents, and I loose the ability to "hide" the namespace, as
suggested by the best practice guidelines.


GLOBAL TYPES

In this approach, I use types for the wrapper and transactions and have a
single
top-level element, as discussed in the best practices.


PRACTICAL REALITIES
=====================

Whilst the XML Schema section on validation (data structure - 5.2) suggests
that
it should be possible to ask a validator to validate an element if you a
priori know
the type, comments I have received suggest this is not a capability the
current
crop of schema validators support.

Is this in fact the case?
Does anyone know of validators supporting this functionality?
Are there any downsides with using this approach as opposed to
global elements?


Any comments on any of the above much appreciated.

Regards
Michael