I am new to schemas. Could anyone please suggest how I can create a schema element for capturing this requirement. Basically I want to have an xml tag such that it executes a Linux command say, <task name ="A" command="ls" /> I want that without specifying the Result attribute in this tag, I should be able to capture the result (success or failure) of the command in a global 'result' variable. Is there a way I can declare the 'Result' in my xsd(sxhema)? When I will write the engine for this xml-xsd in java, at that time, the behaviour of the 'Result' is that the result of the last executed task element will be stored in it, without even the schema-instance being aware of it