Browse Prior Art Database

A mechanism for using XML and an XML DTD for implementing and enforcing tool behaviour for complex programming models

IP.com Disclosure Number: IPCOM000014817D
Original Publication Date: 2000-Jun-01
Included in the Prior Art Database: 2003-Jun-20
Document File: 4 page(s) / 71K

Publishing Venue

IBM

Abstract

As programming models for modern runtime environments become more complex it is becoming more and more difficult to tool them. Often these programming models do not dictate a sequential set of tasks to produce a complex application but rather have a set of initial tasks and a set of tasks that can be performed in parallel. The complex state machine that must be encoded in the tools to ensure that tasks can be done in different orders and also in parallel can be difficult and errorprone for tool programmers. The programmers must keep the state machine in their heads as they write the code to allow the tool user to perform such common actions as cut/copy/paste and creation and deletion of entities in their application. In addition to making it easier for the tools programmer, the DTD also enforces that the task flow for the tools user will be more understandable since every action taken in the tool will put the tool model inexactly one state by the nature of the DTD being LR(1). The final benefit is that as the actions are performed the metadata of the model is kept in the XML DOM (Document Object Model). Since every action must be keep the XML in a valid state as defined bythe DTD, the DOM can always be easily saved in a valid state and can be easily restored so the tools user can continue where they left off. This invention describes a way to use a formal definition in the form of an XML DTD to define the programming model for complex applications. This formal definition provides the mechanism to ensure that common tool actions are implemented correctly and maintain a current application according to the programming model. These actions can be implemented generically and then the DTD is used to decide whether they are enabled or not for the given context. As the actions are performed the DOM is maintained in a valid state as defined by the DTD. Each action in turn looks at the state of the DOM, the action that is to be performed on that element of the DOM and determines based on the DTD whether the action is valid or not. The composition actions covered here are: cut, copy, paste and create a child. Cut

This text was extracted from a PDF file.
At least one non-text object (such as an image or picture) has been suppressed.
This is the abbreviated version, containing approximately 54% of the total text.

Page 1 of 4

  A mechanism for using XML and an XML DTD for implementing and enforcing tool behaviour for complex programming models

As programming models for modern runtime environments become more complex it is becoming more and more difficult to tool them. Often these programming models do not dictate a sequential set of tasks to produce a complex application but rather have a set of initial tasks and a set of tasks that can be performed in parallel. The complex state machine that must be encoded in the tools to ensure that tasks can be done in different orders and also in parallel can be difficult and errorprone for tool programmers. The programmers must keep the state machine in their heads as they write the code to allow the tool user to perform such common actions as cut/copy/paste and creation and deletion of entities in their application. In addition to making it easier for the tools programmer, the DTD also enforces that the task flow for the tools user will be more understandable since every action taken in the tool will put the tool model inexactly one state by the nature of the DTD being LR(1). The final benefit is that as the actions are performed the metadata of the model is kept in the XML DOM (Document Object Model). Since every action must be keep the XML in a valid state as defined bythe DTD, the DOM can always be easily saved in a valid state and can be easily restored so the tools user can continue where they left off.

     This invention describes a way to use a formal definition in the form of an XML DTD to define the programming model for complex applications. This formal definition provides the mechanism to ensure that common tool actions are implemented correctly and maintain a current application according to the programming model. These actions can be implemented generically and then the DTD is used to decide whether they are enabled or not for the given context.

     As the actions are performed the DOM is maintained in a valid state as defined by the DTD. Each action in turn looks at the state of the DOM, the action that is to be performed on that element of the DOM and determines based on the DTD whether the action is valid or not. The composition actions covered here are: cut, copy, paste and create a child.

Cut

The cut of an application object is enabled by checking to see if deleting the selected node leaves the DOM describing the application in a valid state as defined by the DTD.

Copy and paste

If an application object has been copied then the paste action will only be enabled if it is valid to have that application object as a child of selected application object as defined by the DOM.

create When an application object is to be created, the create action checks the DTD to see which application objects can be created. The code then checks whether the current state of the DOM will allow the creation of those elements. A list of the application objects that can be created is then displayed as a submenu of the C...