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



Jeni Tennison
Received on Thursday, 17 January 2002 09:11:33 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 14:55:54 UTC