I 've got a xml file with this structure:
<profiles>
<profile profile="SuperAdministrator" name="admin"/>
<profile project="TesteHandSpy" profile="Researcher" name="john"/>
<profile project="DunnProject,DAAR1_op,Sara" profile="Researcher" name="juliete"/>
</profiles>
And I want to select the project value of profile elements with a certain value for attribute name. I started trying to just list all profile elements and I'm having problems with that. I can find the file but then I use the comands I find in several places and it returns zero results. Here's the xquery I'm testing:
let $param := "juliete"
let $profiles:= doc("/db/db_project/profiles.xml")/profiles/profile
for $profile in $profiles
return $profile
Can you help me? I guess when this starts to work all I have to do is add [@name=$param] to the query.