Changes

Jump to navigation Jump to search
No change in size ,  13:43, 20 July 2022
m
Text replacement - "db:pre" to "db:get"
<syntaxhighlight lang="xquery">
distinct-values(db:preget('factbook')//religions)
</syntaxhighlight>
doc('factbook.xml')//name[. = 'Germany'],
(: example 3 :)
for $c in db:preget('factbook')//country
where $c//city/name = 'Hanoi'
return $c/name
<syntaxhighlight lang="xquery">
(: example 1 :)
db:preget('Library')//Medium[Year >= '2011' and Year <= '2016'],
(: example 2 :)
let $min := '2014-04-16T00:00:00'
let $max := '2014-04-19T23:59:59'
return db:preget('news')//entry[date-time > $min and date-time < $max]
</syntaxhighlight>
//sea[@depth > '2100' and @depth < '4000']
(: 4th example :)
fn:id('f0_119', db:preget('factbook'))
</syntaxhighlight>
for $n in 1 to 10
let $db := 'persons' || $n
return db:preget($db)//person[name/text() = 'John']
}
</syntaxhighlight>
<syntaxhighlight lang="xquery">
db:preget('factbook')//country
[(# db:enforceindex #) {
@population > '10000000' and
<syntaxhighlight lang="xquery">
for $name in ('Germany', 'Italy')
for $country in db:preget('factbook')//country
where (# db:enforceindex #) { $country/name = $name }
where $country/religions/text() = 'Protestant'
let $index := <index>{
for $nodes in db:preget($db)//text()
group by $text := lower-case($nodes)
return <text string='{ $text }'>{
let $db := 'factbook'
let $text := 'italian'
for $id in db:preget($db || '-index')//*[@string = $text]/idreturn db:preget-id($db, $id)/..
</syntaxhighlight>
Bureaucrats, editor, reviewer, Administrators
13,550

edits

Navigation menu