W3C home > Mailing lists > Public > xmlschema-dev@w3.org > August 2001

Conditional processing im Schema!

From: San Coulibaly <sancoulibaly@hotmail.com>
Date: Wed, 29 Aug 2001 10:36:50 -0400 (EDT)
To: xmlschema-dev@w3.org
Message-ID: <F9JimGzZFlFQNKwJsxz00018d36@hotmail.com>
I am working with xml schema.I have a problem.
I want to generate conditional processing, for example
when this element has this worth, then another element is permitted to 
Is that possible??

An example of my problem:


<xsd:schema xmlns:sch="http://www.ascc.net/xml/Schematron"
	<xsd:element name="moi">
		 <xsd:element ref="A"/>
		 <xsd:element ref="B"/>
		 <xsd:element name="C" type="CType"/>
	 <xsd:element name="A" type="xsd:integer"/>
	 <xsd:element name="B" type="xsd:integer"/>
         <xsd:complexType name="CType">
             <xsd:element name="D" type="string"
minOccurs="0" maxOccurs="unbounded"/>
             <xsd:element name="E" type="xsd:integer"/>

A XML-Instance:

<moi xmlns:xsi="http://www.w3.org/2000/10/XMLSchema-
instance" xsi:noNamespaceSchemaLocation="C:\Dokumente und
Einstellungen\sc.ESCHER\Eigene Dateien\essai.xsd">

Now, I want to generate, if A=10, then element D in C does
not appear!

Thank you!


Please help!

The Answer to   sancoulibaly@hotmail.com

Downloaden Sie MSN Explorer kostenlos unter http://explorer.msn.de/intl.asp
Received on Thursday, 30 August 2001 06:10:27 UTC

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