====== Hekate Markup Language - Mark 1 (2008) ====== **Note:** //this version is NOT supported by the [[HaDEs]] toolset!// The is the first release of Hekate Markup Language known as HML1. The Hekate Markup Language (HML) is based on the [[hekatedev:attributive language]], [[hekatedev:xtt development]] and [[hekatedev:ard development]] concepts. There are the folowing subsets of the Hekate Markup Language defined: * ''attml'' -- Attribute Markup Language * ''ardml'' -- Attribute Relationship Markup Language * ''xttml'' -- Rule Markup Language (not ready for deployment yet). The languages can be used according to the following scenarios: - ''attml'' -- just attributes, nothing more - ''attml'' + ''ardml'' -- attributes and dependencies - ''attml'' + ''ardml'' + ''xttml'' -- attributes, dependencies and rulesin XML :!: - ''attml'' + ''xttml'' -- attribute and rules, ARD process is skipped The big picture of a single HML application is as follows: ... ... ... ... ... ... TBD ===== DTD ===== Hekate markup language DTD: {{hml1.dtd}}. For sytax test purposes there is example XML file: {{hml1-test.xml}} (its semantics does not make any sense though, for syntax testing only). Important elements are indexed wit an attribute ''id''. ''id'' value has to be unique (enforced by DTD) and should start with (depending on particular element): * types: ''id="tpe_..."'' * attributes: ''id="att_..."'' * properties: ''id="prp_..."'' * groups: ''id="grp_..."'' * dependencies: ''id="tra_..."'' * transformations: ''id="dep_..."'' An additional attribute (''id'') is introduced to guarantee that types, attributes, properties and groups can be uniquely referenced. It can be forced, using DTD, that an attribute has a unique value within an XML document, it becomes a unique identifier. Similarly, it can be forced that an attribute references an element by its unique identifier. Making attribute names unique identifiers prevents naming a group, or type, with the same name as the attribute, since unique identifiers are unique within entire document regardless of the element they regard to. You can validate any HML file using a validator i.e. xmlstarlet: xmlstarlet val -d hml1.dtd hml1-test.xml ===== ATTML ===== For information on attributes [[hekate:xtt#attributive_language|see here]], as well as the [[hekate:bib:hekate_bibliography|gjn2008ruleapps]] FIXME. represents a temperature 7 26 27 input temperature from sensor number 1 input temperature from sensor number 1, aux reading, including historic data temperatures from sensors A group can always store multiple tuples (formed from the attributes within the group); it's non-atomic. Atomic groups do not make any sense. In the example above there is an ordered set of tuples which are formed out of values of temp and corresponding temp-aux. The group concept is similar to the relation concept in the relational Model. Attributes in a group are //ordered//. --- //[[wojnicki@agh.edu.pl|Igor Wojnicki]] 2008/02/14 21:51// ''att'' tag, ''class'' attribute values: //ro,rw,wo,state//, legacy values //input,output,middle// **question**: where to put #digitis, #decimal point digits for numeric values?\\ **answer**: length=#of digits, scale=#of digits after the decimal point ===== ARDML ===== For ARD see [[hekate:ardplus]] FIXME and [[hekate:bib:hekate_bibliography#gjn2008flairs-ardformal]] [[hekate:bib:hekate_bibliography#gjn2008flairs-ardprolog]] ... ... ... ... ... ==== Defining Properties ==== Basic syntax: ... ... ... * Properties are defined in ''...'' section. This section must contain all properties which are being used in an ARD diagram. * Single property is defined by '''' tag * Single property contains any number of attributes. A list of attributes is defined by '''' ==== Defining TPH Diagram ==== Basic syntax: ... * TPH diagram is definied in ''...'' section. TPH diagram contains relationships called transformations. * A transformation is defined with the '''' tag and it describes a transformation between a source (''src'') and destination (''dst'') properties. ==== Defining Dependencies ==== **Basic syntax:** ... ... * Dependencies begin with the '''' tag. The tag does not have attributes. Each dependence is defined with a a pair of properties: an ''independent'' and a ''dependent'' one. ===== XTTML ===== For information on the XTT itself [[hekate:xtt|see here]], for the XTTML [[hekate:xtt#rule_syntax|the rule syntax part]] is especially important. The following is just a proposal, subject to verification/discussion etc. There is no visual data regarding spatial distribution of XTT tables in XTTML. 8 1 5 An XTT diagram (''xtt'' element) consists of some number of XTT tables (''xtt_table'' element). The above example can be read as: xtt_1: rule_1: if att_0 in <1,5>u{8} then att_1 = att_0 + 1 and att_1 = 5 + sin(att_0) ==== Schema ==== Element ''schema'' describes dependent and independent attributes that are allowed to be used in a particular XTT table. There are dependent (''dependent'') and independent (''independent'') attributes. The schema is generated by the ARD->XTT transition algorithm directly from ARD. ==== Rule ==== A rule (''rule'') consists of a condition (''condition'') part and a decision part (''decision''). The condition part uses logical operators (''logop'') which evaluate as true or false. The decision part applies a modification operator (''modpop'') in order to change the attribute value. The value can be given explicitly (as numeric, or symbol) or it can calculated as a result of an evaluative operator ''evalop''. Each rule can explicitly select the next table to be investigated if fired. ===== Implementation ===== * [[hekatedev:Hekate Markup Language Prolog]] -- implementation of a parser for HML (for developers only for now...). * [[hekatedev:hekate markup transformations|XSLT transformations]]