Sorry for not explaining it better in my first post 
What I intended to do was whit this xquery
update insert attribute id {generate-id(.)}
into input()//p </pre><BR>was to generate a id and update all my documents node p whit a unik id <BR>I was wondering if it was possible to use the generate-id(.) function whit a update.<BR><BR>also I am wondering about this xquery<BR><pre class="ip-ubbcode-code-pre"> declare namespace tf = 'http://namespaces.softwareag.com/tamino/TaminoFunction'
declare namespace ft = 'http://www.w3.org/2002/04/xquery-operators-text'
declare namespace xs = 'http://www.w3.org/2001/XMLSchema'
for $bib in input()/dtbook
let $x:=$bib//p
let $z :=
for $y in $x
where ft:text-contains($y, 'java')
return $y
where $z
return <book>
{
attribute inoId{tf:getInoId($bib)},
attribute docname{tf:getDocname(root($bib))},
attribute matchCount{count($z)},
<title>{
attribute title{$bib/head/title}
}</title>,
<chapter>
{
for $f in $z/parent::level1/h1
let $h :=
for $g in $f/parent::*//p
where ft:text-contains($g, 'java')
return $g
return <heading>
{
attribute matchCountP
{
count($h)
},
attribute ID{$z/parent::*/@id},
$f/text()
}
</heading>
sort by( xs:int(@matchCountP) descending)
}</chapter>
}</book>
sort by( xs:int(@matchCount) descending)
I here get returned for $z/parent::level1/h1 node but I would also like to do it to for $z/parent::level2/h2 nodes at the same time how would I do that as I cant use the name()=h1 in xquery what would I use insted of name()=h1???
Hope this was easyer to understand and thank for your answare.
#Tamino#API-Management#webMethods