Here is documentation for the nodes representing elements in the XES structure
nodeAnnotation
nodeArray
nodeAssert
nodeAssign
nodeBase
nodeBinaryOp
nodeBlock
nodeBreak
nodeCall
nodeCase
nodeClass
nodeComment
nodeConstant
nodeEnum
nodeIf
nodeImport
nodeImportList
nodeLabel
nodeLoop
nodeMethod
nodeNameList
nodePackage
nodeParameter
nodeParameterList
nodeReturn
nodeSwitch
nodeTry
nodeTypeOp
nodeUnaryOp
nodeVariable
All Types
Package and importList
Defines the package that this is in
<xs:element name="package">
<xs:complexType>
<xs:choice maxOccurs="unbounded">
<xs:element name="classDef" type="classDefType"/>
<xs:element name="importList">
<xs:complexType>
<xs:sequence>
<xs:element name="import" minOccurs="0" maxOccurs="unbounded">
<xs:complexType>
<xs:attribute name="name" type="xs:string" form="unqualified"/>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:choice>
</xs:complexType>
</xs:element>
ClassDef and interfaceDec
This defines a class or interface
<xs:complexType name="classDefType">
<xs:sequence>
<xs:element name="method" type="methodType" minOccurs="0" maxOccurs="unbounded"/>
<xs:element name="classDef" type="classDefType" minOccurs="0" maxOccurs="unbounded"/>
<xs:element name="variable" type="variableType"/>
<xs:element name="tags" type="tagList"/>
<xs:element name="meta" type="xs:string"/>
<xs:element name="comment" type="commentType"/>
</xs:sequence>
<xs:attribute name="name" type="xs:string"/>
<xs:attribute name="implements" type="xs:string"/>
<xs:attribute name="extends" type="xs:string"/>
<xs:attribute name="public" type="xs:boolean"/>
<xs:attribute name="private" type="xs:boolean"/>
<xs:attribute name="protected" type="xs:boolean"/>
<xs:attribute name="static" type="xs:boolean"/>
<xs:attribute name="abstract" type="xs:boolean"/>
<xs:attribute name="interface" type="xs:boolean"/>
</xs:complexType>
Method and MethodAbs
This defines a method within a class
<xs:complexType name="methodType">
<xs:sequence>
<xs:element name="parameterList" type="parameterListType"/>
<xs:element name="tags" type="tagList"/>
<xs:element name="meta" type="xs:string"/>
<xs:element name="variable" type="variableType"/>
<xs:element name="call" type="callType"/>
<xs:element name="comment" type="commentType"/>
<xs:element name="if" type="ifType"/>
<xs:element name="loop" type="loopType"/>
<xs:element name="switch" type="switchType"/>
<xs:element name="try" type="tryType"/>
<xs:element name="break" type="breakType"/>
<xs:element name="return" type="returnType"/>
<xs:element name="block" type="blockType"/>
</xs:sequence>
<xs:attribute name="name" type="xs:string"/>
<xs:attribute name="type" type="xs:string"/>
<xs:attribute name="public" type="xs:boolean"/>
<xs:attribute name="private" type="xs:boolean"/>
<xs:attribute name="protected" type="xs:boolean"/>
<xs:attribute name="static" type="xs:boolean"/>
<xs:attribute name="abstract" type="xs:boolean"/>
<xs:attribute name="native" type="xs:boolean"/>
<xs:attribute name="synchonised" type="xs:boolean"/>
<xs:attribute name="final" type="xs:boolean"/>
</xs:complexType>
<xs:complexType name="parameterListType">
<xs:sequence>
<xs:element name="comment" type="commentType"/>
<xs:element name="parameter" minOccurs="0" maxOccurs="unbounded">
<xs:complexType>
<xs:sequence>
<xs:element name="comment" type="commentType"/>
</xs:sequence>
<xs:attribute name="name" type="xs:string"/>
<xs:attribute name="type" type="xs:string"/>
<xs:attribute name="tagType" type="xs:string"/>
<xs:attribute name="tagValue" type="xs:string"/>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
Loop
This can represent for,while or do-while type of loop.
Depending on which of these (on the value of code) depends on the selection of preCondition, postCondition, initialiser and step as follows:
- for has preCondition, initialiser and step.
- while has preCondition.
- do-while has postCondition.
<xs:complexType name="loopType">
<xs:sequence>
<xs:element name="preCondition" type="booleanExpressionType"/>
<xs:element name="postCondition" type="booleanExpressionType"/>
<xs:element name="initialiser" type="blockType"/>
<xs:element name="step" type="blockType"/>
<xs:element name="block" type="blockType"/>
</xs:sequence>
<xs:attribute name="code" type="loopSubType"/>
</xs:complexType>
<xs:simpleType name="loopSubType">
<xs:restriction base="xs:string">
<xs:enumeration value="for"/>
<xs:enumeration value="do"/>
<xs:enumeration value="while"/>
</xs:restriction>
</xs:simpleType>
Return
Return from method. This occurs in method definition
<xs:complexType name="returnType">
<xs:sequence>
<xs:element name="variable" type="variableType"/>
<xs:element name="constant" type="constantType"/>
<xs:element name="call" type="callType"/>
<xs:element name="binaryOp" type="binaryOpType"/>
<xs:element name="unaryOp" type="unaryOpType"/>
<xs:element name="comment" type="commentType"/>
</xs:sequence>
</xs:complexType>
Block
Groups statements in the same way that '{' and '}' groups together statements in C or Java
<xs:complexType name="blockType">
<xs:sequence minOccurs="2" maxOccurs="unbounded">
<xs:element name="assign" type="assignType"/>
<xs:element name="call" type="callType"/>
<xs:element name="comment" type="commentType"/>
<xs:element name="if" type="ifType"/>
<xs:element name="loop" type="loopType"/>
<xs:element name="switch" type="switchType"/>
<xs:element name="try" type="tryType"/>
<xs:element name="break" type="breakType"/>
<xs:element name="return" type="returnType"/>
<xs:element name="block" type="blockType"/>
</xs:sequence>
</xs:complexType>
BinaryOp
Binary Operation contains two elements plus an operation to be performed on them
The operation is represented by a simple type.
This must contain the 2 elements to be combined, the left hand and right hand operands. In addition any number of comments can be added.
<xs:complexType name="binaryOpType">
<xs:sequence minOccurs="2" maxOccurs="unbounded">
<xs:element name="variable" type="variableType"/>
<xs:element name="array" type="arrayType"/>
<xs:element name="constant" type="constantType"/>
<xs:element name="call" type="callType"/>
<xs:element name="binaryOp" type="binaryOpType"/>
<xs:element name="unaryOp" type="unaryOpType"/>
<xs:element name="comment" type="commentType"/>
</xs:sequence>
<xs:attribute name="operator" type="operatorType"/>
</xs:complexType>
<xs:simpleType name="operatorType">
<xs:restriction base="xs:string">
<xs:enumeration value="||"/>
<xs:enumeration value="&&"/>
<xs:enumeration value="|"/>
<xs:enumeration value="^"/>
<xs:enumeration value="&"/>
<xs:enumeration value="=="/>
<xs:enumeration value="!="/>
<xs:enumeration value="<"/>
<xs:enumeration value=">"/>
<xs:enumeration value="<="/>
<xs:enumeration value=">="/>
<xs:enumeration value="<<"/>
<xs:enumeration value=">>"/>
<xs:enumeration value=">>>"/>
<xs:enumeration value="+"/>
<xs:enumeration value="-"/>
<xs:enumeration value="*"/>
<xs:enumeration value="/"/>
<xs:enumeration value="%"/>
</xs:restriction>
</xs:simpleType>
Constant
Holds a constant string, integer, floating point or boolean value
<xs:complexType name="constantType">
<xs:attribute name="intConst" type="xs:int"/>
<xs:attribute name="stringValue" type="xs:string"/>
<xs:attribute name="floatValue" type="xs:float"/>
<xs:attribute name="doubleValue" type="xs:double"/>
<xs:attribute name="booleanValue" type="xs:boolean"/>
</xs:complexType>
dataType
<xs:simpleType name="primativeType">
<xs:restriction base="xs:string">
<xs:enumeration value="boolean"/>
<xs:enumeration value="byte"/>
<xs:enumeration value="char"/>
<xs:enumeration value="double"/>
<xs:enumeration value="float"/>
<xs:enumeration value="short"/>
<xs:enumeration value="int"/>
<xs:enumeration value="long"/>
<xs:enumeration value="void"/>
<xs:enumeration value="String"/>
</xs:restriction>
</xs:simpleType>
<xs:complexType name="dataType">
<xs:sequence>
<xs:element name="primative" type="primativeType"/>
</xs:sequence>
<xs:attribute name="className" type="xs:string"/>
<xs:attribute name="array" type="xs:boolean"/>
</xs:complexType>
If
Conditional statement
<xs:complexType name="ifType">
<xs:sequence>
<xs:element name="condition" type="booleanExpressionType"/>
<xs:element name="block" type="blockType"/>
<xs:element name="elseBlock" type="blockType" minOccurs="0"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="booleanExpressionType">
<xs:sequence>
<xs:element name="constant" type="constantType"/>
<xs:element name="call" type="callType"/>
<xs:element name="binaryOp" type="binaryOpType"/>
<xs:element name="unaryOp" type="unaryOpType"/>
<xs:element name="comment" type="commentType"/>
</xs:sequence>
</xs:complexType>
Switch
Call different blocks depending on value of variable.
<xs:complexType name="switchType">
<xs:sequence>
<xs:element name="variable" type="variableType"/>
<xs:element name="case" type="caseType"/>
<xs:element name="default" type="caseType"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="caseType">
<xs:sequence>
<xs:element name="constant" type="constantType"/>
<xs:element name="block" type="blockType"/>
</xs:sequence>
</xs:complexType>
Try
Allows action to be taken on error. Exception defines error to look for, catchBlock is excecuted if found
<xs:complexType name="tryType">
<xs:sequence>
<xs:element name="block" type="blockType"/>
<xs:element name="catchBlock" type="catchBlockType"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="catchBlockType">
<xs:sequence>
<xs:element name="block" type="blockType"/>
<xs:element name="exception" type="xs:string"/>
</xs:sequence>
</xs:complexType>
Break
Use this type to represent both break and continue depending on what type is set to.
<xs:complexType name="breakType">
<xs:sequence>
<xs:element name="comment" type="commentType"/>
</xs:sequence>
<xs:attribute name="type" type="breakSubType"/>
</xs:complexType>
<xs:simpleType name="breakSubType">
<xs:restriction base="xs:string">
<xs:enumeration value="break"/>
<xs:enumeration value="continue"/>
</xs:restriction>
</xs:simpleType>
Variable
Defines a variable used by the program.
<xs:complexType name="variableType">
<xs:sequence>
<xs:element name="comment" type="commentType"/>
<xs:element name="assign" type="assignType"/>
</xs:sequence>
<xs:attribute name="name" type="xs:string"/>
<xs:attribute name="type" type="xs:string"/>
<xs:attribute name="public" type="xs:boolean"/>
<xs:attribute name="private" type="xs:boolean"/>
<xs:attribute name="protected" type="xs:boolean"/>
<xs:attribute name="static" type="xs:boolean"/>
<xs:attribute name="primative" type="xs:boolean"/>
<xs:attribute name="array" type="xs:boolean"/>
</xs:complexType>
Assign
This represents an operation which sets a variable such as '=','+=',etc.
This must contain 2 elements, the first is the variable to be assigned (left hand side of equation) and the second is an expression to set its value. In addition any number of comments can be added.
<xs:complexType name="assignType">
<xs:sequence maxOccurs="unbounded">
<xs:element name="variable" type="variableType"/>
<xs:element name="array" type="arrayType"/>
<xs:element name="constant" type="constantType"/>
<xs:element name="call" type="callType"/>
<xs:element name="binaryOp" type="binaryOpType"/>
<xs:element name="unaryOp" type="unaryOpType"/>
<xs:element name="comment" type="commentType"/>
</xs:sequence>
<xs:attribute name="operator" type="assignOperatorType"/>
</xs:complexType> <xs:simpleType name="assignOperatorType">
<xs:restriction base="xs:string">
<xs:enumeration value="="/>
<xs:enumeration value="+="/>
<xs:enumeration value="-="/>
<xs:enumeration value="*="/>
<xs:enumeration value="/="/>
<xs:enumeration value="amp="/>
<xs:enumeration value="|="/>
<xs:enumeration value="^="/>
<xs:enumeration value="%="/>
<xs:enumeration value="left="/>
<xs:enumeration value=">>="/>
<xs:enumeration value=">>>="/>
</xs:restriction>
</xs:simpleType>
UnaryOperation
An operation with one input and one output such as 'not'
<xs:complexType name="unaryOpType">
<xs:sequence maxOccurs="unbounded">
<xs:element name="variable" type="variableType"/>
<xs:element name="array" type="arrayType"/>
<xs:element name="constant" type="constantType"/>
<xs:element name="call" type="callType"/>
<xs:element name="binaryOp" type="binaryOpType"/>
<xs:element name="unaryOp" type="unaryOpType"/>
<xs:element name="comment" type="commentType"/>
</xs:sequence>
<xs:attribute name="type" type="xs:string"/>
<xs:attribute name="operator" type="unaryOperatorType"/>
</xs:complexType>
<xs:simpleType name="unaryOperatorType">
<xs:restriction base="xs:string">
<xs:enumeration value="++"/>
<xs:enumeration value="--"/>
<xs:enumeration value="pre++"/>
<xs:enumeration value="pre--"/>
<xs:enumeration value="!"/>
<xs:enumeration value="~"/>
<xs:enumeration value="+"/>
<xs:enumeration value="-"/>
</xs:restriction>
</xs:simpleType>
Call
Represents a method call, if isNew is set then the class is instantiated.
<xs:complexType name="callType">
<xs:sequence>
<xs:element name="comment" type="commentType"/>
<xs:element name="parameterValueList" type="parameterValueListType"/>
</xs:sequence>
<xs:attribute name="name" type="xs:string"/>
<xs:attribute name="isNew" type="xs:boolean"/>
</xs:complexType>
<xs:complexType name="parameterValueListType">
<xs:sequence>
<xs:element name="comment" type="commentType"/>
<xs:element name="parameterValue" type="parameterValueType"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="parameterValueType">
<xs:sequence>
<xs:element name="variable" type="variableType"/>
<xs:element name="constant" type="constantType"/>
<xs:element name="call" type="callType"/>
<xs:element name="binaryOp" type="binaryOpType"/>
<xs:element name="unaryOp" type="unaryOpType"/>
<xs:element name="comment" type="commentType"/>
</xs:sequence>
</xs:complexType>
typeOperator
Cast to type
<xs:complexType name="castType"> <xs:sequence> <xs:element name="dataType" type="dataType"/> <xs:element name="variable" type="variableType"/> <xs:element name="constant" type="constantType"/> <xs:element name="call" type="callType"/> <xs:element name="binaryOp" type="binaryOpType"/> <xs:element name="unaryOp" type="unaryOpType"/> <xs:element name="comment" type="commentType"/> </xs:sequence> </xs:complexType>
Array
Array
<xs:complexType name="arrayType"> <xs:sequence> <xs:element name="dataType" type="dataType"/> </xs:sequence> <xs:attribute name="size" type="xs:int"/> </xs:complexType>
Tag
Tag
<xs:complexType name="tagType">
<xs:sequence>
<xs:element name="tagValue" type="xs:string"/>
</xs:sequence>
<xs:attribute name="tagType" type="xs:string"/>
</xs:complexType>
<xs:complexType name="tagList">
<xs:sequence>
<xs:element name="tag" type="xs:string"/>
</xs:sequence>
</xs:complexType>
Comment
Allows comments to be inserted anywhere in program
<xs:complexType name="commentType" mixed="true">
<xs:sequence minOccurs="0" maxOccurs="unbounded">
<xs:any processContents="lax"/>
</xs:sequence>
<xs:anyAttribute namespace="##other" processContents="lax"/>
</xs:complexType>