(: : Copyright (c) 2004 Mark Logic Corporation : : Licensed under the Apache License, Version 2.0 (the "License"); : you may not use this file except in compliance with the License. : You may obtain a copy of the License at : : http://www.apache.org/licenses/LICENSE-2.0 : : Unless required by applicable law or agreed to in writing, software : distributed under the License is distributed on an "AS IS" BASIS, : WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. : See the License for the specific language governing permissions and : limitations under the License. : : The use of the Apache License does not indicate that this project is : affiliated with the Apache Software Foundation. :) xquery version "1.0-ml"; import module namespace xfl = "http://www.marklogic.com/xfaqtor-lib" at "xfaqtor-lib.xqy"; import module namespace xfd = "http://www.marklogic.com/xfaqtor-display" at "xfaqtor-display.xqy"; xdmp:set-response-content-type("text/html"), XFAQtor { let $sel := /@selected let $questid := xdmp:get-request-field("questid") return (: Do some input data checking :) if ($questid = "") then
The 'questid' parameter is missing
{ xfd:print-go-home() }
else if (not($questid castable as xs:integer)) then
The 'questid' parameter must be an integer
{ xfd:print-go-home() }
else let $question := xfl:get-question(xs:integer($questid)) return if (empty($question)) then
Question id '{ $questid }' unknown
{ xfd:print-go-admin() }
else
Edit Question:
Edit Category:
{
}
Or Create a New Category
Edit Stat
{ xfd:print-state-select("state", $question/state) }
}