thus duplicates are not eliminated. To discard them, one has to use the <code>distinct_values</code> operator.
thus duplicates are not eliminated. To discard them, one has to use the <code>distinct_values</code> operator.
</p>
</p>
<p>
<p>
<b> A pure pattern example </b></p>
<b> A pure pattern example </b></p>
<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>
</p>
<sample><![CDATA[
<sample><![CDATA[
let sel = select t
let sel = select t
from <_>[(x::<paper>_ | _ )*] in [bib],
from <_>[(x::<paper>_ | _ )*] in [bib],
(<_>[(a::<author>_ | _)*] &<_>[(t::<title>_ | _)*]) in x,
<_>[ _* (<author>"Alain Frisch" | <author>"Veronique Benzaken") _* (t&<title>_ ); _] in x
(<author>"Alain Frisch" | <author>"Veronique Benzaken") in a
]]>
]]>
</sample>
</sample>
...
@@ -265,12 +263,9 @@ from <_>[(x::<paper>_ | _ )*] in [bib],
...
@@ -265,12 +263,9 @@ from <_>[(x::<paper>_ | _ )*] in [bib],
Result:
Result:
</p>
</p>
<sample><![CDATA[
<sample><![CDATA[
val sel : [ <title>[ Char* ]* ] = [ <title>[ 'Semantic subtyping' ]
val sel : [ [ <title>[ Char* ] ]* ] = [ [ <title>[ 'Semantic subtyping' ] ]
<title>[ 'The Relevance of Semantic Subtyping' ]
[ <title>[ 'Semantic subtyping' ] ]
<title>[ 'CDuce: a white-paper' ]
[ <title>[ 'The Relevance of Semantic Subtyping' ] ]