Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
xml_script [2026/07/22 20:27]
hermann
xml_script [2026/07/30 19:18] (current)
hermann
Line 44: Line 44:
 </​code>​ </​code>​
  
-==== Elements ====+===== Elements ​=====
  
 Each element in the DTD corresponds directly to a piece of the underlying functor graph described in [[basic_data_flow|Basic Data Flow]]: Each element in the DTD corresponds directly to a piece of the underlying functor graph described in [[basic_data_flow|Basic Data Flow]]:
Line 51: Line 51:
   * ''​functor''​ is a single functor call, identified by its ''​name''​ attribute (such as ''​LoadMap''​). It holds its own properties, its input ports, and its output ports.   * ''​functor''​ is a single functor call, identified by its ''​name''​ attribute (such as ''​LoadMap''​). It holds its own properties, its input ports, and its output ports.
   * ''​containerfunctor''​ is a functor that also holds nested functors and containers — the same element type can nest inside itself, since containers can be placed inside other containers.   * ''​containerfunctor''​ is a functor that also holds nested functors and containers — the same element type can nest inside itself, since containers can be placed inside other containers.
-  * ''​property''​ attaches metadata to whatever element contains it, as a ''​key''/''​value''​ pair. Keys are always written fully expanded — there is no property alias as in the [[ego_script|EGO Script]] format. +  * ''​property''​ attaches metadata to whatever element contains it, as a ''​key''/''​value''​ pair. Keys are always written fully expanded — there is no property alias as in the [[ego_script|EGO Script]] format. See [[ego_script#​properties|Properties]] for the catalog of recognized keys — what each one means, and which functors or model-level context they apply to
-  * ''​inputport''​ and ''​outputport''​ are a functor'​s connection points. An ''​outputport''​ declares an ''​id'';​ an ''​inputport''​ elsewhere in the document references that ''​id''​ through its own ''​peerid''​ attribute to form a connection — the XML equivalent of two functors sharing a variable name in EGO Script.+  * ''​inputport''​ and ''​outputport''​ are a functor'​s connection points. An ''​outputport''​ declares an ''​id'';​ an ''​inputport''​ elsewhere in the document references that ''​id''​ through its own ''​peerid''​ attribute to form a connection — the XML equivalent of two functors sharing a variable name in EGO Script. Forming a connection this way is exactly where automatic type conversion applies — see [[type_system|Type System]] for the full set of types and how they convert into one another. An ''​inputport''​ element can be omitted entirely as long as the port it represents is optional, the same as omitting an optional port in EGO Script'​s [[ego_script#​nominal_syntax|nominal syntax]]; the port then takes its default value. A required port's ''​inputport''​ element can't be omitted this way.
   * ''​internalinputport''​ and ''​internaloutputport''​ work the same way, but connect a container to the functors nested inside it, rather than connecting two ordinary functors to each other.   * ''​internalinputport''​ and ''​internaloutputport''​ work the same way, but connect a container to the functors nested inside it, rather than connecting two ordinary functors to each other.
  
 The DTD defines no equivalent of EGO Script'​s abbreviated calculator syntax. Every functor in the Calculate family — ''​CalculateMap'',​ ''​CalculateLookupTableValues'',​ and the others — is represented the same way as any other container: its operands are connected through explicit ''​NumberMap''/''​NumberTable''/''​NumberValue''​ hook functors, as shown in the ''​CalculateMap''​ example below. See [[ego_script#​calculator_functor_shorthand|Calculator functor shorthand]] for the two syntactic forms EGO Script provides for this same underlying structure. The DTD defines no equivalent of EGO Script'​s abbreviated calculator syntax. Every functor in the Calculate family — ''​CalculateMap'',​ ''​CalculateLookupTableValues'',​ and the others — is represented the same way as any other container: its operands are connected through explicit ''​NumberMap''/''​NumberTable''/''​NumberValue''​ hook functors, as shown in the ''​CalculateMap''​ example below. See [[ego_script#​calculator_functor_shorthand|Calculator functor shorthand]] for the two syntactic forms EGO Script provides for this same underlying structure.
  
-==== Example ====+===== Example ​=====
  
 Below is an example of an EGOML script used to load a map, calculate an image convolution,​ and save the result: Below is an example of an EGOML script used to load a map, calculate an image convolution,​ and save the result: