Commit 20fdd76d authored by Pietro Abate's avatar Pietro Abate

[r2004-07-07 01:24:40 by beppe] added select and projections

Original author: beppe
Date: 2004-07-07 01:24:40+00:00
parent 45b1bfad
......@@ -114,6 +114,11 @@ _" character, starting by a capitalized letter or underscore.</li>
<li>Transform: <code>transform e with p1 -> e1 | ... | pn -> en</code>.
Unmatched elements are discarded; each branch returns a sequence
and all the resulting sequences are concatenated together. </li>
<li>Selection: : <code>select %%e%% from %%p1%% in %%e1%% ... %%pn%%
in %%en%% where %%e'%%</code>. SQL-like selection with the possibility
of using CDuce patterns instead of variables. <code>%%e1%% ...
%%en%%</code> must be sequences and <code>%%e'%%</code> a boolean
expression.</li>
<li>Operators: concatenation <code>e1 @ e2 = [ !e1 !e2 ]</code>,
flattening <code>flatten e = transform e with x -> x</code>.
</li>
......@@ -122,7 +127,7 @@ _" character, starting by a capitalized letter or underscore.</li>
<box title="Record" link="record">
<ul>
<li>Records litteral <code>{ l1 = e1; ...; ln = en }</code></li>
<li>Records literal <code>{ l1 = e1; ...; ln = en }</code></li>
<li>Types: <code>{| l1 = t1; ...; ln = tn |}</code> (closed, no more
fields allowed), <code>>{ l1 = t1; ...; ln = tn }</code> (open,
any other field allowed). Optional fields: <code>li =? ti</code>
......@@ -156,6 +161,9 @@ field <code>l</code> is not present)</li>
(semicolon can also be omitted in this case).
E.g: <code>&lt;a href="abc">[ 'abc' ]</code>.</li>
<li>Types and patterns: same notations.</li>
<li>XPath like projection: <code>%%e%%/%%t%%</code>. For every
XML tree in <code>%%e%%</code> it returns the sequence of children
of type <code>%%t%%</code></li>
<li>Tree transformation: <code>xtransform e with p1 -> e1 | ... | pn -> en</code>.
Applies to sequences of XML trees. Unmatched elements are left unchanged and the
transformation is recursively applied to the sequence of children of the unmatched
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment