Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
cduce
cduce
Commits
20fdd76d
Commit
20fdd76d
authored
Jul 10, 2007
by
Pietro Abate
Browse files
[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
Changes
1
Hide whitespace changes
Inline
Side-by-side
web/memento.xml
View file @
20fdd76d
...
...
@@ -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 lit
t
eral
<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>
<
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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment