Scripting for XML
A combination interpreter/editor that provides a programming environment especially appealing to new and occasional programmers.
Date Posted: November 10, 2003
|
|
 |
 |
|
 |  We need another programming language because it helps us get incrementally closer to an ideal programming language. People have been asking this question for years... They were asking it before Java. They were asking it before C++. They were asking it before C. Innovation is cumulative. Without the intermediate steps, progress would stand still.
| | |
 |  Scripting for XML is not really intended for professional programmers, who have more powerful tools (such as Java, and integrated development environments such as Eclipse) at their disposal. However, the very power and complexity of these modern development tools is daunting to new or occasional programmers. Scripting for XML is intended to provide an alternative that trades power for simplicity.
| | |
 |  Scripting for XML is intended to add dynamic programmed behavior to applications and XML data streams.
| | |
 |  Scripting for XML can be embedded into applications to make them configurable by the end user. The Scripting for XML editor is one example of an interface for developing XML scripts, but it is not intended to be the only one. Scripting for XML makes an ideal intermediate language for advanced user interfaces that externalize language features in application-specific ways.
| | |
 |  Scripting for XML programs can be embedded in XML data streams to add dynamic behavior to the static world of XML data. One example of this is with Web Services, where it is often advantageous, from a performance standpoint, to batch up several requests into a single XML document. Without a method for adding dynamic behavior to the document, the processing done by the Web Service is limited, but with the dynamic programmed behavior provided by Scripting for XML, it is possible for the XML document to decide how to control the operation once it is being processed by the Web Service (for example, retrieve this document; if it contains this data, retrieve that document).
| | |
 |  Scripting for XML is an extensible, object-oriented, XML-based scripting language, with a natural tag set, a simple syntax, and a compact footprint.
| | |
 |  Scripting for XML Editor uses a container metaphor to highlight the relationship between program elements. This models the way we think of programs, that is, classes contain methods, methods contain statements, and statements, like a for loop, contain other statements. The container look is enhanced through 3D shading. Borders are shaded in 3D, and the deeper a container is, the darker it appears. Containers are marked with color-coded icons to make it easy to pick out groups of functions. And the container metaphor eliminates many of the syntactic aspects of programming (that is, no curly brackets, parenthesis, etc., to worry about).
| | |
 |  Many XML editors use the familiar tree metaphor to display the hierarchical structure of an XML document. Although this tree metaphor has many benefits, it also has its shortcomings: it tends to create a vertically-oriented visual structure that does not take advantage of the horizontal layout of most common computer displays; it is not well-suited to displaying large or complex data for each node (such as long text strings, field/value pairs, or tables); the deeper a node is in the hierarchy, the harder it is to find and the harder it is to see its relationship to other nodes; and it emphasizes the hierarchical nature of the data as opposed to other relationships that may be present.
| | |
 |  User-defined variable, function, class, and method names are specified using the Name built-in function. The first character of the name should be alphabetic. Any subsequent characters should be alphanumeric.
| | |
 |  The language is case sensitive. The names of built-in functions begin with an uppercase character. To avoid unintentional collisions with these names, all user-defined variables, functions, classes, and methods should begin with a lower-case character.
| | |
 |  Literals, such as numbers (for example, 100) or character strings (for example, Hello world), are specified using the Value built-in function.
| | |
 |  Like many scripting languages, Scripting for XML is very forgiving when it comes to data types and will generally convert internally between types as needed. Variables can contain a reference to any type, and nominally strings, integers, floating point numbers, and boolean values are all supported. Other types are passed transparently between methods as needed.
| | |
 |  The easiest way to insert a new item is to select Insert from the Edit menu (or just press CTRL + i).
| | |
 |  TO DO blocks are there entirely for your convenience and can be deleted when they are not needed. Delete unneeded TO DO blocks by selecting Delete from the Edit menu or by pressing the DELETE key.
| | |
 |  Select the item and edit its properties, either by selecting Properties from the Edit menu or by pressing Alt + Enter. You can then enter a new name and/or change its type (for example, from element to text). Note that if you change an element node to text or comment, it will lose any items that it may contain.
| | |
 |  If the number of contained items is fixed, then the contents are displayed vertically, otherwise the contents are displayed horizontally. The Block and Concatenate functions are examples of functions that may contain an arbitrary number of items, and so the contents are displayed vertically.
| | |
 |  In the current release, if your program does not terminate as expected, close the Scripting for XML editor in order to terminate your program.
| | |
 |  Further information is available in this PDF file.
| |
|
|
 |
|
| |