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

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

From: Ashok Malhotra <ashokma@microsoft.com>
Date: Thu, 17 Jan 2002 07:58:54 -0800
Message-ID: <E5B814702B65CB4DA51644580E4853FB019EE78F@red-msg-12.redmond.corp.microsoft.com>
To: <kraj@infoprosolutions.com>, <xmlschema-dev@w3.org>
Sorry, can't do it!  This is an example of what is called a
co-occurrence constraint.  XML Schema does not support co-occurrence

All the best, Ashok 
Ashok Malhotra              <mailto: ashokma@microsoft.com> 
Microsoft Corporation
Redmond: 425-703-9462                New York: 914-271-6477 

-----Original Message-----
From: kraj@infoprosolutions.com [mailto:kraj@infoprosolutions.com] 
Sent: Thursday, January 17, 2002 5:27 AM
To: xmlschema-dev@w3.org
Subject: XML Schema : Validating contents of one tag with another


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.
Here e.g. 1 is valid but 2 is not.


How do I constraint this dependency while writing the XML Schema
document ?
Can anybody help ?

Received on Thursday, 17 January 2002 10:59:26 UTC

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