![]() |
![]() |
||
|
|||
Changing from 1.0 to 1.1 |
With the release of the new 1.1 version of X-Tract various changes have been made to the syntax and operation of XML Script. This means that scripts using the 1.0 syntax will not run using the version 1.1 X-Tract program. The following is a list of changes made which would cause a 1.0 script to no longer be valid in the 1.1 version of X-Tract. |
||
__XMLscript |
A new attribute in the XST element which is used to tell X-Tract the version of XML Script which has been used to write the script. A warning is displayed if the script version does not match the X-Tract version but an attempt will still be made to run the script. Once a version 1.0 script has been converted to version 1.1, 1.1 should be inserted as the content of this attribute. |
||
Interpolation |
A number of changes have been made which will affect the running of a 1.0 script, which uses interpolations, under version 1.1.
|
||
Indexing |
The pipe character used for indexing the last element in a series of elements has been replaced by the dollar character in the same position to perform the function.
|
||
_eval |
When reading files _eval now looks for and runs the XST top-level element. If an XST isn't found, X-Tract will issue a warning but still process the _eval. |
||
Escaping hashes |
Previously in freeform text, \#\# was a literal \# character and in interpolation strings \\# was a literal \# character. \\# is now always a literal \# character. The \#\# is now interpreted as an empty interpolation. |
||
Attribute inheritance |
Previously attributes were inherited. This has now been changed and XML Script assumes that you do not want attributes to be inherited. The interpolation \# item.id \# will only return content if the item element actually has an id attribute as '.' only accesses attributes in a non-inherited fashion. If we wish to access an inherited attribute, we can use the bang character in an interpolation. For example, \# item!id \# will return the id attribute of item if it has one, and if not it will query the parents of item until finding an id attribute or running out of parent elements. If it does not find id then it will act as if \#item.id \# had been used and not \# item!id \# . |
||
Global variables |
If you have been using either $\. or $. to store global variables they should be changed to \.These changes are as a result of the change in attribute inheritance above. |
||
Methods |
Previously if a template was nested within a template it would not have been able to find a method from the parent template. Methods are now inherited so the nested template will now be able to refer to method tables in an inherited fashion. |
||
_data |
The _data command implementation has been improved. Although there are no changes this does mean that its operation will be more consistent. |
||
Syntax alterations |
In order to improve consistency and clarity some command names, and attribute names have been changed. Attributes previously called object have been renamed to identify more specifically the type of parameter involved.
|
||
Commands |
For those which have been altered the old name and the 1.1 equivalent are listed below:
|
||
Meta-attributes |
|
||
Support |
If you have any questions about upgrading your scripts or have any problems please feel free to email our support team at support@xmlscript.org |
||
Contents... | |||
XML Script homepage | Documentation home | XML Script docs | Command list | Function list | X-Tract docs X-Stream, X-Tract and XML Script are trade marks of DecisionSoft Limited© Copyright 1998-2000 DecisionSoft Limited |