1つのタイトル要素ではなく複数のタイトル要素にデータを返すにはどうすればよいですか?データを複数の要素で返すにはどうすればよいですか?
戻り値この
<title>
Title 1
Title 2
Title 3
</title>
は$データの内容を見ずに答えることは難しい。この
<title>Title 1</title>
<title>Title 2</title>
<title>Title 3</title>
コード
(: This gets coordinates from $latLon :)
let $result := for $coordinates in $latLon/location
let $lat := $coordinates/lat/text()
let $lon := $coordinates/lon/text()
(: This uses the coordinates to retrieve a title :)
let $data := titleDoc:getTitle($lat, $lon)
let $title := $data//div[@class="title"]/text()
return
<title>{$title}</title>