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

Re: Conditional processing im schema!!

From: Jeni Tennison <jeni@jenitennison.com>
Date: Mon, 15 Apr 2002 11:36:01 +0100
Message-ID: <331134139346.20020415113601@jenitennison.com>
To: Cool Santos <mogot2002@yahoo.fr>
CC: Schema_Mailinglist <xmlschema-dev@w3.org>
Hi Mogo,

> My question: I want to generate, that if A has the value 10, per
> example D may not seem in the generated XML document etc.. It was
> said to me that it goes with Schematron. I had also tried that. But
> Schematron runs only under Windows.

Schematron is basically a set of XSLT stylesheets, so it can run on
any platform that supports XSLT -- many XSLT processors are
Java-based, so that should be any platform. I think you're thinking of
the Topologi schema validator, but that's just one method of
validating instances against Schematron schemas.

> It's now possible, without Schematron, to form ilk conditional
> processings direct im schema ?????

XML Schema doesn't support co-occurrence constraints (conditional
processing), so you can't do it natively in XML Schema. You can embed
anything you like within an XML Schema, however (inside the xs:appinfo
element), and then extract it and use it in whatever way you like,
including extra validation. This is exactly how embedded Schematron
works. So for example, you could refer to some Java code for
validating an element from the xs:appinfo element, then have a process
that uses those references to further validate the document.

Cheers,

Jeni

---
Jeni Tennison
http://www.jenitennison.com/
Received on Monday, 15 April 2002 06:36:03 GMT

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