xmlbeans-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Lucca Karensky" <l.karen...@gmx.de>
Subject problems with abstract types
Date Sat, 16 Sep 2006 21:48:38 GMT
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)timeoutCond);
-----
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: user-unsubscribe@xmlbeans.apache.org
For additional commands, e-mail: user-help@xmlbeans.apache.org


Mime
View raw message