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>
Hello,
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 
appear!
Is that possible??

An example of my problem:

Schema:

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

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">
	<A>30</A>
	<B>40</B>
	<C>
          <D>Hello</D>
          <E>20</E>
        </C>
</moi>

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


Thank you!


San



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 GMT

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