Re: Alternatives to redefine

Hi,

Catching on the title more than on the content of your message and
taking the risk to be called an heretic, I will reiterate a proposal
done on xml-dev a looong time ago and slightly more elaborated in my
book: there might be cases where general inclusion or definition
mechanisms such as external or internal parsed entities or XInclude can
be interesting as alternatives of xs:include and xs:redefine.

If you want for instance to make sure that your applications are all
using explicit time zones, you may define a pattern such as:

<xs:pattern value=".+(Z|[+-]\d\d:\d\d)"/>

but there are 8 different primitive types on which you would need to
apply the template and you may prefer to define the pattern once and use
external or internal parsed entities or XInclude to reference it in all
the derivations (I won't go over the benefit of a single definition in
term of maintenance).

In other words, xs:include and xs:redefine are fine as long as the
granularity chosen by the W3C XML Schema Working Group fits your needs.
If you want to include other W3C XML Schema elements than elements,
attributes, simple and complex types and elements and attributes groups
you're stuck and may have to look for other alternatives.

The downside is that, of course, these alternatives won't enforce the
semantics of W3C XML Schema (like let's say a C #include directive). 

Hope this helps.

Eric
-- 
See you in San Diego.
                               http://conferences.oreillynet.com/os2002/
------------------------------------------------------------------------
Eric van der Vlist       http://xmlfr.org            http://dyomedea.com
(W3C) XML Schema ISBN:0-596-00252-1 http://oreilly.com/catalog/xmlschema
------------------------------------------------------------------------

Received on Tuesday, 9 July 2002 02:46:56 UTC