From: Wolfgang M. <wol...@ex...> - 2012-10-23 17:01:59
|
> Ok. I was just not expecting this, as it works perfectly on any other > element than an ft:query result, but I guess that's an extension then? No, the ft:query should not matter because you return the attribute in the return clause of your for loop. It would also be ok to pass the attributes around, but once you are trying to serialize them and send them over the line, you'll get an error. This is because an attribute cannot be represented on its own in XML. It always needs an element. for $x in ft:query(collection("/db/data/permanent/d")//section, "help") return $x/@id Hint: using ft:query as above is not very efficient. For best performance, use it in a predicate: for $x in collection("/db/data/permanent/d")//section[ft:query(., "help")] Wolfgang |