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

Re: XML Schema : Validating contents of one tag with another

From: Jeni Tennison <jeni@jenitennison.com>
Date: Thu, 17 Jan 2002 14:11:31 +0000
Message-ID: <150884030358.20020117141131@jenitennison.com>
To: kraj@infoprosolutions.com
CC: xmlschema-dev@w3.org
Hi Krishna,

> How do I write a contraint in XML Schema document that validates
> content of a tag based on content of another. e.g. below : The
> AIRBILL can have a value only when CARR_CODE has a value otherwise
> not.

I'm afraid that XML Schema doesn't let you articulate these kinds of
constraints. You could use another schema language, such as RELAX NG
or Schematron as a schema adjunct to validate against these kinds of
rules.

Cheers,

Jeni

---
Jeni Tennison
http://www.jenitennison.com/
Received on Thursday, 17 January 2002 09:11:33 GMT

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