XML Script

Model can be saved as a XML document. The resulting file uses the extension “.xml”.

Using the XML format is possible to write incomplete script having functors whose input and output ports are not completely bound. This allows saving models in the first development stages.

The XML document is written according to the following DTD 1) A good introduction to the DTD description syntax can be found at http://skew.org/xml/tutorial. :

<?xml version="1.0"?> <!DOCTYPE script [ <!ELEMENT script (property*, functor*, containerfunctor*)> <!ELEMENT functor (property*, inputport*, outputport*)> <!ATTLIST functor name CDATA #REQUIRED> <!ELEMENT containerfunctor (property*, inputport*, outputport*, internalinputport*, internaloutputport*, functor*)> <!ATTLIST containerfunctor name CDATA #REQUIRED> <!ELEMENT property EMPTY> <!ATTLIST property key CDATA #REQUIRED value CDATA #REQUIRED> <!ELEMENT inputport (#PCDATA)> <!ATTLIST inputport name CDATA #REQUIRED peerid IDREFS #IMPLIED> <!ELEMENT outputport EMPTY> <!ATTLIST outputport name CDATA #REQUIRED id ID #REQUIRED> <!ELEMENT internalinputport EMPTY> <!ATTLIST internalinputport name CDATA #REQUIRED peerid IDREFS #IMPLIED> <!ELEMENT internaloutputport EMPTY> <!ATTLIST internaloutputport name CDATA #REQUIRED id ID #REQUIRED> ]>

The resulting document is not formated using tabs, spaces or newlines. Those characters are written only when they are inside the definition content, not in the content boundaries.