├── .gitignore ├── README.txt ├── dates ├── date-parser-tests.xqy └── date-parser.xqy ├── hashing └── hashing.xqy ├── http ├── cookies.xqy ├── lib-uitools.xqy ├── rapid-app-demo │ ├── Press Release Content 20080327.zip │ ├── README.txt │ ├── docs │ │ ├── Database Configuration Template.xls │ │ ├── Demo Notes.docx │ │ └── Installation Readme.doc │ └── src │ │ ├── appspecific-width.css │ │ ├── css │ │ ├── appspecific-demo.css │ │ ├── appspecific.css │ │ ├── basicui.css │ │ ├── search-ui.css │ │ ├── style.css │ │ └── template.css │ │ ├── default.xqy │ │ ├── example-columns.xqy │ │ ├── example-default.xqy │ │ ├── example-width.xqy │ │ ├── get-expfile.xqy │ │ ├── get-file.xqy │ │ ├── images │ │ ├── pwc │ │ │ ├── alert │ │ │ │ ├── bottom.gif │ │ │ │ ├── bottom_left.gif │ │ │ │ ├── bottom_right.gif │ │ │ │ ├── left.gif │ │ │ │ ├── overlay.png │ │ │ │ ├── progress.gif │ │ │ │ ├── right.gif │ │ │ │ ├── top.gif │ │ │ │ ├── top_left.gif │ │ │ │ └── top_right.gif │ │ │ ├── alphacube │ │ │ │ ├── bottom-left-c.gif │ │ │ │ ├── bottom-middle.gif │ │ │ │ ├── bottom-right-c.gif │ │ │ │ ├── button-close-focus.gif │ │ │ │ ├── button-max-focus.gif │ │ │ │ ├── button-min-focus.gif │ │ │ │ ├── frame-left.gif │ │ │ │ ├── frame-right.gif │ │ │ │ ├── left-top.gif │ │ │ │ ├── right-top.gif │ │ │ │ └── top-middle.gif │ │ │ └── default │ │ │ │ ├── bottom_left.gif │ │ │ │ ├── bottom_mid.gif │ │ │ │ ├── bottom_right.gif │ │ │ │ ├── bottom_right_resize.gif │ │ │ │ ├── center_left.gif │ │ │ │ ├── center_right.gif │ │ │ │ ├── clear.gif │ │ │ │ ├── close.gif │ │ │ │ ├── inspect.gif │ │ │ │ ├── maximize.gif │ │ │ │ ├── minimize.gif │ │ │ │ ├── overlay.png │ │ │ │ ├── resize.gif │ │ │ │ ├── sizer.gif │ │ │ │ ├── top_left.gif │ │ │ │ ├── top_mid.gif │ │ │ │ └── top_right.gif │ │ ├── silk │ │ │ ├── accept.png │ │ │ ├── building.png │ │ │ ├── bullet_black.png │ │ │ ├── bullet_delete.png │ │ │ ├── bullet_go.png │ │ │ ├── coins.png │ │ │ ├── error.png │ │ │ ├── exclamation.png │ │ │ ├── group.png │ │ │ ├── page.png │ │ │ ├── user_suit.png │ │ │ └── world.png │ │ └── spacer.gif │ │ ├── js │ │ ├── appspecific.js │ │ ├── builder.js │ │ ├── controls.js │ │ ├── dragdrop.js │ │ ├── effects.js │ │ ├── prototype.js │ │ ├── scriptaculous.js │ │ ├── slider.js │ │ ├── sound.js │ │ ├── ui.js │ │ ├── unittest.js │ │ └── window.js │ │ ├── modules │ │ ├── display-demo.xqy │ │ ├── display.xqy │ │ ├── lib-parser-custom.xqy │ │ ├── lib-parser.xqy │ │ ├── lib-search-custom.xqy │ │ ├── lib-search.xqy │ │ ├── lib-uitools.xqy │ │ ├── page-layout-demo.xqy │ │ ├── page-layout.xqy │ │ ├── search-ui.xqy │ │ ├── test-lib-parser.xqy │ │ └── widgets.xqy │ │ ├── request.xqy │ │ ├── search-help.xqy │ │ ├── search.xqy │ │ ├── template.html │ │ ├── template.xqy │ │ └── widgets │ │ ├── blockmenu.html │ │ ├── dropnav.html │ │ ├── formattedform.html │ │ ├── mainmenu.html │ │ ├── messages.html │ │ ├── pagination.html │ │ ├── quicksearch.html │ │ └── stackmenu.html ├── search-ui │ ├── example-screenshot.PNG │ ├── examples.txt │ ├── search-ui.css │ └── search-ui.xqy └── statefull-cookies.xqy ├── json └── json.xqy ├── memupdate ├── example_usage.xqy └── in-mem-update.xqy ├── properties └── properties.xqy ├── rdfa ├── LICENSE.txt ├── rdfa.xqy └── rdfa_extract.xqy ├── scaffolding ├── readme.txt └── scaffolding.xqy ├── search └── query-xml │ ├── example-search.xqy │ └── query-xml.xqy └── ziprelease.sh /.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | -------------------------------------------------------------------------------- /README.txt: -------------------------------------------------------------------------------- 1 | commons is a repository of pure MarkLogic XQuery library modules -------------------------------------------------------------------------------- /hashing/hashing.xqy: -------------------------------------------------------------------------------- 1 | xquery version '1.0-ml'; 2 | 3 | module namespace hashing = "/hashing"; 4 | 5 | declare variable $BIT32AND := 4294967295; 6 | 7 | declare variable $binaryToHexMap := map:map(); 8 | declare variable $hexToBinaryMap := map:map(); 9 | 10 | declare variable $initializeMaps := ( 11 | map:put($binaryToHexMap,'0000','0'), 12 | map:put($binaryToHexMap,'0001','1'), 13 | map:put($binaryToHexMap,'0010','2'), 14 | map:put($binaryToHexMap,'0011','3'), 15 | map:put($binaryToHexMap,'0100','4'), 16 | map:put($binaryToHexMap,'0101','5'), 17 | map:put($binaryToHexMap,'0110','6'), 18 | map:put($binaryToHexMap,'0111','7'), 19 | map:put($binaryToHexMap,'1000','8'), 20 | map:put($binaryToHexMap,'1001','9'), 21 | map:put($binaryToHexMap,'1010','a'), 22 | map:put($binaryToHexMap,'1011','b'), 23 | map:put($binaryToHexMap,'1100','c'), 24 | map:put($binaryToHexMap,'1101','d'), 25 | map:put($binaryToHexMap,'1110','e'), 26 | map:put($binaryToHexMap,'1111','f'), 27 | map:put($hexToBinaryMap,'0','0000'), 28 | map:put($hexToBinaryMap,'1','0001'), 29 | map:put($hexToBinaryMap,'2','0010'), 30 | map:put($hexToBinaryMap,'3','0011'), 31 | map:put($hexToBinaryMap,'4','0100'), 32 | map:put($hexToBinaryMap,'5','0101'), 33 | map:put($hexToBinaryMap,'6','0110'), 34 | map:put($hexToBinaryMap,'7','0111'), 35 | map:put($hexToBinaryMap,'8','1000'), 36 | map:put($hexToBinaryMap,'9','1001'), 37 | map:put($hexToBinaryMap,'a','1010'), 38 | map:put($hexToBinaryMap,'b','1011'), 39 | map:put($hexToBinaryMap,'c','1100'), 40 | map:put($hexToBinaryMap,'d','1101'), 41 | map:put($hexToBinaryMap,'e','1110'), 42 | map:put($hexToBinaryMap,'f','1111') 43 | ); 44 | 45 | declare function hashing:sha1($message as xs:string) { 46 | let $hMap := ($initializeMaps,map:map()) 47 | let $h0 := map:put($hMap,'0', 1732584193) (:xdmp:hex-to-integer('67452301'):) 48 | let $h1 := map:put($hMap,'1', 4023233417) (:xdmp:hex-to-integer('EFCDAB89'):) 49 | let $h2 := map:put($hMap,'2', 2562383102) (:xdmp:hex-to-integer('98BADCFE'):) 50 | let $h3 := map:put($hMap,'3', 271733878) (:xdmp:hex-to-integer('10325476'):) 51 | let $h4 := map:put($hMap,'4', 3285377520) (:xdmp:hex-to-integer('C3D2E1F0'):) 52 | 53 | let $messageLength := fn:string-length($message) 54 | let $messageLengthMod4 := $messageLength mod 4 55 | let $i := if ($messageLengthMod4 eq 0) 56 | then ('80000000') 57 | else if ($messageLengthMod4 eq 1) 58 | then (hashing:pad-with-zeros( 59 | xdmp:integer-to-hex(xdmp:or64(xdmp:lshift64(fn:string-to-codepoints($message)[fn:last()], 24), xdmp:hex-to-integer('0800000'))) 60 | , 8)) 61 | else if ($messageLengthMod4 eq 2) 62 | then (let $codepoints := fn:string-to-codepoints($message) 63 | return hashing:pad-with-zeros( 64 | xdmp:integer-to-hex(xdmp:or64(xdmp:or64(xdmp:lshift64($codepoints[fn:last()-1], 24),xdmp:lshift64($codepoints[fn:last()], 16)), xdmp:hex-to-integer('08000'))) 65 | , 8)) 66 | else (let $codepoints := fn:string-to-codepoints($message) 67 | return hashing:pad-with-zeros( 68 | xdmp:integer-to-hex(xdmp:or64(xdmp:or64(xdmp:or64(xdmp:lshift64($codepoints[fn:last()-2], 24),xdmp:lshift64($codepoints[fn:last()-1], 16)), xdmp:lshift64($codepoints[fn:last()], 8)), xdmp:hex-to-integer('080'))) 69 | , 8)) 70 | let $chunks := for $chunk in hashing:chunk-hex(hashing:string-to-hex($message),32) 71 | return hashing:pad-with-zeros($chunk,8) 72 | let $zeros := hashing:build-zeros(fn:count($chunks), ()) 73 | let $chunks := ($chunks, $i, $zeros, hashing:pad-with-zeros(xdmp:integer-to-hex(xdmp:rshift64($messageLength, 29)), 8), hashing:pad-with-zeros(xdmp:integer-to-hex(xdmp:lshift64($messageLength, 3)), 8)) 74 | let $_ := for $blockNumber in (1 to (fn:count($chunks) idiv 16)) 75 | let $wordChunksMap := map:map() 76 | let $blockStart := (($blockNumber -1) * 16) + 1 77 | let $blockEnd := $blockStart + 15 78 | let $_ := for $c at $pos in ($chunks[$blockStart to $blockEnd]) 79 | return map:put($wordChunksMap, xs:string($pos - 1), xdmp:hex-to-integer($c)) 80 | let $_ := for $i in (16 to 79) 81 | let $w1 := map:get($wordChunksMap, xs:string($i - 3)) 82 | let $w2 := map:get($wordChunksMap, xs:string($i - 8)) 83 | let $w3 := map:get($wordChunksMap, xs:string($i - 14)) 84 | let $w4 := map:get($wordChunksMap, xs:string($i - 16)) 85 | let $newValue := hashing:rotate-left32(xdmp:xor64($w4,xdmp:xor64($w3,xdmp:xor64($w2,$w1))), 1) 86 | return map:put($wordChunksMap, xs:string($i), $newValue) 87 | let $chunkMap := map:map() 88 | let $_ := map:put($chunkMap ,'a',map:get($hMap,'0')) 89 | let $_ := map:put($chunkMap ,'b',map:get($hMap,'1')) 90 | let $_ := map:put($chunkMap ,'c',map:get($hMap,'2')) 91 | let $_ := map:put($chunkMap ,'d',map:get($hMap,'3')) 92 | let $_ := map:put($chunkMap ,'e',map:get($hMap,'4')) 93 | let $_ := for $i in 0 to 79 94 | let $a := map:get($chunkMap ,'a') 95 | let $b := map:get($chunkMap ,'b') 96 | let $c := map:get($chunkMap ,'c') 97 | let $d := map:get($chunkMap ,'d') 98 | let $e := map:get($chunkMap ,'e') 99 | let $f := if ($i ge 0 and $i le 19) 100 | then (xdmp:or64(xdmp:and64($b,$c),xdmp:and64(xdmp:not64($b),$d))) 101 | else if ($i ge 40 and $i le 59) 102 | then (xdmp:or64(xdmp:or64(xdmp:and64($b,$c),xdmp:and64($b,$d)),xdmp:and64($c,$d))) 103 | else (xdmp:xor64($d,xdmp:xor64($b,$c))) 104 | let $k := if ($i ge 0 and $i le 19) 105 | then (1518500249) (:xdmp:hex-to-integer('5A827999'):) 106 | else if ($i ge 20 and $i le 39) 107 | then (1859775393)(:xdmp:hex-to-integer('6ED9EBA1'):) 108 | else if ($i ge 40 and $i le 59) 109 | then (2400959708)(:xdmp:hex-to-integer('8F1BBCDC'):) 110 | else (3395469782)(:xdmp:hex-to-integer('CA62C1D6'):) 111 | let $temp := hashing:integer-to-32bit(xdmp:add64(hashing:rotate-left32($a,5),xdmp:add64(hashing:integer-to-32bit($f), xdmp:add64($e,xdmp:add64($k, map:get($wordChunksMap, xs:string($i))))))) 112 | let $_ := map:put($chunkMap ,'e',$d) 113 | let $_ := map:put($chunkMap ,'d',$c) 114 | let $_ := map:put($chunkMap ,'c',hashing:rotate-left32($b, 30)) 115 | let $_ := map:put($chunkMap ,'b',$a) 116 | let $_ := map:put($chunkMap,'a',$temp) 117 | return () 118 | 119 | let $h0 := map:get($hMap ,'0') 120 | let $h1 := map:get($hMap ,'1') 121 | let $h2 := map:get($hMap ,'2') 122 | let $h3 := map:get($hMap ,'3') 123 | let $h4 := map:get($hMap ,'4') 124 | let $a := map:get($chunkMap ,'a') 125 | let $b := map:get($chunkMap ,'b') 126 | let $c := map:get($chunkMap ,'c') 127 | let $d := map:get($chunkMap ,'d') 128 | let $e := map:get($chunkMap ,'e') 129 | let $_ := map:put($hMap,'0',hashing:add32($h0, $a)) 130 | let $_ := map:put($hMap,'1',hashing:add32($h1, $b)) 131 | let $_ := map:put($hMap,'2',hashing:add32($h2, $c)) 132 | let $_ := map:put($hMap,'3',hashing:add32($h3, $d)) 133 | let $_ := map:put($hMap,'4',hashing:add32($h4, $e)) 134 | return () 135 | return fn:string-join(( 136 | hashing:pad-with-zeros(xdmp:integer-to-hex(map:get($hMap,'0')), 8), 137 | hashing:pad-with-zeros(xdmp:integer-to-hex(map:get($hMap,'1')), 8), 138 | hashing:pad-with-zeros(xdmp:integer-to-hex(map:get($hMap,'2')), 8), 139 | hashing:pad-with-zeros(xdmp:integer-to-hex(map:get($hMap,'3')), 8), 140 | hashing:pad-with-zeros(xdmp:integer-to-hex(map:get($hMap,'4')), 8) 141 | ), '') 142 | }; 143 | 144 | declare function hashing:chunk-hex($hex as xs:string, $bitSize as xs:integer) as xs:string* { 145 | let $hexLength := ($bitSize idiv 4) 146 | let $numOfChunks := fn:string-length($hex) idiv $hexLength 147 | for $i in 1 to ($numOfChunks) 148 | return fn:substring($hex, (($i - 1) * $hexLength)+1, $hexLength) 149 | }; 150 | 151 | declare function hashing:chunk-binary($binary as xs:string, $bitSize as xs:integer) as xs:string* { 152 | let $numOfChunks := fn:string-length($binary) idiv $bitSize 153 | for $i in 1 to ($numOfChunks) 154 | return fn:substring($binary, (($i - 1) * $bitSize)+1, $bitSize) 155 | }; 156 | 157 | declare function hashing:rotate-left32($number as xs:unsignedLong, $shift as xs:integer) { 158 | let $binary := hashing:pad-with-zeros(hashing:hex-to-binary(xdmp:integer-to-hex(xdmp:and64($number, $BIT32AND))), 32) 159 | let $rotatedBinary := fn:string-join((fn:substring($binary, $shift + 1),fn:substring($binary, 1, ($shift - 1)),fn:substring($binary, $shift, 1)),'') 160 | return xdmp:hex-to-integer(hashing:binary-to-hex($rotatedBinary)) 161 | }; 162 | 163 | declare function hashing:add32($number1 as xs:unsignedLong,$number2 as xs:unsignedLong) { 164 | xdmp:and64(xdmp:add64($number1, $number2), $BIT32AND) 165 | }; 166 | 167 | declare function hashing:string-to-hex($string as xs:string) { 168 | fn:string-join(( 169 | (for $cp in fn:string-to-codepoints($string) 170 | return hashing:pad-with-zeros(xdmp:integer-to-hex($cp),2)) 171 | ), '') 172 | }; 173 | 174 | declare function hashing:integer-to-32bit($integer as xs:integer) as xs:unsignedLong { 175 | xdmp:and64($integer, $BIT32AND) 176 | }; 177 | 178 | declare function hashing:build-zeros($chunkCount, $zeros) { 179 | if ((($chunkCount + fn:count($zeros)) mod 16) eq 13) 180 | then ($zeros) 181 | else ( 182 | hashing:build-zeros($chunkCount, ($zeros, '00000000')) 183 | ) 184 | }; 185 | 186 | declare function hashing:hex-to-binary($hex as xs:string) as xs:string { 187 | let $codepoints := fn:string-to-codepoints($hex) 188 | return 189 | fn:string-join(( 190 | for $cp in $codepoints 191 | return map:get($hexToBinaryMap, fn:codepoints-to-string($cp)) 192 | ), '') 193 | }; 194 | 195 | declare function hashing:binary-to-hex($binary as xs:string) as xs:string { 196 | fn:string-join(( 197 | for $bin in hashing:chunk-binary($binary, 4) 198 | return map:get($binaryToHexMap, $bin) 199 | ), '') 200 | }; 201 | 202 | declare function hashing:pad-with-zeros($string as xs:string, $length as xs:integer) { 203 | fn:string-join(( 204 | (for $i in 1 to ($length - fn:string-length($string)) 205 | return '0'), 206 | $string), 207 | '') 208 | }; -------------------------------------------------------------------------------- /http/cookies.xqy: -------------------------------------------------------------------------------- 1 | xquery version "0.9-ml" 2 | 3 | (:~ 4 | : Mark Logic CIS Cookie Library 5 | : 6 | : Copyright 2005 Parthenon Computing Ltd. 7 | : 8 | : Licensed under the Apache License, Version 2.0 (the "License"); 9 | : you may not use this file except in compliance with the License. 10 | : You may obtain a copy of the License at 11 | : 12 | : http://www.apache.org/licenses/LICENSE-2.0 13 | : 14 | : Unless required by applicable law or agreed to in writing, software 15 | : distributed under the License is distributed on an "AS IS" BASIS, 16 | : WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 17 | : See the License for the specific language governing permissions and 18 | : limitations under the License. 19 | : 20 | : @author John Snelson (john@parthcomp.com) 21 | : @version 1.0 22 | : 23 | : @see http://www.parthcomp.com 24 | : @see http://wp.netscape.com/newsref/std/cookie_spec.html 25 | : 26 | :) 27 | 28 | module "http://parthcomp.com/cookies" 29 | declare namespace ck="http://parthcomp.com/cookies" 30 | 31 | (:~ 32 | : Adds a cookie header to the response headers. 33 | : 34 | : @param $name the name of the cookie 35 | : 36 | : @param $value the value to store in the cookie 37 | : 38 | : @param $expires an optional date and time for the cookie to expire. 39 | : If this is in the past, the cookie is deleted from the client. If 40 | : an empty sequence is passed as this parameter, then the cookie will 41 | : expire when the user's session ends. 42 | : 43 | : @param $domain the domain name for which this cookie is valid. 44 | : If an empty sequence is passed as this parameter, then the domain name 45 | : or the current server will be used. 46 | : 47 | : @param $path the URLs in the domain for which the cookie is valid. This 48 | : should be a path starting with a "/". If an empty sequence is passed as 49 | : this parameter, then the cookie behaves as if the path was "/". 50 | : 51 | : @param $secure whether this cookie should only be sent over a secure 52 | : connection. 53 | : 54 | : @return () 55 | : 56 | : @error Invalid domain parameter 57 | : @error Invalid path parameter 58 | : 59 | :) 60 | define function add-cookie($name as xs:string, $value as xs:string, $expires as xs:dateTime?, 61 | $domain as xs:string?, $path as xs:string?, $secure as xs:boolean) as empty() 62 | { 63 | if(fn:contains($domain, " ") or fn:contains($domain, ",") or fn:contains($domain, ";")) then ( 64 | fn:error("Invalid domain parameter") 65 | ) else (), 66 | 67 | if(fn:contains($path, " ") or fn:contains($path, ",") or fn:contains($path, ";")) then ( 68 | fn:error("Invalid path parameter") 69 | ) else (), 70 | 71 | let $cookie := fn:concat(xdmp:url-encode($name), "=", xdmp:url-encode($value)) 72 | let $cookie := if(fn:exists($expires)) then fn:concat($cookie, "; expires=", get-cookie-date-string($expires)) else $cookie 73 | let $cookie := if(fn:exists($domain)) then fn:concat($cookie, "; domain=", $domain) else $cookie 74 | let $cookie := if(fn:exists($path)) then fn:concat($cookie, "; path=", $path) else $cookie 75 | let $cookie := if($secure) then fn:concat($cookie, "; secure") else $cookie 76 | return xdmp:add-response-header("Set-Cookie", $cookie) 77 | } 78 | 79 | (:~ 80 | : Adds a cookie header to the response headers, that will delete 81 | : the specified client side cookie. It is important to specify the 82 | : correct domain and path for the cookie, otherwise it won't be 83 | : deleted. 84 | : 85 | : @param $name the name of the cookie 86 | : 87 | : @param $domain the domain name for which this cookie is valid. 88 | : If an empty sequence is passed as this parameter, then the domain name 89 | : or the current server will be used. 90 | : 91 | : @param $path the URLs in the domain for which the cookie is valid. This 92 | : should be a path starting with a "/". If an empty sequence is passed as 93 | : this parameter, then the cookie behaves as if the path was "/". 94 | : 95 | : @return () 96 | : 97 | : @error Invalid domain parameter 98 | : @error Invalid path parameter 99 | : 100 | :) 101 | define function delete-cookie($name as xs:string, $domain as xs:string?, $path as xs:string?) as empty() 102 | { 103 | add-cookie($name, "", xs:dateTime("1979-11-27T06:23:37"), $domain, $path, fn:false()) 104 | } 105 | 106 | (:~ 107 | : Retrieves a named cookie from the request headers. 108 | : 109 | : @param $name the name of the cookie 110 | : 111 | : @return a sequence containing the values for the given cookie name. 112 | : If no cookies of that name were found, the empty sequence is returned. 113 | : 114 | :) 115 | define function get-cookie($name as xs:string) as xs:string* 116 | { 117 | let $urlname := xdmp:url-encode($name) 118 | let $header := xdmp:get-request-header("Cookie") 119 | let $cookies := fn:tokenize($header, "; ?")[fn:starts-with(., fn:concat($urlname,"="))] 120 | for $c in $cookies 121 | return xdmp:url-decode(fn:substring-after($c, "=")) 122 | } 123 | 124 | (:~ 125 | : Retrieves the names of all the cookies available from the request 126 | : headers. 127 | : 128 | : @return a sequence containing the names of the available cookies. 129 | : If no cookies were found, the empty sequence is returned. 130 | : 131 | :) 132 | define function get-cookie-names() as xs:string* 133 | { 134 | fn:distinct-values( 135 | let $header := xdmp:get-request-header("Cookie") 136 | let $cookies := fn:tokenize($header, "; ?") 137 | for $c in $cookies 138 | return xdmp:url-decode(fn:substring-before($c, "=")) 139 | ) 140 | } 141 | 142 | (:~ 143 | : Returns an RFC 822 compliant date string from the given dateTime, 144 | : that is suitable for use in a cookie header. 145 | : 146 | : @param $date the date and time to convert into a string 147 | : 148 | : @return the RFC 822 complient date string. 149 | : 150 | :) 151 | define function get-cookie-date-string($date as xs:dateTime) as xs:string 152 | { 153 | let $gmt := xdt:dayTimeDuration("PT0H") 154 | let $date := fn:adjust-dateTime-to-timezone($date, $gmt) 155 | let $day := two-digits(fn:get-day-from-dateTime($date)) 156 | let $month := fn:get-month-from-dateTime($date) 157 | let $year := fn:string(fn:get-year-from-dateTime($date)) 158 | let $hours := two-digits(fn:get-hours-from-dateTime($date)) 159 | let $minutes := two-digits(fn:get-minutes-from-dateTime($date)) 160 | let $seconds := two-digits(xs:integer(fn:round(fn:get-seconds-from-dateTime($date)))) 161 | let $monthNames := ("Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec") 162 | return fn:concat( 163 | $day, "-", 164 | $monthNames[$month], "-", 165 | $year, " ", 166 | $hours, ":", 167 | $minutes, ":", 168 | $seconds, " GMT" 169 | ) 170 | } 171 | 172 | (:~ 173 | : Internal function to return a string representation 174 | : of an integer that contains two digits. If the number 175 | : has less than two digits it is padded with zeros. If 176 | : it has more than two digits, it is truncated, and the 177 | : least significant digits are returned. 178 | : 179 | : @param $num the number to convert 180 | : 181 | : @return the two digit string 182 | : 183 | :) 184 | define function two-digits($num as xs:integer) as xs:string 185 | { 186 | let $result := fn:string($num) 187 | let $length := fn:string-length($result) 188 | return if($length > 2) then fn:substring($result, $length - 1) 189 | else if($length = 1) then fn:concat("0", $result) 190 | else if($length = 0) then "00" else $result 191 | } 192 | -------------------------------------------------------------------------------- /http/lib-uitools.xqy: -------------------------------------------------------------------------------- 1 | (: 2 | : lib-uitools 3 | : 4 | : Copyright (c)2007 Mark Logic Corporation. All rights reserved. 5 | : 6 | :) 7 | 8 | (:~ 9 | : Mark Logic User Interface utilities. 10 | : Utility functions when using XQuery as your UI layer. 11 | : 12 | : @author Chris Welch 13 | : @version 2008-05-27 14 | : 15 | :) 16 | 17 | module "http://www.marklogic.com/ps/lib/lib-uitools" 18 | 19 | (:-- QUERYSTRING FUNCTIONS --:) 20 | (:-- Use these functions as an easy way to pass around and modify 21 | querystring parameters in your code --:) 22 | 23 | (:~ 24 | : Converts querystring variables of the current request to an XML fragment. 25 | : NOTE: Values from the xdmp:get-request-field-names() are automatically url-decoded. 26 | : NOTE: MarkLogic makes no distinction between POST and GET fields. 27 | : 28 | : @returns A element(params) containing elements representing the request fields. 29 | :) 30 | define function load-params() as element(params) 31 | { 32 | let $params := 33 | 34 | {for $i in xdmp:get-request-field-names() 35 | return 36 | for $j in xdmp:get-request-field($i) 37 | return 38 | if ($i ne "") then 39 | element {fn:lower-case($i)} {$j} 40 | else () 41 | } 42 | 43 | return $params 44 | } 45 | 46 | (:~ 47 | : Useful in faceted searching, this method will take a parameters element 48 | : and process it. It can remove elements, remove elements with specific values or replace 49 | : elements with new values. 50 | : NOTE: A parameter set refers to all parameter elements that share the same name. 51 | : 52 | : @param $params A parameters element. 53 | : @param $set The name of the parameter set to be modified. 54 | : @param $remove-values Values of the specified set to be removed. All values if empty. 55 | : @param $new-values New values of the specified set to be inserted. No values inserted if empty. 56 | : @return A modified parameters element. 57 | :) 58 | define function modify-param-set( 59 | $params as element(), 60 | $set as xs:string, 61 | $remove-values as xs:string*, 62 | $new-values as xs:string* 63 | ) as element() 64 | { 65 | let $newParams := 66 | 67 | {$params/*[fn:local-name(.) != $set or (fn:local-name(.) = $set and fn:count($remove-values) > 0 and fn:not(. = $remove-values))]} 68 | {for $value in $new-values 69 | return 70 | element {$set} {$value}} 71 | 72 | return $newParams 73 | } 74 | 75 | (:~ 76 | : Useful in faceted searching, this method will take a parameters element 77 | : and process it. It can remove elements, remove elements with specific values or replace 78 | : elements with new values. 79 | : 80 | : @param $params A parameters element. 81 | : @param $sets The name of the parameter sets to be removed. No sets will be removed if empty. 82 | : @param $new-params New parameters to be inserted as-is. No parameters will be inserted if empty. 83 | : @param A modified parameters element. 84 | :) 85 | define function modify-param-set( 86 | $params as element(params), 87 | $sets as xs:string*, 88 | $new-params as element()* 89 | ) as element(params) 90 | { 91 | let $newParams := 92 | 93 | {$params/*[fn:not(fn:local-name(.) = $sets)]} 94 | {$new-params} 95 | 96 | return $newParams 97 | } 98 | 99 | (:~ 100 | : Recreate a querystring from the request fields. 101 | : NOTE: MarkLogic makes no distinction between POST and GET fields. 102 | : NOTE: Values from the xdmp:get-request-field-names() are automatically url-decoded. 103 | : 104 | : @return A querystring based on the fields of the current request. 105 | :) 106 | define function rebuild-querystring () as xs:string 107 | { rebuild-querystring(()) } 108 | (:~ 109 | : Recreate a querystring from the request fields. 110 | : NOTE: MarkLogic makes no distinction between POST and GET fields. 111 | : 112 | : @param $omit The fields that should be omitted from the new querystring. No sets will be removed if empty. 113 | : @return A querystring based on the fields of the current request. 114 | :) 115 | define function rebuild-querystring ($omit as xs:string*) as xs:string 116 | { 117 | let $variables := 118 | for $field in xdmp:get-request-field-names() 119 | let $vals := xdmp:get-request-field($field) 120 | return 121 | if (fn:not($field = ("", $omit))) then 122 | for $val in $vals 123 | return fn:concat($field,"=",xdmp:url-encode($val)) 124 | else () 125 | return fn:string-join($variables, "&") 126 | } 127 | 128 | (:~ 129 | : Build a querystring from a parameters element. 130 | : NOTE: MarkLogic makes no distinction between POST and GET fields. 131 | : 132 | : @param $params The parameters element from which to build the querystring. 133 | : @return A querystring based on the passed parameters element. 134 | :) 135 | define function build-querystring($params as element(params)) as xs:string 136 | { build-querystring($params, ()) } 137 | (:~ 138 | : Build a querystring from a parameters element. 139 | : NOTE: MarkLogic makes no distinction between POST and GET fields. 140 | : 141 | : @param $params The parameters element from which to build the querystring. 142 | : @param $omit The parameter sets that should be omitted from teh new querystring. No sets will be removed if empty. 143 | : @return A querystring based on the passed parameters element. 144 | :) 145 | define function build-querystring($params as element(params), $omit as xs:string*) as xs:string 146 | { 147 | let $args := 148 | for $arg in $params/*[if($omit) then fn:not(fn:local-name(.) = $omit) else fn:true()][fn:not(fn:local-name(.) = ("start", "end"))] 149 | return 150 | if ($arg ne "") then 151 | fn:concat(fn:local-name($arg),"=",xdmp:url-encode(fn:string($arg))) 152 | else () 153 | return 154 | fn:string-join(fn:distinct-values($args),"&") 155 | } 156 | 157 | (:~ 158 | : Given a year, month and day token, will generate an xs:date. Includes validation to 159 | : ensure a valid xs:date, or will return nothing. No exceptions will be thrown. Useful for 160 | : search parameters that should be ignored if invalid. 161 | : 162 | : @param $year The year string token. 163 | : @param $month The month string token. 164 | : @param $day The day string token. 165 | : @return An xs:date constructed from the passed string tokens. 166 | :) 167 | define function build-date($year as xs:string?, $month as xs:string?, $day as xs:string?) as xs:date? 168 | { 169 | if (fn:exists($year) and $year != "" and 170 | fn:exists($month) and $month != "" and 171 | fn:exists($day) and $day != "") then 172 | try { 173 | xs:date(fn:concat(xs:string(xs:integer($year)),"-",lead-zero(xs:string(xs:integer($month)),2),"-",lead-zero(xs:string(xs:integer($day)),2))) 174 | } catch ($exception) { 175 | () 176 | } 177 | else () 178 | } 179 | 180 | (:~ 181 | : Returns a sequence of date parameter elements to be passed into a parameters element. 182 | : 183 | : @param $date The date to be converted to parameter elements. 184 | : @param $year-name The name of the year-name element. 185 | : @param $month-name The name of the month-name element. 186 | : @param $day-name The name of the day-name element. 187 | : @return A sequence of three date paramter elements based on the passed date. 188 | :) 189 | define function get-date-params( 190 | $date as xs:date, 191 | $year-name as xs:QName, 192 | $month-name as xs:QName, 193 | $day-name as xs:QName) as element()* 194 | { 195 | let $date-string as xs:string := $date 196 | return 197 | ( 198 | element {$year-name} {fn:substring($date-string,1,4)}, 199 | element {$month-name} {fn:substring($date-string,6,2)}, 200 | element {$day-name} {fn:substring($date-string,9,2)} 201 | ) 202 | } 203 | 204 | (:~ 205 | : Given a date, and field prefix, will generate a querystring fragment for use in URLs. 206 | : 207 | : @param $date The date to be converted to a querystring fragment. 208 | : @param $prefix The prefix to be used for each field name in the querystring fragment. 209 | : @return A querystring fragment representing the passed date. 210 | :) 211 | define function create-date-querystring($date as xs:date, $prefix as xs:string) as xs:string 212 | { 213 | let $parts := fn:tokenize(fn:string($date),"-") 214 | let $params := fn:concat($prefix,"-year=",$parts[1],"&",$prefix,"-month=",$parts[2],"&",$prefix,"-day=",$parts[3]) 215 | return 216 | $params 217 | } 218 | 219 | (:-- PAGINATION METHODS --:) 220 | 221 | (:~ 222 | : Based on passed values, will determine pagination information for a page. 223 | : 224 | : @param $page The current page being viewed. 225 | : @param $items-per-page The number of items-per-page currently displayed. 226 | : @param $count The total count of the items in the set. 227 | : @return A pagination element containing information such as the total number of pages, and start and end item for a given page. 228 | :) 229 | define function page-info( 230 | $page as xs:integer, 231 | $items-per-page as xs:integer, 232 | $count as xs:integer) as element(pagination) 233 | { 234 | if ($count <= 0) then 235 | 236 | 0 237 | 0 238 | 0 239 | 0 240 | 0 241 | {$items-per-page} 242 | 243 | else 244 | let $pages := fn:ceiling($count div $items-per-page) 245 | let $page := if ($page < 1) then 1 else if ($page > $pages) then $pages else $page 246 | let $start := (($page - 1) * $items-per-page) + 1 247 | let $end := $page * $items-per-page 248 | let $end := if ($end > $count) then $count else $end 249 | let $previous := $page - 1 250 | let $next := $page + 1 251 | return 252 | 253 | {$page} 254 | {$pages} 255 | {$start} 256 | {$end} 257 | {$count} 258 | {$items-per-page} 259 | {if ($previous > 0) then {$previous} else ()} 260 | {if ($next <= $pages and $pages > 1) then {$next} else ()} 261 | 262 | } 263 | 264 | (:-- UTILITY METHODS --:) 265 | 266 | (:~ 267 | : Determines if an item is null or empty. Spaces will also be normalized, 268 | : so single spaced values will be considered empty. 269 | : 270 | : @param $input The value to test. 271 | : @return A boolean value reflecting whether the item is null or empty, or populated. 272 | :) 273 | define function is-null-or-empty($input as item()*) as xs:boolean 274 | { 275 | let $value := fn:true() 276 | return 277 | ( 278 | for $i in $input 279 | return xdmp:set($value, $value and (fn:not(fn:exists($i) and fn:normalize-space(fn:string($i)) ne ""))), 280 | $value 281 | ) 282 | } 283 | 284 | (:~ 285 | : Determines if a number is between (inclusive) two values. The order of the test range $a 286 | : and $b does not matter. 287 | : 288 | : @param $num The number to test. 289 | : @param $a A bound in the test range. 290 | : @param $b A bound in the test range. 291 | : @return A boolean value reflecting whether the number is within the test range or not. 292 | :) 293 | define function is-between($num as xs:double, $a as xs:double, $b as xs:double) as xs:boolean 294 | { 295 | if ( ($num ge $a) and ($num le $b) ) then fn:true() 296 | else if( ($num le $a) and ($num ge $b) ) then fn:true() 297 | else fn:false() 298 | } 299 | 300 | (:~ Pad a numeric string $int with leading zeros 301 | : for a total length of up to $size :) 302 | define function lead-zero($int as xs:string, $size as xs:integer) as xs:string 303 | { 304 | let $length := fn:string-length($int) 305 | return 306 | if ($length lt $size) 307 | then fn:concat(fn:string-pad("0", $size - $length), $int) 308 | else $int 309 | } -------------------------------------------------------------------------------- /http/rapid-app-demo/Press Release Content 20080327.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marklogic-community/commons/875714edb546c79702b5424e0ffa63502e3b2401/http/rapid-app-demo/Press Release Content 20080327.zip -------------------------------------------------------------------------------- /http/rapid-app-demo/README.txt: -------------------------------------------------------------------------------- 1 | This is an example application demonstrating the ability to rapidly create an end-to-end XQuery prototype using tools freely available on the developer.marklogic.com web site. The application was built using 170 lines of XML configuration and 80 lines of custom XQuery code, and leveraged the following tools: 2 | 3 | o Versi - Available on the Workshop Page 4 | o lib-search - Available on the Workshop Page 5 | o search-ui - Available in the XQuery Commons in the http directory 6 | o lib-uitools - Available in the XQuery Commons in the http directory 7 | 8 | Please note that MarkLogic 3.2 is required to run this application and the latest releases of the above libraries were used as of 6/13/2008. The application will not be updated as new libraries are released. 9 | 10 | Full documentation is available in the /docs/ directory. 11 | 12 | Thanks! 13 | Chris Welch 14 | 6/16/2008 -------------------------------------------------------------------------------- /http/rapid-app-demo/docs/Database Configuration Template.xls: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marklogic-community/commons/875714edb546c79702b5424e0ffa63502e3b2401/http/rapid-app-demo/docs/Database Configuration Template.xls -------------------------------------------------------------------------------- /http/rapid-app-demo/docs/Demo Notes.docx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marklogic-community/commons/875714edb546c79702b5424e0ffa63502e3b2401/http/rapid-app-demo/docs/Demo Notes.docx -------------------------------------------------------------------------------- /http/rapid-app-demo/docs/Installation Readme.doc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marklogic-community/commons/875714edb546c79702b5424e0ffa63502e3b2401/http/rapid-app-demo/docs/Installation Readme.doc -------------------------------------------------------------------------------- /http/rapid-app-demo/src/appspecific-width.css: -------------------------------------------------------------------------------- 1 | /*-- If you like these styles place them in your appspecific.css file. --*/ 2 | 3 | #header { 4 | padding: 0; 5 | margin: 0; 6 | position: relative; 7 | height: 100px; 8 | background: #3371A3; /*#3371A3;*/ 9 | } 10 | 11 | h1 { 12 | margin-bottom: 0; 13 | font-size: 23px; 14 | } 15 | 16 | #page { 17 | width: 950px; 18 | padding-bottom:20px; 19 | } 20 | * html #page { width: 952px; } /* IE hack (add 2) */ 21 | 22 | ul.menu li.current_page_item a, 23 | ul.menu li.current_page_item a:hover { 24 | color: black !important; 25 | background: white; 26 | text-decoration: none; 27 | } 28 | 29 | #one_col { 30 | padding-left: 100px; 31 | /*padding-right: 100px; don't uncomment. will be set de facto*/ 32 | } 33 | 34 | #one_col #primary { 35 | width: 700px; 36 | } 37 | 38 | #two_col { 39 | padding-left: 30px; 40 | /*padding-right: 30px; don't uncomment. will be set de facto*/ 41 | } 42 | #two_col #primary { 43 | width: 700px; 44 | margin-right: 0; 45 | float:none; 46 | } 47 | #two_col #sidebar { 48 | width: 170px; 49 | margin-right: 20px; 50 | float:left; 51 | } -------------------------------------------------------------------------------- /http/rapid-app-demo/src/css/appspecific-demo.css: -------------------------------------------------------------------------------- 1 | @import "search-ui.css"; 2 | 3 | /*-- Color --*/ 4 | body { 5 | background:#EEE; 6 | } 7 | 8 | #header { 9 | background: #7094C6; 10 | } 11 | 12 | ul.menu li.current_page_item.hassub a, 13 | ul.menu li.current_page_item.hassub a:hover, 14 | #subheader { 15 | background: #EEE; 16 | } 17 | 18 | #page { 19 | border-color:#897C76; 20 | } 21 | 22 | /*-- Column Sizing --*/ 23 | 24 | #header { 25 | padding: 0; 26 | margin: 0; 27 | position: relative; 28 | height: 9em; /*100px;*/ 29 | } 30 | 31 | h1 { 32 | padding-top: .8em; /*30px;*/ 33 | margin-bottom: 0; 34 | font-family: "Arial", "Times New Roman"; 35 | font-weight: bold; 36 | letter-spacing: -1px; 37 | font-size:275%; 38 | } 39 | 40 | #page { 41 | width: 950px; 42 | padding-bottom:20px; 43 | } 44 | * html #page { width: 952px; } /* IE hack (add 2) */ 45 | 46 | ul.menu li.current_page_item a, 47 | ul.menu li.current_page_item a:hover { 48 | color: black !important; 49 | background: white; 50 | text-decoration: none; 51 | } 52 | 53 | #one_col { 54 | padding-left: 100px; 55 | /*padding-right: 100px; don't uncomment. will be set de facto*/ 56 | } 57 | 58 | #one_col #primary { 59 | width: 700px; 60 | } 61 | 62 | #two_col { 63 | padding-left: 30px; 64 | /*padding-right: 30px; don't uncomment. will be set de facto*/ 65 | } 66 | #two_col #primary { 67 | width: 700px; 68 | margin-right: 20px; 69 | } 70 | #two_col .secondary { 71 | width: 170px; 72 | } 73 | 74 | div.search_results div.result { 75 | margin: .4em 0; 76 | padding: .6em .6em .4em .6em; 77 | background-color: #F9F9F9; 78 | border: 1px solid #DDD; 79 | font-style:normal; 80 | overflow:hidden; 81 | } 82 | 83 | div.search_results div.result.alt { 84 | background-color: #F3F3F3; 85 | } 86 | 87 | div.search_results div.result .header { 88 | font-size: 110%; 89 | font-weight:bold; 90 | } 91 | 92 | div.search_results div.result p.summary { 93 | margin: 1.0em 0 .6em 0; 94 | font-size:105% 95 | } 96 | div.search_results div.result p.summary a { 97 | color:darkblue; 98 | } 99 | 100 | .abstract 101 | { 102 | border: 1px solid #DDD; 103 | background: #FBFBFB; 104 | font-size: 105%; 105 | padding: .5em; 106 | } 107 | .loading { 108 | z-index: 1; 109 | text-align: center; 110 | } -------------------------------------------------------------------------------- /http/rapid-app-demo/src/css/appspecific.css: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marklogic-community/commons/875714edb546c79702b5424e0ffa63502e3b2401/http/rapid-app-demo/src/css/appspecific.css -------------------------------------------------------------------------------- /http/rapid-app-demo/src/css/basicui.css: -------------------------------------------------------------------------------- 1 | /*-- Column Sizing --*/ 2 | 3 | #page { 4 | width: 760px; 5 | padding-bottom:20px; 6 | } 7 | * html #page { width: 762px; } /* IE hack (add 2) */ 8 | 9 | #one_col { 10 | padding-left: 80px; 11 | /*padding-right: 80px; don't uncomment. will be set de facto*/ 12 | } 13 | 14 | #one_col #primary { 15 | width: 600px; 16 | } 17 | 18 | #two_col { 19 | padding-left: 30px; 20 | /*padding-right: 30px; don't uncomment. will be set de facto*/ 21 | } 22 | #two_col #sidebar { 23 | width: 180px; 24 | margin-right: 20px; 25 | } 26 | #two_col #primary { 27 | width: 500px; 28 | margin-right: 20px; 29 | } 30 | #two_col .secondary { 31 | width: 180px; 32 | } 33 | 34 | #three_col { 35 | padding-left: 20px; 36 | /*padding-right: 20px; don't uncomment. will be set de facto*/ 37 | } 38 | #three_col #sidebar { 39 | width: 160px; 40 | margin-right: 20px; 41 | } 42 | #three_col #primary { 43 | width: 380px; 44 | margin-right: 20px; 45 | } 46 | #three_col .secondary { 47 | width: 140px; 48 | } 49 | 50 | /*-- Column Styles --*/ 51 | 52 | #one_col, 53 | #two_col, 54 | #three_col { 55 | padding-top: 20px; 56 | clear: both; 57 | } 58 | 59 | #content #primary { 60 | float: left; 61 | overflow: hidden; 62 | font-size:115%; 63 | } 64 | 65 | #content #one_col #primary { 66 | float: none; 67 | } 68 | 69 | #content .secondary { 70 | overflow: hidden; 71 | font: 100%/1.5em 'Lucida Grande', Verdana, Arial, Sans-Serif; 72 | color: #666; 73 | position: relative; 74 | } 75 | 76 | #content #sidebar { 77 | float: left; 78 | overflow: hidden; 79 | } 80 | 81 | /*-- Primary Column --*/ 82 | 83 | #primary { 84 | text-align: left; 85 | } 86 | 87 | #primary * { 88 | 89 | } 90 | #primary h2 { 91 | font-size: 200%; 92 | text-align: left; 93 | } 94 | 95 | /*-- Secondary Column --*/ 96 | 97 | .secondary h3 { 98 | font-size: 140%; 99 | margin: .4em 0 .1em 0; 100 | } 101 | 102 | /*-- Sidebar --*/ 103 | 104 | #sidebar h3 { 105 | font-size: 150%; 106 | margin: .3em 0 .4em 0; 107 | } 108 | 109 | /*-- Misc Styles --*/ 110 | .icon 111 | { 112 | position:relative; 113 | bottom: -2px; 114 | } 115 | 116 | /*-- Block Menu --*/ 117 | 118 | ul.blockMenu, 119 | ul.blockMenu ul { 120 | margin:0; 121 | padding:0; 122 | } 123 | 124 | ul.blockMenu { 125 | list-style: none; 126 | font-size: 120%; 127 | margin-bottom: .9em; 128 | } 129 | 130 | ul.blockMenu li { 131 | margin-bottom: 3px; 132 | } 133 | 134 | ul.blockMenu div { 135 | position: relative; 136 | border: 1px solid #CCC; 137 | background: #F9F9F9; 138 | padding: .3em .7em; 139 | } 140 | 141 | ul.blockMenu li a { 142 | text-decoration: none; 143 | } 144 | 145 | ul.blockMenu li a:hover { 146 | text-decoration: none; 147 | color: orange; 148 | } 149 | 150 | ul.blockMenu li div.current a, 151 | ul.blockMenu li a.current { 152 | font-weight:bold; 153 | } 154 | 155 | ul.blockMenu li a.toggle { 156 | position: absolute; 157 | top: .4em; 158 | right: .8em; 159 | font-weight: bold; 160 | } 161 | 162 | ul.blockMenu ul { 163 | border-bottom:1px solid #CCC; 164 | border-left:1px solid #CCC; 165 | border-right:1px solid #CCC; 166 | padding: .2em 0px; 167 | } 168 | 169 | ul.blockMenu ul li { 170 | margin: 0; 171 | padding: .3em .8em; 172 | font-size: .9em; 173 | } 174 | 175 | /*-- Stack Menu --*/ 176 | 177 | .secondary h3.stackMenu, 178 | #sidebar h3.stackMenu { 179 | font-size: 150%; 180 | margin: .3em 0 .1em 0; 181 | } 182 | .secondary h3.stackMenu { 183 | margin: .5em 0 .3em 0; 184 | } 185 | 186 | ul.stackMenu { 187 | margin-top: 0; 188 | border-top: 1px solid #DDD; 189 | padding:0; 190 | margin-left:0; 191 | } 192 | 193 | ul.stackMenu li { 194 | border-bottom: 1px solid #DDD; 195 | padding: .2em .3em; 196 | font-size: 1.1em; 197 | background: #FAFAFA; 198 | } 199 | 200 | /*-- Link Group --*/ 201 | div.linkgroup { 202 | margin-bottom: .5em; 203 | } 204 | 205 | /*-- Message Styles --*/ 206 | div.message { 207 | background: #F3F3F3; 208 | border: 1px solid #CCC; 209 | padding: 1em 1.2em; 210 | margin-bottom: .8em; 211 | font-size: 115%; 212 | } 213 | 214 | div.message p { 215 | font-weight: bold; 216 | line-height: 1.7em; 217 | margin:0; 218 | } 219 | 220 | div.message.success p { 221 | background: transparent url('../images/silk/accept.png') no-repeat; 222 | padding: 0 0 4px 21px; 223 | color: green; 224 | } 225 | 226 | div.message.warning p { 227 | background: transparent url('../images/silk/error.png') no-repeat; 228 | padding: 0 0 4px 21px; 229 | color: goldenrod; 230 | } 231 | 232 | div.message.error p { 233 | background: transparent url('../images/silk/exclamation.png') no-repeat; 234 | padding: 0 0 4px 21px; 235 | color: red; 236 | } 237 | 238 | /*-- Formatted Form --*/ 239 | form.formatted {padding:6px 0;} 240 | 241 | form.formatted p { 242 | margin: 6px 0; 243 | line-height: 2em; 244 | } 245 | 246 | form.formatted label { 247 | display: block; 248 | float: left; 249 | width: 100px; 250 | font-weight: bold; 251 | } 252 | form.formatted label.nofield { 253 | margin-top: 0; 254 | } 255 | 256 | form.formatted input { 257 | width: 250px; 258 | padding: .2em .2em; 259 | } 260 | 261 | form.formatted textarea { 262 | width: 465px; 263 | padding: .2em .2em; 264 | } 265 | 266 | form.formatted .button { 267 | margin: .3em 0 0 100px; 268 | width: auto; 269 | padding: 3px 7px; 270 | color: #000; 271 | font-size: 1em; 272 | } 273 | 274 | form.formatted em { 275 | font-style: normal; 276 | } 277 | 278 | form.formatted .info {padding-left:90px;} 279 | 280 | /*-- Pagination Styles --*/ 281 | .pages { 282 | padding: 1em; 283 | margin: 1em 0; 284 | clear: left; 285 | } 286 | .pages a, .pages span { 287 | display: block; 288 | float: left; 289 | padding: 0.2em 0.5em; 290 | margin-right: 0.1em; 291 | border: 1px solid #fff; 292 | background: #fff; 293 | } 294 | 295 | .pages span.current { 296 | border: 1px solid #2E6AB1; 297 | font-weight: bold; 298 | background: #2E6AB1; 299 | color: #fff; 300 | } 301 | 302 | .pages a { 303 | border: 1px solid #9AAFE5; 304 | text-decoration: none; 305 | } 306 | 307 | .pages a:hover { 308 | border-color: #2E6AB1; 309 | } 310 | 311 | .pages a.nextprev { 312 | font-weight: bold; 313 | } 314 | 315 | .pages span.nextprev { 316 | color: #666; 317 | border: 1px solid #ddd; 318 | color: #999; 319 | } 320 | -------------------------------------------------------------------------------- /http/rapid-app-demo/src/css/search-ui.css: -------------------------------------------------------------------------------- 1 | /*-- 2 | 3 | Make sure this stylesheet is imported from another stylesheet or linked from the HTML page. 4 | 5 | --*/ 6 | 7 | /*-- Search Result Widgets --*/ 8 | div.query_description { 9 | font-size: 110%; 10 | margin: 0 0 1em 0; 11 | } 12 | div.query_description span { 13 | padding-right: 0em; 14 | } 15 | 16 | div.results_info { 17 | font-size: 110%; 18 | margin: 0em 0 .5em 0; 19 | } 20 | 21 | /*-- Search Facets --*/ 22 | 23 | div.search_facet { 24 | margin-bottom : .5em; 25 | font-size : 110%; 26 | } 27 | 28 | div.search_facet div { 29 | margin : .2em 0; 30 | padding-left : 16px; 31 | position : relative; 32 | overflow : visible; 33 | } 34 | 35 | div.search_facet div img.selected_icon { 36 | position : absolute; 37 | top : -2px; 38 | left : 0px; 39 | } 40 | 41 | /*-- Generic Styles --*/ 42 | 43 | #content span.ml-highlight { 44 | font-weight:bold; 45 | color: #FC9605; 46 | } 47 | 48 | /*-- Data Panels --*/ 49 | .analysis-panel { 50 | margin:20px 20px 0 20px; 51 | padding:10px; 52 | border:1px solid #DDD; 53 | background-color:#F7F7F7; 54 | font-size:105%; 55 | } 56 | .analysis-panel .header { 57 | font-weight:bold; 58 | font-size:105%; 59 | margin:0 0 .3em 0; 60 | } 61 | 62 | /*-- Hot Tag Cloud Styles --*/ 63 | 64 | .heatmap { 65 | text-align:center; 66 | line-height:170%; 67 | } 68 | .heatmap a:link, 69 | .heatmap a:hover { 70 | text-decoration:none; 71 | } 72 | .heatmap strong.selected { 73 | background:#EEE; 74 | padding:1px 2px; 75 | border:1px solid #C0C0C0; 76 | } 77 | .heatmap a:hover { 78 | background:#DDD; 79 | } 80 | .heatmap span { 81 | margin:0 2px; 82 | text-decoration:underline; 83 | } 84 | .heatmap .heat1 { 85 | color : rgb(10,0,0); 86 | font-size:7pt; 87 | } 88 | .heatmap .heat2 { 89 | color : rgb(60,0,0); 90 | font-size:8pt; 91 | } 92 | .heatmap .heat3 { 93 | color : rgb(125,0,0); 94 | font-size:9pt; 95 | } 96 | .heatmap .heat4 { 97 | color : rgb(175,0,0); 98 | font-size:10pt; 99 | } 100 | .heatmap .heat5 { 101 | color : rgb(220,0,0); 102 | font-size:11pt; 103 | } 104 | .heatmap .heat6 { 105 | color : rgb(255,0,0); 106 | font-size:12pt; 107 | } -------------------------------------------------------------------------------- /http/rapid-app-demo/src/css/style.css: -------------------------------------------------------------------------------- 1 | /*-- If you'd like to override a style, such as a width or color 2 | in template.css or basicui.css, it is highly recommended that you 3 | override the style in appspecific.css. --*/ 4 | 5 | @import "template.css"; /*-- Contains styles for the template shell of the page --*/ 6 | @import "basicui.css"; /*-- Contains basic styles for the content area --*/ 7 | @import "appspecific.css"; /*-- Contains styles specific to your application --*/ 8 | -------------------------------------------------------------------------------- /http/rapid-app-demo/src/css/template.css: -------------------------------------------------------------------------------- 1 | /*-- This file defines all styles for the 2 | header and footer of the page and also 3 | defines basic element styles. --*/ 4 | 5 | /*-- Page Structure --*/ 6 | 7 | html { /* Force Vertical Scrollbar */ 8 | /* IE */ 9 | overflow-y: scroll; 10 | /* Moz */ 11 | height: 100%; 12 | margin-bottom: 0.1em; 13 | } 14 | 15 | h1,h2,h3,h4,h5,h6 { /* beware the jabberwakky */ 16 | padding-left:0; 17 | margin: 0; 18 | } 19 | 20 | p { 21 | margin: 1.3em 0; 22 | } 23 | 24 | img { 25 | border: 0; 26 | } 27 | 28 | body { 29 | font: 62.5% 'Lucida Grande', Verdana, Arial, Sans-Serif; /* Resets 1em to 10px */ 30 | color: #444; 31 | background: #EDEDED; 32 | text-align: center; 33 | margin: 0 0 30px; 34 | } 35 | 36 | #page { 37 | background: white; 38 | text-align: left; 39 | margin: 0 auto; 40 | padding: 0 0 0 0; 41 | position: relative; 42 | width: 760px; /* ignore. overridden in basicui */ 43 | border: 1px solid #ddd; 44 | border-top: none; 45 | } 46 | 47 | * html #page { width: 762px; } /* IE hack (add 2) */ 48 | 49 | /*-- Quicksearch --*/ 50 | 51 | .quicksearch { 52 | position: relative; 53 | } 54 | 55 | .quicksearch input { 56 | display: inline; 57 | font-size: 110%; 58 | padding: .1em .2em; 59 | } 60 | 61 | .quicksearch input.hide, 62 | .quicksearch input.hidden { 63 | display: none; 64 | } 65 | 66 | .quicksearch input.radio { 67 | border: 0; 68 | margin-right: .4em; 69 | } 70 | 71 | .quicksearch label { 72 | margin-right: .7em; 73 | } 74 | 75 | .quicksearch .textbox { 76 | width: 16em; 77 | border: 1px solid #DDD; 78 | } 79 | 80 | .quicksearch .button { 81 | height: 1.8em; 82 | padding:0; 83 | position:relative; 84 | top:1px; 85 | } 86 | 87 | /*-- Flat Links --*/ 88 | 89 | ul.flatlinks { 90 | margin: 0; 91 | padding: 0; 92 | } 93 | 94 | ul.flatlinks li { 95 | display: inline; 96 | margin: 0; 97 | border-left:1px solid #AAA; 98 | padding: 0 5px 0 7px; 99 | } 100 | 101 | ul.flatlinks li.first { 102 | border-left:0; 103 | padding-left:0; 104 | } 105 | 106 | ul.flatlinks li a { 107 | font: 100% Verdana, Helvetica, Arial, Sans-Serif; 108 | margin: 0; 109 | } 110 | 111 | /*-- Tab Menu --*/ 112 | 113 | ul.menu { 114 | margin: 0; 115 | padding: 0; 116 | position: absolute; 117 | bottom: 0; 118 | left: 20px; 119 | width: 90%; 120 | } 121 | 122 | ul.menu li { 123 | display: inline; 124 | margin: 0; 125 | } 126 | 127 | ul.menu, 128 | ul.menu li a { 129 | padding: 5px 15px 6px; 130 | } 131 | 132 | ul.menu li a { 133 | font: 100% Verdana, Helvetica, Arial, Sans-Serif; 134 | color: white; 135 | margin: 0; 136 | } 137 | 138 | ul.menu li a:hover { 139 | background: #333; 140 | color: #eee !important; 141 | text-decoration: none; 142 | } 143 | 144 | ul.menu li.current_page_item a, 145 | ul.menu li.current_page_item a:hover { 146 | color: #333 !important; 147 | background: #EEE; 148 | text-decoration: none; 149 | } 150 | 151 | .admintab { 152 | position: absolute; 153 | right: 0px; 154 | } 155 | * html .admintab { padding: 5px 15px 6px } /* IE hack */ 156 | 157 | ul.menu li.searchtab { 158 | position: absolute; 159 | right: 0; 160 | padding: 0; 161 | } 162 | 163 | ul.menu li.searchtab .quicksearch { 164 | bottom: 5px; 165 | } 166 | 167 | /*-- Utility Area --*/ 168 | 169 | #utility { 170 | position:relative; 171 | height : 3.1em; 172 | font-size: 90%; 173 | } 174 | 175 | #utility ul.flatlinks { 176 | position: absolute; 177 | top: 8px; 178 | left: 15px; 179 | } 180 | 181 | #utility .quicksearch { 182 | position: absolute; 183 | top: 4px; 184 | right: 15px; 185 | } 186 | 187 | /*-- Header --*/ 188 | #header { 189 | padding: 0; 190 | margin: 0; 191 | position: relative; 192 | height: 12.0em; 193 | background: #990134; /*#3371A3;*/ 194 | } 195 | * html #header { height: 120px; } /* IE hack */ 196 | 197 | /* H1 is only used in the header */ 198 | h1 { 199 | font-family: 'Georgia', 'Times New Roman', 'Trebuchet MS', Verdana, Sans-Serif; 200 | font-size: 300%; 201 | font-weight: normal; 202 | letter-spacing: -0.5px; 203 | margin: 0; 204 | padding: .9em 40px 0; /* use em for pad-top so header can scale */ 205 | } 206 | 207 | h1, h1 a, h1 a:hover, h1 a:visited { 208 | text-decoration: none; 209 | color: white; 210 | } 211 | 212 | h1 a:hover { 213 | text-decoration: underline; 214 | } 215 | 216 | #header .description { 217 | text-decoration: none; 218 | color: white; 219 | font-size: 100%; 220 | margin: 0 40px; 221 | } 222 | 223 | #header .dropnav { 224 | position: absolute; 225 | right: 15px; 226 | top: 0; 227 | background: #FFF; 228 | border: 1px solid #DDD; 229 | border-top: 0; 230 | padding: 4px 10px; 231 | } 232 | 233 | #header .dropnav ul { 234 | display:inline; 235 | } 236 | 237 | #header .sidearea { 238 | position: absolute; 239 | right: 5px; 240 | bottom: 5px; 241 | color: #FFFFFF; 242 | } 243 | 244 | #header .sidearea ul.flatlinks { display: inline; } 245 | #header .sidearea ul.flatlinks li { border-left: 0; border-right: 1px solid #EEE; } 246 | #header .sidearea .quicksearch { display: inline; } 247 | #header .sidearea form { display: inline; } 248 | #header .sidearea a { color: #FFF; } 249 | 250 | #header .quicksearch label { 251 | color: #FFFFFF; 252 | } 253 | 254 | /*-- Sub Header --*/ 255 | 256 | #subheader { 257 | font-size: 90%; 258 | background: #EEE; 259 | padding: .7em 1.6em; 260 | color: #333; 261 | border-bottom: 1px solid #ddd; 262 | } 263 | #subheader * { 264 | margin: 0; 265 | padding: 0; 266 | } 267 | 268 | /*-- Content --*/ 269 | #content { 270 | position:relative; 271 | } 272 | 273 | /*-- Footer --*/ 274 | 275 | #footer { 276 | margin-top: 20px; 277 | padding-bottom: 20px; 278 | text-align: center; 279 | clear: both; 280 | } 281 | 282 | #footer a { 283 | color: #888; 284 | border-bottom: 1px solid #ccc; 285 | font-weight: bold; 286 | } 287 | 288 | #footer a:hover { 289 | border: none; 290 | text-decoration: none; 291 | color: black; 292 | } 293 | 294 | /*-- Forms --*/ 295 | form label, 296 | form em {color:#666666;} 297 | 298 | form input {color:#414141;} 299 | 300 | /*form input, form textarea { 301 | border: 1px solid; 302 | border-color: #DCDCDC #F0F0F0 #F0F0F0 #DCDCDC; 303 | font-family: Arial,Helvetica,sans-serif; 304 | font-size: 120%; 305 | }*/ 306 | 307 | form textarea {overflow:auto;} 308 | 309 | form .button { 310 | border: 1px solid; 311 | font-weight: bold; 312 | border-color: white #DCDCDC #DCDCDC white; 313 | background-color: #F0F0F0; 314 | text-align: center; 315 | padding: .1em .4em; 316 | } 317 | 318 | /*-- Content --*/ 319 | 320 | div.text-content { 321 | /* font : Arial, Sans-serif 120%/15em; */ 322 | } 323 | 324 | /*-- Common Styles --*/ 325 | 326 | hr { 327 | display: none; 328 | } 329 | hr.display { 330 | display: block; 331 | } 332 | 333 | small { 334 | font-size: 90%; 335 | line-height: 1.5em; 336 | } 337 | 338 | small, strike { 339 | color: #777; 340 | } 341 | 342 | code { 343 | font: 110% 'Courier New', Courier, Monospace; 344 | } 345 | 346 | acronym, abbr { 347 | font-size: 90%; 348 | letter-spacing: .07em; 349 | border-bottom: 1px dashed #999; 350 | cursor: help; 351 | } 352 | 353 | a { 354 | color: #27d; 355 | text-decoration: none; 356 | } 357 | 358 | a:hover { 359 | text-decoration: underline; 360 | } 361 | 362 | ol li { 363 | list-style: decimal outside; 364 | } 365 | 366 | h2, h3, h4 { 367 | font-family: 'Trebuchet MS', Verdana, Sans-Serif; 368 | } 369 | 370 | h2 { /* H2 is what kind of page you are on. */ 371 | text-align: center; 372 | font-size: 240%; 373 | font-weight: bold; 374 | letter-spacing: -1px; 375 | } 376 | 377 | h2, h2 a, h2 a:visited, 378 | h3, h3 a, h3 a:visited, 379 | h4, h4 a, h4 a:visited { 380 | color: #444; 381 | } 382 | 383 | h2, h2 a, h2 a:hover, h2 a:visited, 384 | h3, h3 a, h3 a:hover, h3 a:visited, 385 | h4, h4 a, h4 a:hover, h4 a:visited { 386 | text-decoration: none; 387 | } 388 | 389 | a img,:link img,:visited img { border:none } 390 | 391 | img.noborder { 392 | border: none !important; 393 | } 394 | 395 | .clear { 396 | clear: both; 397 | margin: 0; 398 | padding: 0; 399 | } 400 | 401 | .center { 402 | text-align: center; 403 | } 404 | 405 | .alignright { 406 | float: right; 407 | } 408 | 409 | .alignleft { 410 | float: left 411 | } 412 | .hide, 413 | .hidden { 414 | display:none; 415 | } 416 | -------------------------------------------------------------------------------- /http/rapid-app-demo/src/default.xqy: -------------------------------------------------------------------------------- 1 | xdmp:redirect-response("example-default.xqy") -------------------------------------------------------------------------------- /http/rapid-app-demo/src/example-columns.xqy: -------------------------------------------------------------------------------- 1 | import module namespace page="http://www.marklogic.com/ps/versi/page-layout" at "modules/page-layout.xqy" 2 | import module namespace dis="http://www.marklogic.com/ps/versi/display" at "modules/display.xqy" 3 | 4 | declare namespace htm="http://www.w3.org/1999/xhtml" 5 | 6 | let $params := (: Recommended that lib-uitools is used to generate params from request :) 7 | 8 | let $page-info := 9 | page:build-page-info( 10 | "Versi Template", (: title :) 11 | (), (: head elements :) 12 | () (: body.onload javascript :) 13 | ) 14 | let $content := 15 | ( 16 | page:one-column( 17 | (attribute style {"background:lightgrey;"}, dis:main-content($params)) (: Primary Column Contents :) 18 | ), 19 | page:two-column( 20 | "sidebar", (: Layout Type: "secondary", "sidebar" :) 21 | (attribute style {"background:lightgrey;"}, dis:main-content($params)), (: Primary Column Contents :) 22 | (attribute style {"background:lightblue;"}, dis:example-a($params)) (: Second Column Contents :) 23 | ), 24 | page:two-column( 25 | "secondary", (: Layout Type: "secondary", "sidebar" :) 26 | (attribute style {"background:lightgrey;"}, dis:main-content($params)), (: Primary Column Contents :) 27 | (attribute style {"background:lightblue;"}, dis:example-a($params)) (: Second Column Contents :) 28 | ), 29 | page:three-column( 30 | (attribute style {"background:lightgreen;"}, dis:main-content($params)), (: Primary Column Contents :) 31 | (attribute style {"background:lightgrey;"}, dis:example-b($params)), (: Sidebar Column Contents :) 32 | (attribute style {"background:lightblue;"}, dis:example-a($params)) (: Secondary Column Contents :) 33 | ) 34 | ) 35 | 36 | return page:output($params, $page-info, $content) -------------------------------------------------------------------------------- /http/rapid-app-demo/src/example-default.xqy: -------------------------------------------------------------------------------- 1 | import module namespace page="http://www.marklogic.com/ps/versi/page-layout" at "modules/page-layout.xqy" 2 | import module namespace dis="http://www.marklogic.com/ps/versi/display" at "modules/display.xqy" 3 | import module namespace widg="http://www.marklogic.com/ps/versi/widgets" at "modules/widgets.xqy" 4 | 5 | declare namespace htm="http://www.w3.org/1999/xhtml" 6 | 7 | let $params := (: Recommended that lib-uitools is used to generate params from request :) 8 | 9 | true 10 | 11 | let $page-info := 12 | page:build-page-info( 13 | "Versi Template", (: title :) 14 | (), (: head elements :) 15 | () (: body.onload javascript :) 16 | ) 17 | let $content := 18 | ( 19 | page:two-column( 20 | "secondary", (: Layout Type: "secondary", "sidebar" :) 21 | (: Primary Column Contents - this markup should be put in the display file for reuse and modularization :) 22 |
23 |
24 |

Welcome to Versi!

25 |

This is a sample page from the Versi template. You will note that the template is built to be highly customizable. Using the example pages 26 | in this directory, you should be able to quickly build a user interface that is rich, easy to use, XHTML compliant, and save you oodles of time.

27 |

To see more examples of Versi in action, take a look at these sample documents:

28 | 33 |
34 | {widg:pagination()} 35 |
, 36 | (: Second Column Contents :) 37 | widg:stack-menu() 38 | ) 39 | ) 40 | 41 | return page:output($params, $page-info, $content) -------------------------------------------------------------------------------- /http/rapid-app-demo/src/example-width.xqy: -------------------------------------------------------------------------------- 1 | import module namespace page="http://www.marklogic.com/ps/versi/page-layout" at "modules/page-layout.xqy" 2 | import module namespace dis="http://www.marklogic.com/ps/versi/display" at "modules/display.xqy" 3 | import module namespace widg="http://www.marklogic.com/ps/versi/widgets" at "modules/widgets.xqy" 4 | 5 | declare namespace htm="http://www.w3.org/1999/xhtml" 6 | 7 | let $params := (: Recommended that lib-uitools is used to generate params from request :) 8 | 9 | true 10 | false 11 | true 12 | false 13 | 14 | let $page-info := 15 | page:build-page-info( 16 | "Versi Template", (: title :) 17 | (), (: head elements :) 18 | () (: body.onload javascript :) 19 | ) 20 | let $content := 21 | ( 22 | page:two-column( 23 | "sidebar", (: Layout Type: "secondary", "sidebar" :) 24 | (: Primary Column Contents :) 25 |
26 | {widg:messages()} 27 |

Customized Width and Header

28 |

If you like this layout, view the width.css file.

29 | {widg:formatted-form()} 30 |
, 31 | widg:block-menu() (: Second Column Contents :) 32 | ) 33 | ) 34 | 35 | return page:output($params, $page-info, $content) -------------------------------------------------------------------------------- /http/rapid-app-demo/src/get-expfile.xqy: -------------------------------------------------------------------------------- 1 | (: 2 | : Provides basic caching to resource files such as images and stylesheets because 3 | : Mark Logic doesn't support it prior to 3.2-2. Use this file for requests of all images 4 | : JavaScript, and CSS files if you are using a version prior to 3.2-2. 5 | :) 6 | 7 | declare namespace http="xdmp:http" 8 | let $expires := xdmp:get-request-field("ex","1") 9 | let $path := xdmp:url-decode(xdmp:get-request-field("uri","")) 10 | let $host := xdmp:get-request-header("host") 11 | let $headers := 12 | 13 | { for $i in xdmp:get-request-header-names() return element {$i} {xdmp:get-request-header($i)} } 14 | 15 | 16 | let $new-response := xdmp:http-get(fn:concat("http://",$host,$path),{$headers}) 17 | 18 | let $content-type := fn:tokenize(fn:string($new-response[1]/*:headers/*:content-type), ";")[1] 19 | 20 | return 21 | 22 | ( 23 | for $i in $new-response[1]/http:response/* return xdmp:add-response-header(fn:local-name($i),fn:data($i)) 24 | , 25 | xdmp:add-response-header("Expires", xdmp:strftime("%a, %d %b %Y %H:%M:%S",fn:current-dateTime() + xdt:dayTimeDuration(fn:concat("P1DT",$expires,"H")))) 26 | , 27 | xdmp:set-response-content-type($content-type) 28 | , 29 | $new-response[2] 30 | ) 31 | -------------------------------------------------------------------------------- /http/rapid-app-demo/src/get-file.xqy: -------------------------------------------------------------------------------- 1 | (: 2 | : Provides access to files in the database. If the querystring contains download=true, 3 | : the file will be downloaded, else it will be displayed inline. 4 | :) 5 | 6 | if (xdmp:get-request-field("uri", "") ne "") then 7 | let $uri := xdmp:get-request-field("uri", "") 8 | let $filename := fn:tokenize($uri, "/")[fn:last()] 9 | let $content-type := xdmp:uri-content-type($uri) 10 | let $download := xdmp:get-request-field("download","") 11 | let $document := fn:doc($uri) 12 | return 13 | ( 14 | xdmp:set-response-content-type($content-type), 15 | if (fn:lower-case($download) = "true") then 16 | xdmp:add-response-header("Content-Disposition", fn:concat("attachment; filename=", $filename)) 17 | else 18 | xdmp:add-response-header("Content-Disposition", fn:concat("inline; filename=", $filename)), 19 | $document 20 | ) 21 | else () -------------------------------------------------------------------------------- /http/rapid-app-demo/src/images/pwc/alert/bottom.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marklogic-community/commons/875714edb546c79702b5424e0ffa63502e3b2401/http/rapid-app-demo/src/images/pwc/alert/bottom.gif -------------------------------------------------------------------------------- /http/rapid-app-demo/src/images/pwc/alert/bottom_left.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marklogic-community/commons/875714edb546c79702b5424e0ffa63502e3b2401/http/rapid-app-demo/src/images/pwc/alert/bottom_left.gif -------------------------------------------------------------------------------- /http/rapid-app-demo/src/images/pwc/alert/bottom_right.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marklogic-community/commons/875714edb546c79702b5424e0ffa63502e3b2401/http/rapid-app-demo/src/images/pwc/alert/bottom_right.gif -------------------------------------------------------------------------------- /http/rapid-app-demo/src/images/pwc/alert/left.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marklogic-community/commons/875714edb546c79702b5424e0ffa63502e3b2401/http/rapid-app-demo/src/images/pwc/alert/left.gif -------------------------------------------------------------------------------- /http/rapid-app-demo/src/images/pwc/alert/overlay.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marklogic-community/commons/875714edb546c79702b5424e0ffa63502e3b2401/http/rapid-app-demo/src/images/pwc/alert/overlay.png -------------------------------------------------------------------------------- /http/rapid-app-demo/src/images/pwc/alert/progress.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marklogic-community/commons/875714edb546c79702b5424e0ffa63502e3b2401/http/rapid-app-demo/src/images/pwc/alert/progress.gif -------------------------------------------------------------------------------- /http/rapid-app-demo/src/images/pwc/alert/right.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marklogic-community/commons/875714edb546c79702b5424e0ffa63502e3b2401/http/rapid-app-demo/src/images/pwc/alert/right.gif -------------------------------------------------------------------------------- /http/rapid-app-demo/src/images/pwc/alert/top.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marklogic-community/commons/875714edb546c79702b5424e0ffa63502e3b2401/http/rapid-app-demo/src/images/pwc/alert/top.gif -------------------------------------------------------------------------------- /http/rapid-app-demo/src/images/pwc/alert/top_left.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marklogic-community/commons/875714edb546c79702b5424e0ffa63502e3b2401/http/rapid-app-demo/src/images/pwc/alert/top_left.gif -------------------------------------------------------------------------------- /http/rapid-app-demo/src/images/pwc/alert/top_right.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marklogic-community/commons/875714edb546c79702b5424e0ffa63502e3b2401/http/rapid-app-demo/src/images/pwc/alert/top_right.gif -------------------------------------------------------------------------------- /http/rapid-app-demo/src/images/pwc/alphacube/bottom-left-c.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marklogic-community/commons/875714edb546c79702b5424e0ffa63502e3b2401/http/rapid-app-demo/src/images/pwc/alphacube/bottom-left-c.gif -------------------------------------------------------------------------------- /http/rapid-app-demo/src/images/pwc/alphacube/bottom-middle.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marklogic-community/commons/875714edb546c79702b5424e0ffa63502e3b2401/http/rapid-app-demo/src/images/pwc/alphacube/bottom-middle.gif -------------------------------------------------------------------------------- /http/rapid-app-demo/src/images/pwc/alphacube/bottom-right-c.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marklogic-community/commons/875714edb546c79702b5424e0ffa63502e3b2401/http/rapid-app-demo/src/images/pwc/alphacube/bottom-right-c.gif -------------------------------------------------------------------------------- /http/rapid-app-demo/src/images/pwc/alphacube/button-close-focus.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marklogic-community/commons/875714edb546c79702b5424e0ffa63502e3b2401/http/rapid-app-demo/src/images/pwc/alphacube/button-close-focus.gif -------------------------------------------------------------------------------- /http/rapid-app-demo/src/images/pwc/alphacube/button-max-focus.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marklogic-community/commons/875714edb546c79702b5424e0ffa63502e3b2401/http/rapid-app-demo/src/images/pwc/alphacube/button-max-focus.gif -------------------------------------------------------------------------------- /http/rapid-app-demo/src/images/pwc/alphacube/button-min-focus.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marklogic-community/commons/875714edb546c79702b5424e0ffa63502e3b2401/http/rapid-app-demo/src/images/pwc/alphacube/button-min-focus.gif -------------------------------------------------------------------------------- /http/rapid-app-demo/src/images/pwc/alphacube/frame-left.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marklogic-community/commons/875714edb546c79702b5424e0ffa63502e3b2401/http/rapid-app-demo/src/images/pwc/alphacube/frame-left.gif -------------------------------------------------------------------------------- /http/rapid-app-demo/src/images/pwc/alphacube/frame-right.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marklogic-community/commons/875714edb546c79702b5424e0ffa63502e3b2401/http/rapid-app-demo/src/images/pwc/alphacube/frame-right.gif -------------------------------------------------------------------------------- /http/rapid-app-demo/src/images/pwc/alphacube/left-top.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marklogic-community/commons/875714edb546c79702b5424e0ffa63502e3b2401/http/rapid-app-demo/src/images/pwc/alphacube/left-top.gif -------------------------------------------------------------------------------- /http/rapid-app-demo/src/images/pwc/alphacube/right-top.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marklogic-community/commons/875714edb546c79702b5424e0ffa63502e3b2401/http/rapid-app-demo/src/images/pwc/alphacube/right-top.gif -------------------------------------------------------------------------------- /http/rapid-app-demo/src/images/pwc/alphacube/top-middle.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marklogic-community/commons/875714edb546c79702b5424e0ffa63502e3b2401/http/rapid-app-demo/src/images/pwc/alphacube/top-middle.gif -------------------------------------------------------------------------------- /http/rapid-app-demo/src/images/pwc/default/bottom_left.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marklogic-community/commons/875714edb546c79702b5424e0ffa63502e3b2401/http/rapid-app-demo/src/images/pwc/default/bottom_left.gif -------------------------------------------------------------------------------- /http/rapid-app-demo/src/images/pwc/default/bottom_mid.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marklogic-community/commons/875714edb546c79702b5424e0ffa63502e3b2401/http/rapid-app-demo/src/images/pwc/default/bottom_mid.gif -------------------------------------------------------------------------------- /http/rapid-app-demo/src/images/pwc/default/bottom_right.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marklogic-community/commons/875714edb546c79702b5424e0ffa63502e3b2401/http/rapid-app-demo/src/images/pwc/default/bottom_right.gif -------------------------------------------------------------------------------- /http/rapid-app-demo/src/images/pwc/default/bottom_right_resize.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marklogic-community/commons/875714edb546c79702b5424e0ffa63502e3b2401/http/rapid-app-demo/src/images/pwc/default/bottom_right_resize.gif -------------------------------------------------------------------------------- /http/rapid-app-demo/src/images/pwc/default/center_left.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marklogic-community/commons/875714edb546c79702b5424e0ffa63502e3b2401/http/rapid-app-demo/src/images/pwc/default/center_left.gif -------------------------------------------------------------------------------- /http/rapid-app-demo/src/images/pwc/default/center_right.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marklogic-community/commons/875714edb546c79702b5424e0ffa63502e3b2401/http/rapid-app-demo/src/images/pwc/default/center_right.gif -------------------------------------------------------------------------------- /http/rapid-app-demo/src/images/pwc/default/clear.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marklogic-community/commons/875714edb546c79702b5424e0ffa63502e3b2401/http/rapid-app-demo/src/images/pwc/default/clear.gif -------------------------------------------------------------------------------- /http/rapid-app-demo/src/images/pwc/default/close.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marklogic-community/commons/875714edb546c79702b5424e0ffa63502e3b2401/http/rapid-app-demo/src/images/pwc/default/close.gif -------------------------------------------------------------------------------- /http/rapid-app-demo/src/images/pwc/default/inspect.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marklogic-community/commons/875714edb546c79702b5424e0ffa63502e3b2401/http/rapid-app-demo/src/images/pwc/default/inspect.gif -------------------------------------------------------------------------------- /http/rapid-app-demo/src/images/pwc/default/maximize.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marklogic-community/commons/875714edb546c79702b5424e0ffa63502e3b2401/http/rapid-app-demo/src/images/pwc/default/maximize.gif -------------------------------------------------------------------------------- /http/rapid-app-demo/src/images/pwc/default/minimize.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marklogic-community/commons/875714edb546c79702b5424e0ffa63502e3b2401/http/rapid-app-demo/src/images/pwc/default/minimize.gif -------------------------------------------------------------------------------- /http/rapid-app-demo/src/images/pwc/default/overlay.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marklogic-community/commons/875714edb546c79702b5424e0ffa63502e3b2401/http/rapid-app-demo/src/images/pwc/default/overlay.png -------------------------------------------------------------------------------- /http/rapid-app-demo/src/images/pwc/default/resize.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marklogic-community/commons/875714edb546c79702b5424e0ffa63502e3b2401/http/rapid-app-demo/src/images/pwc/default/resize.gif -------------------------------------------------------------------------------- /http/rapid-app-demo/src/images/pwc/default/sizer.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marklogic-community/commons/875714edb546c79702b5424e0ffa63502e3b2401/http/rapid-app-demo/src/images/pwc/default/sizer.gif -------------------------------------------------------------------------------- /http/rapid-app-demo/src/images/pwc/default/top_left.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marklogic-community/commons/875714edb546c79702b5424e0ffa63502e3b2401/http/rapid-app-demo/src/images/pwc/default/top_left.gif -------------------------------------------------------------------------------- /http/rapid-app-demo/src/images/pwc/default/top_mid.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marklogic-community/commons/875714edb546c79702b5424e0ffa63502e3b2401/http/rapid-app-demo/src/images/pwc/default/top_mid.gif -------------------------------------------------------------------------------- /http/rapid-app-demo/src/images/pwc/default/top_right.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marklogic-community/commons/875714edb546c79702b5424e0ffa63502e3b2401/http/rapid-app-demo/src/images/pwc/default/top_right.gif -------------------------------------------------------------------------------- /http/rapid-app-demo/src/images/silk/accept.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marklogic-community/commons/875714edb546c79702b5424e0ffa63502e3b2401/http/rapid-app-demo/src/images/silk/accept.png -------------------------------------------------------------------------------- /http/rapid-app-demo/src/images/silk/building.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marklogic-community/commons/875714edb546c79702b5424e0ffa63502e3b2401/http/rapid-app-demo/src/images/silk/building.png -------------------------------------------------------------------------------- /http/rapid-app-demo/src/images/silk/bullet_black.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marklogic-community/commons/875714edb546c79702b5424e0ffa63502e3b2401/http/rapid-app-demo/src/images/silk/bullet_black.png -------------------------------------------------------------------------------- /http/rapid-app-demo/src/images/silk/bullet_delete.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marklogic-community/commons/875714edb546c79702b5424e0ffa63502e3b2401/http/rapid-app-demo/src/images/silk/bullet_delete.png -------------------------------------------------------------------------------- /http/rapid-app-demo/src/images/silk/bullet_go.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marklogic-community/commons/875714edb546c79702b5424e0ffa63502e3b2401/http/rapid-app-demo/src/images/silk/bullet_go.png -------------------------------------------------------------------------------- /http/rapid-app-demo/src/images/silk/coins.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marklogic-community/commons/875714edb546c79702b5424e0ffa63502e3b2401/http/rapid-app-demo/src/images/silk/coins.png -------------------------------------------------------------------------------- /http/rapid-app-demo/src/images/silk/error.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marklogic-community/commons/875714edb546c79702b5424e0ffa63502e3b2401/http/rapid-app-demo/src/images/silk/error.png -------------------------------------------------------------------------------- /http/rapid-app-demo/src/images/silk/exclamation.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marklogic-community/commons/875714edb546c79702b5424e0ffa63502e3b2401/http/rapid-app-demo/src/images/silk/exclamation.png -------------------------------------------------------------------------------- /http/rapid-app-demo/src/images/silk/group.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marklogic-community/commons/875714edb546c79702b5424e0ffa63502e3b2401/http/rapid-app-demo/src/images/silk/group.png -------------------------------------------------------------------------------- /http/rapid-app-demo/src/images/silk/page.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marklogic-community/commons/875714edb546c79702b5424e0ffa63502e3b2401/http/rapid-app-demo/src/images/silk/page.png -------------------------------------------------------------------------------- /http/rapid-app-demo/src/images/silk/user_suit.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marklogic-community/commons/875714edb546c79702b5424e0ffa63502e3b2401/http/rapid-app-demo/src/images/silk/user_suit.png -------------------------------------------------------------------------------- /http/rapid-app-demo/src/images/silk/world.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marklogic-community/commons/875714edb546c79702b5424e0ffa63502e3b2401/http/rapid-app-demo/src/images/silk/world.png -------------------------------------------------------------------------------- /http/rapid-app-demo/src/images/spacer.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marklogic-community/commons/875714edb546c79702b5424e0ffa63502e3b2401/http/rapid-app-demo/src/images/spacer.gif -------------------------------------------------------------------------------- /http/rapid-app-demo/src/js/appspecific.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marklogic-community/commons/875714edb546c79702b5424e0ffa63502e3b2401/http/rapid-app-demo/src/js/appspecific.js -------------------------------------------------------------------------------- /http/rapid-app-demo/src/js/builder.js: -------------------------------------------------------------------------------- 1 | // script.aculo.us builder.js v1.8.0, Tue Nov 06 15:01:40 +0300 2007 2 | 3 | // Copyright (c) 2005-2007 Thomas Fuchs (http://script.aculo.us, http://mir.aculo.us) 4 | // 5 | // script.aculo.us is freely distributable under the terms of an MIT-style license. 6 | // For details, see the script.aculo.us web site: http://script.aculo.us/ 7 | 8 | var Builder = { 9 | NODEMAP: { 10 | AREA: 'map', 11 | CAPTION: 'table', 12 | COL: 'table', 13 | COLGROUP: 'table', 14 | LEGEND: 'fieldset', 15 | OPTGROUP: 'select', 16 | OPTION: 'select', 17 | PARAM: 'object', 18 | TBODY: 'table', 19 | TD: 'table', 20 | TFOOT: 'table', 21 | TH: 'table', 22 | THEAD: 'table', 23 | TR: 'table' 24 | }, 25 | // note: For Firefox < 1.5, OPTION and OPTGROUP tags are currently broken, 26 | // due to a Firefox bug 27 | node: function(elementName) { 28 | elementName = elementName.toUpperCase(); 29 | 30 | // try innerHTML approach 31 | var parentTag = this.NODEMAP[elementName] || 'div'; 32 | var parentElement = document.createElement(parentTag); 33 | try { // prevent IE "feature": http://dev.rubyonrails.org/ticket/2707 34 | parentElement.innerHTML = "<" + elementName + ">"; 35 | } catch(e) {} 36 | var element = parentElement.firstChild || null; 37 | 38 | // see if browser added wrapping tags 39 | if(element && (element.tagName.toUpperCase() != elementName)) 40 | element = element.getElementsByTagName(elementName)[0]; 41 | 42 | // fallback to createElement approach 43 | if(!element) element = document.createElement(elementName); 44 | 45 | // abort if nothing could be created 46 | if(!element) return; 47 | 48 | // attributes (or text) 49 | if(arguments[1]) 50 | if(this._isStringOrNumber(arguments[1]) || 51 | (arguments[1] instanceof Array) || 52 | arguments[1].tagName) { 53 | this._children(element, arguments[1]); 54 | } else { 55 | var attrs = this._attributes(arguments[1]); 56 | if(attrs.length) { 57 | try { // prevent IE "feature": http://dev.rubyonrails.org/ticket/2707 58 | parentElement.innerHTML = "<" +elementName + " " + 59 | attrs + ">"; 60 | } catch(e) {} 61 | element = parentElement.firstChild || null; 62 | // workaround firefox 1.0.X bug 63 | if(!element) { 64 | element = document.createElement(elementName); 65 | for(attr in arguments[1]) 66 | element[attr == 'class' ? 'className' : attr] = arguments[1][attr]; 67 | } 68 | if(element.tagName.toUpperCase() != elementName) 69 | element = parentElement.getElementsByTagName(elementName)[0]; 70 | } 71 | } 72 | 73 | // text, or array of children 74 | if(arguments[2]) 75 | this._children(element, arguments[2]); 76 | 77 | return element; 78 | }, 79 | _text: function(text) { 80 | return document.createTextNode(text); 81 | }, 82 | 83 | ATTR_MAP: { 84 | 'className': 'class', 85 | 'htmlFor': 'for' 86 | }, 87 | 88 | _attributes: function(attributes) { 89 | var attrs = []; 90 | for(attribute in attributes) 91 | attrs.push((attribute in this.ATTR_MAP ? this.ATTR_MAP[attribute] : attribute) + 92 | '="' + attributes[attribute].toString().escapeHTML().gsub(/"/,'"') + '"'); 93 | return attrs.join(" "); 94 | }, 95 | _children: function(element, children) { 96 | if(children.tagName) { 97 | element.appendChild(children); 98 | return; 99 | } 100 | if(typeof children=='object') { // array can hold nodes and text 101 | children.flatten().each( function(e) { 102 | if(typeof e=='object') 103 | element.appendChild(e) 104 | else 105 | if(Builder._isStringOrNumber(e)) 106 | element.appendChild(Builder._text(e)); 107 | }); 108 | } else 109 | if(Builder._isStringOrNumber(children)) 110 | element.appendChild(Builder._text(children)); 111 | }, 112 | _isStringOrNumber: function(param) { 113 | return(typeof param=='string' || typeof param=='number'); 114 | }, 115 | build: function(html) { 116 | var element = this.node('div'); 117 | $(element).update(html.strip()); 118 | return element.down(); 119 | }, 120 | dump: function(scope) { 121 | if(typeof scope != 'object' && typeof scope != 'function') scope = window; //global scope 122 | 123 | var tags = ("A ABBR ACRONYM ADDRESS APPLET AREA B BASE BASEFONT BDO BIG BLOCKQUOTE BODY " + 124 | "BR BUTTON CAPTION CENTER CITE CODE COL COLGROUP DD DEL DFN DIR DIV DL DT EM FIELDSET " + 125 | "FONT FORM FRAME FRAMESET H1 H2 H3 H4 H5 H6 HEAD HR HTML I IFRAME IMG INPUT INS ISINDEX "+ 126 | "KBD LABEL LEGEND LI LINK MAP MENU META NOFRAMES NOSCRIPT OBJECT OL OPTGROUP OPTION P "+ 127 | "PARAM PRE Q S SAMP SCRIPT SELECT SMALL SPAN STRIKE STRONG STYLE SUB SUP TABLE TBODY TD "+ 128 | "TEXTAREA TFOOT TH THEAD TITLE TR TT U UL VAR").split(/\s+/); 129 | 130 | tags.each( function(tag){ 131 | scope[tag] = function() { 132 | return Builder.node.apply(Builder, [tag].concat($A(arguments))); 133 | } 134 | }); 135 | } 136 | } 137 | -------------------------------------------------------------------------------- /http/rapid-app-demo/src/js/scriptaculous.js: -------------------------------------------------------------------------------- 1 | // script.aculo.us scriptaculous.js v1.8.0, Tue Nov 06 15:01:40 +0300 2007 2 | 3 | // Copyright (c) 2005-2007 Thomas Fuchs (http://script.aculo.us, http://mir.aculo.us) 4 | // 5 | // Permission is hereby granted, free of charge, to any person obtaining 6 | // a copy of this software and associated documentation files (the 7 | // "Software"), to deal in the Software without restriction, including 8 | // without limitation the rights to use, copy, modify, merge, publish, 9 | // distribute, sublicense, and/or sell copies of the Software, and to 10 | // permit persons to whom the Software is furnished to do so, subject to 11 | // the following conditions: 12 | // 13 | // The above copyright notice and this permission notice shall be 14 | // included in all copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 17 | // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 18 | // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 19 | // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 20 | // LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 21 | // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 22 | // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 23 | // 24 | // For details, see the script.aculo.us web site: http://script.aculo.us/ 25 | 26 | var Scriptaculous = { 27 | Version: '1.8.0', 28 | require: function(libraryName) { 29 | // inserting via DOM fails in Safari 2.0, so brute force approach 30 | document.write(' 294 | 295 | 296 | {$page-info/x:head-elements/*} 297 | 298 | 299 | { if (fn:string($page-info/x:onload-events) ne "") then attribute onload {fn:string($page-info/x:onload-events)} else () } 300 |
301 | {utility-area($params, $page-info)} 302 |
303 | 309 | {subheader($params, $page-info)} 310 |
311 |
312 | {$content} 313 |
314 |
315 |
316 |
317 | {footer($params, $page-info)} 318 | 319 | 320 | } -------------------------------------------------------------------------------- /http/rapid-app-demo/src/modules/widgets.xqy: -------------------------------------------------------------------------------- 1 | (: 2 | : 3 | : This module is meant to be a reference. Copy widgets into the 4 | : display module to customize. 5 | : 6 | :) 7 | 8 | module "http://www.marklogic.com/ps/versi/widgets" 9 | 10 | declare namespace htm="http://www.w3.org/1999/xhtml" 11 | 12 | (: 13 | : Function List 14 | : block-menu 15 | : drop-nav 16 | : formatted-form 17 | : main-menu-simple 18 | : main-menu-split 19 | : main-menu-quicksearch 20 | : messages 21 | : pagination 22 | : quicksearch 23 | : stack-menu 24 | :) 25 | 26 | (: 27 | The block menu is a 2-level drop down menu that is intended for use in the sidebar. 28 | :) 29 | define function block-menu () 30 | { 31 |
32 |

Topics

33 | 77 |
78 | } 79 | 80 | (: 81 | This is meant to be used inside the