Editix を使用していくつかの XML クエリを実行しており、タグから "role" 属性を取得しようとしています...
<actor id="5" role="Richie Cusack"/>
....そして、私が生成したタグの間に値を挿入します....
<role>Richie Cusack</role>
...しかし、私が実行しているクエリは、ロール属性値を、それを囲むタグの属性に挿入し直しています...
<role role="Richie Cusack"/>
これが私のXQueryクエリです....
<results>
{
let $ms := doc("xmlPath.xml"),
for $m in $ms//movie
for $r in $m/actor/@role
return <result>
{$m/title}<role>{$r}</role>
</result>
}
</results>
...これが XML ファイルの構造です...
<movies>
<movie>
<title>A History of Violence</title>
<year>2005</year>
<country>USA</country>
<genre>Crime</genre>
<summary>Tom Stall, a humble family man and owner of a
.</summary>
<director id="1"/>
<actor id="5" role="Richie Cusack"/>
</movie>
<movie>
<title>Heat</title>
<year>1995</year>
<country>USA</country>
<genre>Crime</genre>
<summary>Hunters and their prey--Neil and his professional
.... </summary>
<director id="6"/>
<actor id="7" role="Lt. Vincent Hanna"/>
</movies>
属性の値のみを抽出し、それ自体を属性の形式で挿入せずにタグの間に埋め込むにはどうすればよいですか?