Bazı verileri xml'den xquery'ye almak istiyorum. Bir hata geldiXQuery Hatası: XPTY0019: '/' ilk işleneninin gerekli öğe türü, node();
declare function local:globals_1(){
let $countries:=("mondial-3.0.xml")//country[@gdp_total > number(100000) and @population_growth > number(0.3)]
let $cities:=("mondial-3.0.xml")//city
for $country in $countries
for $city in $cities
where $country/@id = $city/@country
order by number($city/@population)
return $city
};
<globals>
{local:globals_1()}
</globals>
: Böyle bir XQuery'yi yazmak
<mondial>
<country id="AAA" name="BBB" gdp_total="XXX" population_growth="XXX">
<name>BBB</name>
<city id="CCC" country="AAA">
<name>DDD</name>
<population>XXXX</population>
<located_at type="XX"/>
</city>
...
</country>
...
</mondial>
:
F [Saxon-PE XQuery 9.6.0.7] XPTY0019: Required item type of first operand of '/' is node(); supplied value has item type xs:string
Çalışıyor! Çok teşekkür ederim !!! – Mayoco
@Mayoco'ya hoşgeldiniz! Bunu yapma şansınız olduğunda [kabul et] (http://meta.stackexchange.com/questions/5234/how-does-accepting-an-answer-work) cevabını unutmayın. Teşekkürler – har07