For using substitution groups, see http://wiki.apache.org/xmlbeans/SubstGroupsFaq
Radu -----Original Message----- From: Lucca Karensky [mailto:[EMAIL PROTECTED] Sent: Saturday, September 16, 2006 2:49 PM To: [email protected] Subject: problems with abstract types Hi there, does somebody know how to access the element TimeoutCondition from the following XSD: What I actually want is to create an IEdge element in my XML file with a TimeoutCondition. e.g. <IEdge target="T" start="D"> <TimeoutCondition timeout="10000"/> </IEdge> Unfortunately the XMLBeans-schema gives me only the opportunity to add/set a Condition and NOT a TimeoutCondition element. i.e. with this code: ----- TimeoutConditionDocument.TimeoutCondition timeoutCond = TimeoutConditionDocument.TimeoutCondition.Factory.newInstance(); timeoutCond.setTimeout((long)4040); timeoutCond.setRepeat(false); myNewIEdge.setCondition((TimeoutConditionDocument.TimeoutCondition)timeo utCond); ----- I get something like : <IEdge target="T" start="D"> <Condition timeout="4040" repeat="false"/></IEdge> ########################### the XSD File (part of it): ### <xs:complexType name="IEdge"> <xs:annotation> <xs:documentation>An interruptive edge.</xs:documentation> </xs:annotation> <xs:complexContent> <xs:extension base="Edge"> <xs:sequence> <xs:element ref="Condition"/> <xs:element name="Commands" type="Commands" minOccurs="0"/> </xs:sequence> </xs:extension> </xs:complexContent> </xs:complexType> ### <xs:element name="Condition" type="Abstract" abstract="true" substitutionGroup="Expression"> <xs:annotation> <xs:documentation>Abstract condition.</xs:documentation> </xs:annotation> </xs:element> ### <xs:element name="TemporalCondition" type="Abstract" abstract="true" substitutionGroup="Condition"> <xs:annotation> <xs:documentation>Temporal conditions.</xs:documentation> </xs:annotation> </xs:element> ### <xs:element name="TimeoutCondition" substitutionGroup="TemporalCondition"> <xs:annotation> <xs:documentation>Timeout condition.</xs:documentation> </xs:annotation> <xs:complexType> <xs:complexContent> <xs:extension base="Abstract"> <xs:attribute name="timeout" type="Long" use="required"/> <xs:attribute name="repeat" type="Bool" use="optional" default="false"/> </xs:extension> </xs:complexContent> </xs:complexType> </xs:element> ################################### I would be most grateful for any help. Thanks in advance. Cheers Lucca --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] _______________________________________________________________________ Notice: This email message, together with any attachments, may contain information of BEA Systems, Inc., its subsidiaries and affiliated entities, that may be confidential, proprietary, copyrighted and/or legally privileged, and is intended solely for the use of the individual or entity named in this message. If you are not the intended recipient, and have received this message in error, please immediately return this by email and then delete it. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

