Mercurial > hg > mpdl-group
comparison software/eXist/webapp/mpdl/query.xql @ 7:5589d865af7a
Erstellung XQL/XSL Applikation
author | Josef Willenborg <jwillenborg@mpiwg-berlin.mpg.de> |
---|---|
date | Tue, 08 Feb 2011 15:16:46 +0100 |
parents | |
children | d6f528ad5d96 |
comparison
equal
deleted
inserted
replaced
6:2396a569e446 | 7:5589d865af7a |
---|---|
1 xquery version "1.0"; | |
2 | |
3 declare namespace request="http://exist-db.org/xquery/request"; | |
4 | |
5 let $attrQueryAuthor := "Monte" | |
6 let $attrQueryTitle := "Mech*" | |
7 let $ftQuery := "quantitas" | |
8 let $ftMorphQuery := "quantitas" | |
9 | |
10 return | |
11 <html> | |
12 <head> | |
13 <title>MPDL project</title> | |
14 <script type="text/javascript"> | |
15 <!-- | |
16 function DateSelection() { | |
17 if (document.formAttrQueryResult.attribute1.selectedIndex == 3) | |
18 document.formAttrQueryResult.relOp1.selectedIndex = 0; | |
19 else | |
20 document.formAttrQueryResult.relOp1.selectedIndex = 1; | |
21 if (document.formAttrQueryResult.attribute2.selectedIndex == 3) | |
22 document.formAttrQueryResult.relOp2.selectedIndex = 0; | |
23 else | |
24 document.formAttrQueryResult.relOp2.selectedIndex = 1; | |
25 } | |
26 function EqualSelection() { | |
27 if (document.formAttrQueryResult.relOp1.selectedIndex == 0) | |
28 document.formAttrQueryResult.attribute1.selectedIndex = 3; | |
29 if (document.formAttrQueryResult.relOp1.selectedIndex == 1 && document.formAttrQueryResult.attribute1.selectedIndex == 3) | |
30 document.formAttrQueryResult.attribute1.selectedIndex = 0; | |
31 if (document.formAttrQueryResult.relOp2.selectedIndex == 0) | |
32 document.formAttrQueryResult.attribute2.selectedIndex = 3; | |
33 if (document.formAttrQueryResult.relOp2.selectedIndex == 1 && document.formAttrQueryResult.attribute2.selectedIndex == 3) | |
34 document.formAttrQueryResult.attribute2.selectedIndex = 0; | |
35 } | |
36 function checkCR(event) { | |
37 var keyCode = event.keyCode | |
38 if (keyCode == 13) | |
39 return false; | |
40 } | |
41 | |
42 --> | |
43 </script> | |
44 </head> | |
45 <body> | |
46 <form name="formAttrQueryResult" action="attribute-query-result.xql" method="get"> | |
47 <input type="hidden" name="query-type" value="none" id="ietype"/> | |
48 <table height="60px"> | |
49 <colgroup> | |
50 <col width="50%"/> | |
51 <col width="30%"/> | |
52 <col width="10%"/> | |
53 <col width="10%"/> | |
54 </colgroup> | |
55 <tr> | |
56 <td align="left" valign="top"> | |
57 <text style="font-weight:bold;font-size:30px">MPDL prototype <a href="info.xql?info=mpdl" onclick="window.open("info.xql?info=mpdl", "InfoWindow", "menubar=no,width=500,height=500,toolbar=no");return false"><img src="images/info.png" valign="bottom" width="18" height="18" border="0" alt="Info MPDL"/></a></text> | |
58 </td> | |
59 <td align="left" valign="top"> | |
60 <a href="info.xql?info=malcolm" onclick="window.open("info.xql?info=malcolm", "InfoWindow", "menubar=no,width=500,height=500,toolbar=no");return false">Dedicated to Dr. Malcolm Hyman</a><br/><text style="margin-left:20px;"></text>† September 4, 2009 | |
61 </td> | |
62 <td align="left" valign="top"> | |
63 <a href="http://exist-db.org"><img alt="powered by eXist" align="right" border="0" src="/resources/powered.gif"/></a> | |
64 </td> | |
65 <td align="left" valign="top"> | |
66 <a href="http://atomic.exist-db.org/blogs/eXist/?id=urn:uuid:e17b7bb6-596e-4d8b-ab35-90bf5fef8884">Release 1.4<br/> | |
67 Nov, 2009</a> | |
68 </td> | |
69 </tr> | |
70 </table> | |
71 <hr/> | |
72 <table> | |
73 <tr> | |
74 <td valign="top" height="60px"> | |
75 <table> | |
76 <tr> | |
77 <td valign="top"><b>Documents:</b></td> | |
78 <td> | |
79 <text style="margin-left:15px;">Archimedes DTD</text><br/> | |
80 <text style="margin-left:15px;">(until 2008)</text> | |
81 </td> | |
82 <td valign="top"> | |
83 <text style="margin-left:1px;"></text><input type="checkbox" name="docbase" value="archimedes" checked="checked"/> | |
84 </td> | |
85 <td> | |
86 <text style="margin-left:20px;">Echo Schema</text><br/> | |
87 <text style="margin-left:20px;">(since 2009)</text> | |
88 </td> | |
89 <td valign="top"> | |
90 <text style="margin-left:1px;"></text><input type="checkbox" name="docbase" value="echo" checked="checked"/> | |
91 </td> | |
92 <td valign="top"><text style="margin-left:40px;"></text><button type="submit" name="browseQuery" onclick="document.getElementById('ietype').value='browse';">Browse</button></td> | |
93 <td valign="top"><a href="info.xql?info=docBases" onclick="window.open("info.xql?info=docBases", "InfoWindow", "menubar=no,width=500,height=500,toolbar=no");return false"><img src="images/info.png" valign="bottom" width="15" height="15" border="0" alt="Info Document bases"/></a></td> | |
94 </tr> | |
95 <tr> | |
96 </tr> | |
97 </table> | |
98 </td> | |
99 </tr> | |
100 | |
101 <tr> | |
102 <td valign="top" height="110px"> | |
103 <table> | |
104 <tr> | |
105 <td> | |
106 <select name="attribute1" onchange="DateSelection()"> | |
107 <option value ="author" selected="true">Author</option> | |
108 <option value ="title">Title</option> | |
109 <option value ="place">Place</option> | |
110 <option value ="date">Year</option> | |
111 <option value ="language">Language</option> | |
112 <option value ="identifier">Identifier/Locator</option> | |
113 <option disabled="disabled">--Echo--</option> | |
114 <option value ="rights">Rights</option> | |
115 <option value ="license">License</option> | |
116 <option value ="accessRights">Access rights</option> | |
117 <option disabled="disabled">--Archimedes--</option> | |
118 <option value ="file">File name</option> | |
119 <option value ="translator">Translator</option> | |
120 <option value ="version">Version</option> | |
121 </select> | |
122 </td> | |
123 <td> | |
124 <select name="relOp1" onchange="EqualSelection()"> | |
125 <option value ="equal"> = </option> | |
126 <option value ="contains" selected="true">contains</option> | |
127 </select> | |
128 </td> | |
129 <td> | |
130 <input type="text" size="40" name="attr-query1" value="{$attrQueryAuthor}" onkeypress="return checkCR(event)"/> | |
131 <button type="submit" name="attributeQuery" onclick="document.getElementById('ietype').value='attribute';">Query</button> | |
132 <a href="info.xql?info=attr" onclick="window.open("info.xql?info=attr", "InfoWindow", "menubar=no,width=500,height=500,toolbar=no");return false"><img src="images/info.png" valign="bottom" width="15" height="15" border="0" alt="Info Attribute search"/></a> | |
133 </td> | |
134 </tr> | |
135 | |
136 <tr> | |
137 <td> | |
138 <table> | |
139 <tr> | |
140 <td> | |
141 <text style="margin-left:10px;"></text> | |
142 </td> | |
143 <td> | |
144 <select name="boolOp"> | |
145 <option value ="and" selected="true">and</option> | |
146 <option value ="or">or</option> | |
147 <option value ="andNot">and not</option> | |
148 </select> | |
149 </td> | |
150 </tr> | |
151 </table> | |
152 </td> | |
153 </tr> | |
154 | |
155 <tr> | |
156 <td> | |
157 <select name="attribute2" onchange="DateSelection()"> | |
158 <option value ="author">Author</option> | |
159 <option value ="title" selected="true">Title</option> | |
160 <option value ="place">Place</option> | |
161 <option value ="date">Year</option> | |
162 <option value ="language">Language</option> | |
163 <option value ="identifier">Identifier/Locator</option> | |
164 <option disabled="disabled">--Echo--</option> | |
165 <option value ="rights">Rights</option> | |
166 <option value ="license">License</option> | |
167 <option value ="accessRights">Access rights</option> | |
168 <option disabled="disabled">--Archimedes--</option> | |
169 <option value ="file">File name</option> | |
170 <option value ="translator">Translator</option> | |
171 <option value ="version">Version</option> | |
172 </select> | |
173 </td> | |
174 <td> | |
175 <select name="relOp2" onchange="EqualSelection()"> | |
176 <option value ="equal"> = </option> | |
177 <option value ="contains" selected="true">contains</option> | |
178 </select> | |
179 </td> | |
180 <td> | |
181 <input type="text" size="40" name="attr-query2" value="{$attrQueryTitle}" onkeypress="return checkCR(event)"/> | |
182 </td> | |
183 </tr> | |
184 </table> | |
185 </td> | |
186 <td/> | |
187 </tr> | |
188 | |
189 <tr> | |
190 <td valign="top" height="50px"> | |
191 <table> | |
192 <tr> | |
193 <td> | |
194 Document contains <input type="text" size="40" name="ft-query" value="{$ftQuery}" onkeypress="return checkCR(event)"/> | |
195 <button type="submit" name="fulltextQuery" onclick="document.getElementById('ietype').value='fulltext';">Query</button> | |
196 </td> | |
197 <td> | |
198 <a href="info.xql?info=fulltext" onclick="window.open("info.xql?info=fulltext", "InfoWindow", "menubar=no,width=500,height=500,toolbar=no");return false"><img src="images/info.png" valign="bottom" width="15" height="15" border="0" alt="Info fulltext search"/></a> | |
199 </td> | |
200 </tr> | |
201 </table> | |
202 </td> | |
203 </tr> | |
204 | |
205 <tr> | |
206 <td valign="top" height="50px"> | |
207 <table> | |
208 <tr> | |
209 <td> | |
210 Document contains morphological <input type="text" size="40" name="ft-morph-query" value="{$ftMorphQuery}" onkeypress="return checkCR(event)"/> | |
211 <select name="language"> | |
212 <option value ="ar">Arabic</option> | |
213 <option value ="zh">Chinese</option> | |
214 <option value ="nl">Dutch</option> | |
215 <option value ="en">English</option> | |
216 <option value ="fr">French</option> | |
217 <option value ="de">German</option> | |
218 <option value ="el">Greek</option> | |
219 <option value ="it">Italian</option> | |
220 <option value ="la" selected="true">Latin</option> | |
221 </select> | |
222 <button type="submit" name="fulltextMorphQuery" onclick="document.getElementById('ietype').value='fulltextMorph';">Query</button> | |
223 </td> | |
224 <td valign="bottom"> | |
225 <a href="info.xql?info=fulltextMorph" onclick="window.open("info.xql?info=fulltextMorph", "InfoWindow", "menubar=no,width=500,height=500,toolbar=no");return false"><img src="images/info.png" width="15" height="15" border="0" alt="Info morphological search"/></a> | |
226 </td> | |
227 </tr> | |
228 <input type="hidden" name="order-by" value="author"/> | |
229 <input type="hidden" name="pn" value="1"/> | |
230 </table> | |
231 </td> | |
232 </tr> | |
233 | |
234 </table> | |
235 <hr/> | |
236 <p/> | |
237 See the <a href="/exist/xquery.xml">eXist XQuery documentation</a> and the <a href="query.xql?_source=yes">XQuery source</a> of this page, if you find a bug <a href="https://itgroup.mpiwg-berlin.mpg.de:8080/tracs/mpdl-project-software/newticket">let us know</a> | |
238 <br/>Last MPDL software update: January, 2011 | |
239 </form> | |
240 </body> | |
241 </html> |