|
View:
New views
3 Messages
—
Rating Filter:
Alert me
|
|
|
Help with searchHello,
I need some help because I do absolutely not know how do solve my problem: I have a searchPage that calls a search.xq which should dynamically search for different entries. It looks like this:(orbeon..) ![]() The XML-output that is done looks like this: ![]() But I don“t know how to concat/combine everything into one search.xq. Right now my search.xq looks like this: xquery version "1.0"; (:declare option exist:serialize "method=html media-type=text/html indent=yes"; :) let $sD := request:get-data() let $coll1 := xmldb:xcollection('/db/dictionary/data')//root/entry return <result> { for $row in $sD/search/select let $name := string($row/name) let $value := string($row/value) let $interpretAs := string($row/interpretAs) let $operator := string($row/operator) for $search at $count in for $result in $coll1 where $result[child::*[./fn:name() = $name] = $value] return $result return $search } </result> And there is the problem that an user can add lots of new search- constraint.. THX ------------------------------------------------------------------------- Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW! Studies have shown that voting for your favorite open source project, along with a healthy diet, reduces your potential for chronic lameness and boredom. Vote Now at http://www.sourceforge.net/community/cca08 _______________________________________________ Exist-open mailing list Exist-open@... https://lists.sourceforge.net/lists/listinfo/exist-open |
|
|
Re: Help with search> I have a searchPage that calls a search.xq which should dynamically search
> for different entries. For more complex dynamic queries, it is often easier to construct the query as a string in your XQuery, then pass it to util:eval() for execution, e.g. let $query := local:build-query($term1, $value1), $hits := util:eval($query) return ... Some of the examples that ship with eXist use this approach. Wolfgang ------------------------------------------------------------------------- Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW! Studies have shown that voting for your favorite open source project, along with a healthy diet, reduces your potential for chronic lameness and boredom. Vote Now at http://www.sourceforge.net/community/cca08 _______________________________________________ Exist-open mailing list Exist-open@... https://lists.sourceforge.net/lists/listinfo/exist-open |
|
|
|
| Free Forum Powered by Nabble | Forum Help |