Problems encountered in XQuery, Need help!!

  1. Where can i insert user defined function in this document?
  2. How do i insert the faculty value into a tag?

{
for $f in doc(“researchnet.xml”)/university,
$s in $f/staff/row

order by $s/name
return

<Senior-staff-="{$s/faculty/text()}"> (:error, how do i insert the faculty value into a tag?:)

{
if (contains($s/position, “Professor”))
then {count($s/position)=1}
else {count($s/position)=0}
}

{$s/name}{$s/position}


}

researchnet.xml (4.07 KB)

Hi

as this is obviously not Tamino’s XQuery implementation, you might not find an answer here

Regards

Harald