thus duplicates are not eliminated. To discard them, one has to use the <code>distinct_values</code> operator.
</p>
<p>
<b> A pure pattern example </b></p>
<p>
This example computes the same result as the previous query. It is written in a pure pattern form (i.e., without any XPath-like projections)
This example computes the same result as the previous query except that duplicates are eliminated. It is written in a pure pattern form (i.e., without any XPath-like projections)
</p>
<sample><![CDATA[
let sel = select t
from <_>[(x::<paper>_ | _ )*] in [bib],
(<_>[(a::<author>_ | _)*] &<_>[(t::<title>_ | _)*]) in x,
(<author>"Alain Frisch" | <author>"Veronique Benzaken") in a
<_>[ _* (<author>"Alain Frisch" | <author>"Veronique Benzaken") _* (t&<title>_ ); _] in x
]]>
</sample>
...
...
@@ -265,12 +263,9 @@ from <_>[(x::<paper>_ | _ )*] in [bib],
Result:
</p>
<sample><![CDATA[
val sel : [ [ <title>[ Char* ] ]* ] = [ [ <title>[ 'Semantic subtyping' ] ]
[ <title>[ 'Semantic subtyping' ] ]
[ <title>[ 'The Relevance of Semantic Subtyping' ] ]
[ <title>[ 'CDuce: a white-paper' ] ]
[ <title>[ 'CDuce: a white-paper' ] ]
val sel : [ <title>[ Char* ]* ] = [ <title>[ 'Semantic subtyping' ]