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


Help: OASIS Mailing Lists Help | MarkMail Help



   Re: DTDs, W3 XML Schema, RELAX, or Schematron?

[ Lists Home | Date Index | Thread Index ]
  • From: Eric van der Vlist <vdv@dyomedea.com>
  • To: "xml-dev@lists.xml.org" <xml-dev@lists.xml.org>
  • Date: Tue, 14 Nov 2000 10:13:32 +0100


Some comments below...

Linda van den Brink wrote:
> Hi all,
> I've been wondering for a while about the use of DTDs, W3C XML Schema,
> RELAX, and Schematron. Specifically about which of these to use in which
> situation. So far, I only have experience with DTDs, and have only read
> about the others (on this list, among other places).
> My impressions are as follows (sorry in advance for my vague notions):
> - DTDs: good for defining and validating human-written documents, especially
> in structures where elements and PCDATA mix.
> - W3C XML Schema: good for validating documents written and used by
> computers (data exchange etc), especially for database-like structures.

W3C XML Schema is more flexible that DTDs to validate mixed content, so
I wouldn't classify it like this...

> - RELAX: positions itself in between DTDs and Schema, and can be used as
> interim solution when you want to move from DTDs to Schema and don't want to
> wait for Schema to become a recommendation. I'm not sure what specific
> advantages/disadvantages RELAX has and what kinds of structures would fit
> well with RELAX.
> - Schematron: good for validating content rules rather than structure rules.
> E.g. elements with an enumerated list of allowed values. I think Schematron
> could best be used in addition to DTDs?

Not so sure...
W3C XML Schema lets you attach information to your schemas (kind of
"pure" XML PIs) and you can define bridges between schemas and other XML
applications (such as Schematron).

> What do others think about this? Am I right in thinking that DTDs, Schema,
> RELAX, and Schematron each have their pros and cons that make them the best
> choice in a certain situation?

I attach a mail I have recently sent to the schematron mailing list with
a comparison between schematron and schema technologies.
> Or will DTDs become obsolete and will W3C XML Schema, RELAX, or Schematron
> replace them?

MHO is that different validation techniques will be used for different

Hope this helps.

> Wondering,
> Linda van den Brink

Eric van der Vlist       Dyomedea                    http://dyomedea.com
http://xmlfr.org         http://4xt.org              http://ducotede.com

  • From: Eric van der Vlist <vdv@dyomedea.com>
  • To: schematron-love-in@lists.sourceforge.net
  • Date: Tue, 31 Oct 2000 19:50:32 +0100
Dave Pawson wrote:
> The fact that it outshines Schemas in may areas,  is almost
> incidental.
> It has the ideal characteristics.
> Simple at a simple level, can do the hard stuff.

I hope that it's not because of my lack of knowledge of Schematron, but
I don't really see Schematron as a competitor for W3C XML Schema, or
DTDs, or Relax, but rather as a complementary tool.

In fact, I don't think we should even really consider W3C XML Schema,
DTDs, or Relax as validation tools :=) ...

These are design tools allowing to define data models and incidentally
used to validate documents...

They could/should be used to perform many other things such as
generating programs and transformations, but the fact is that their main
usage is validation.

On the other hand, Schematron is really about validation, allowing to
define a set of rules to be checked and the actions to be taken if they
fail without really caring about a data model.

For this reason, it will always be more flexible than the other
technologies I have mentioned.

But it puts a heavy responsibility on the developer's shoulder since
he/she has to take care of defining all the rules needed to do a good

A good compromise could be to generate Schematron from model driven

This would give them the flexibility they need and be a good exhaustive
starting point to develop schematron schemas.

My 0,02 Euros (I know Dave likes it ;)

Eric van der Vlist       Dyomedea                    http://dyomedea.com
http://xmlfr.org         http://4xt.org              http://ducotede.com
Schematron-love-in mailing list


News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 2001 XML.org. This site is hosted by OASIS