List of articles   Terminology   Choose language


Output of tree


Output of tree is executed by sign after it.

We shall suppose, that words "record" (of DBMS) and "tag" (of XML) are synonyms, and that words "field" and "attribute" are synonyms too. For example, expressions "enclosed record" and "enclosed table" are absolutely lawfully.

Hiding of records and fields

It's necessary to put sign "#" before names of some tables and fields to prevent output of them.

a[data10.1].#b.c[#data] ;
<a   id=1   data=10.1>
  <c id=100 />
  <c id=101 />
  <c id=200 />
  <c id=201 />
  <c id=200 />
</a>
It's necessary to put sign "#" before field's brackets and to mention printable fields to prevent output of all fields except several necessary fields (fields go to output in order of listing).
a[data10.1].#b.c#[id] ;
<a   id=1   data=10.1>
  <c id=100 />
  <c id=101 />
  <c id=200 />
  <c id=201 />
  <c id=200 />
</a>

Sorting of records

If section is list, then it's possible to sort output of its elements (records) by increasing or decreasing of values of some fields. For this purpose, it's necessary to put integer and mark "" before names of these fields (we shall name this number as factor. Factor may not be equal to zero). Fields will be used for sorting in sequence, in which modules of their factors grow. Positive factor means sorting by increasing, negative factor - by decreasing. Thus TML-expression

m[30m1  10m2  -20m3]
is equivalent to DML-expression
order by m2 asc, m3 desc, m1 asc
Output is transformed so:
a.b.c ;
<a     id=1   data=12.3>
  <b   id=10  data=23.4>
    <c id=100 data=56.7/>
    <c id=101 data=67.8/>
  </b>
  <b   id=20  data=34.5>
    <c id=200 data=78.9/>
    <c id=201 data=89.1/>
  </b>
  <b   id=30  data=45.6>
    <c id=200 data=91.2/>
  </b>
</a>
a.b[-1data].c[-1data] ;
<a     id=1   data=12.3>
  <b   id=30  data=45.6>
    <c id=200 data=91.2/>
  </b>
  <b   id=20  data=34.5>
    <c id=201 data=89.1/>
    <c id=200 data=78.9/>
  </b>
  <b   id=10  data=23.4>
    <c id=101 data=67.8/>
    <c id=100 data=56.7/>
  </b>
</a>

Extraction of next portion of sorted data

It's possible to request no all unsorted records, but only records, beginning from some certain record, about which we know values of all its fields. For this purpose, it's necessary to put mark "" before names of all fields, and sign "=" and value of field after names. Thus TML-expression

m[m1=100 m2=null m3='string']
is equivalent to
DML-expression
start by m1=100 m2=null m3='string'

It's possible to request no all sorted records, but only records, beginning from some certain record - it's necessary to apply simultaneously sorting and starting for this. Thus TML-expression

m[30m1=100 10m2=null -20m3='string']
is equivalent to DML-expression
order by m2 asc, m3 desc, m1 asc
start by m1=100 m2=null m3='string'

Output of picture

Picture can be value of database field, but its URL is sent as value of field instead of it at TML-request for separate HTTP-request of browser. In HTML4 browser can use this attribute (field) only if its name is "src" and it is in tag (table) "IMG". In HTML5 browser can use it in attribute "src" of any tag, it last has property "display: img".

x ;
<x id="10"
   data1="Larry"
   data2="http://distination.org/?file_id=6382503452">

Output of arbitrary text

It's possible to send any text

'<?xml-stylesheet type="text/xsl" href="a.xsl"?>' ;
<?xml-stylesheet type="text/xsl" href="a.xsl"?>
'text' ;
text
'<anytag>' ;
<anytag>
'</anytag>' ;
</anytag>
and data of database: if expression, making output, changes values of fields, then these new values are not written into a database, but exist only in senting data; refering fields, used in request, are not go into xml-text.
a[data10.1].b.c ;
<a     id=1   data=10.1>
  <b   id=10  data=23.4>
    <c id=100 data=56.7/>
    <c id=101 data=67.8/>
  </b>
  <b   id=20  data=34.5>
    <c id=200 data=78.9/>
    <c id=201 data=89.1/>
  </b>
  <b   id=30  data=45.6>
    <c id=200 data=91.2/>
  </b>
</a>

Changing address of receiver

Data is send to destination, which is specified in fields ral and ru of table sys at moment of sending. These values point to user agent (program-terminal, browser, etc), sent request, at start of trigger of root table (this is 'formdata, tabledata, treedata, html' most often), but it's possible to change them in any moment (thus database itself can make request into other databases to create answer for browser).

If you want to duplicate a tree in a database, then send it to youself - ran=0 for that.



Dmitry Turin



List of articles   Terminology   Choose language