Changeset 36472 for documented-examples
- Timestamp:
- 2022-08-24T17:42:31+12:00 (20 months ago)
- Location:
- documented-examples/trunk
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
documented-examples/trunk/gsarch-e/etc/collectionConfig.xml
r36453 r36472 21 21 <displayItem assigned="true" dictionary="collectionConfig" key="Date" name="Date"/> 22 22 <displayItem assigned="true" dictionary="collectionConfig" key="From" name="From"/> 23 <displayItem assigned="true" dictionary="collectionConfig" key="ReplyTo" name="ReplyTo"/> 23 24 </displayItemList> 24 25 <format/> … … 39 40 <searchType name="simpleform"/> 40 41 <searchType name="advancedform"/> 41 <format> <gsf:template match="documentNode"> 42 <gsf:format-gs2><![CDATA[ 42 <format> 43 <gsf:template match="documentNode"> 44 <gsf:format-gs2><![CDATA[ 43 45 <td valign=top>[link][icon][/link] 44 46 </td> … … 51 53 <br> _Date_: [DateText] 52 54 </td> ]]></gsf:format-gs2> 53 <table> 54 <tr> 55 <td valign="top"> 56 <gsf:link type="document"> 57 <gsf:icon type="document"/> 58 </gsf:link> 59 </td> 60 <td><b><gsf:link type="document"><gsf:metadata name="Subject"/></gsf:link></b><br/><gsf:displayItem name="From"/>:<gsf:metadata name="FromName"/> (<a><xsl:attribute name="href"><xsl:value-of disable-output-escaping="yes" select="/page/pageResponse/interfaceOptions/option[@name='library_name']/@value" />/collection/<xsl:value-of disable-output-escaping="yes" select="/page/pageRequest/paramList/param[@name='c']/@value" />/search/TextQuery?qs=1&rt=rd&s1.level=&startPage=1&s1.index=dfr&s1.query=&quot;<gsf:metadata name="FromName"/>&quot;</xsl:attribute><gsf:displayItem name="SearchBySender"/></a>)<br/><gsf:displayItem name="Date"/>:<gsf:metadata name="DateText"/></td> 61 </tr> 62 </table> 63 </gsf:template> 64 65 </format> 55 <table> 56 <tr> 57 <td valign="top"> 58 <gsf:link type="document"> 59 <gsf:icon type="document"/> 60 </gsf:link> 61 </td> 62 <td><b><gsf:link type="document"><gsf:metadata name="Subject"/></gsf:link></b><br/><gsf:displayItem name="From"/>:<gsf:metadata name="FromName"/> (<a><xsl:attribute name="href"><xsl:value-of disable-output-escaping="yes" select="/page/pageResponse/interfaceOptions/option[@name='library_name']/@value"/>/collection/<xsl:value-of disable-output-escaping="yes" select="/page/pageRequest/paramList/param[@name='c']/@value"/>/search/TextQuery?qs=1&rt=rd&s1.level=&startPage=1&s1.index=dfr&s1.query=&quot;<gsf:metadata name="FromName"/>&quot;</xsl:attribute><gsf:displayItem name="SearchBySender"/></a>)<br/><gsf:displayItem name="Date"/>:<gsf:metadata name="DateText"/></td> 63 </tr> 64 </table> 65 </gsf:template> 66 </format> 66 67 </search> 67 68 <infodb type="gdbm"/> … … 83 84 <option name="-mingroup" value="2"/> 84 85 <option name="-removeprefix" value="(\\s*(?i:re:|fw(d)?:|\&#91;greenstone-(users|devel)\&#93;)\\s*)*"/> 85 <format> <gsf:template match="documentNode"> 86 <gsf:format-gs2><![CDATA[ 86 <format> 87 <gsf:template match="documentNode"> 88 <gsf:format-gs2><![CDATA[ 87 89 <td valign=top>[link][icon][/link] 88 90 </td> … … 97 99 <br> _Date_: [DateText]} 98 100 </td> ]]></gsf:format-gs2> 99 100 101 102 103 104 105 106 107 108 109 110 111 101 <table> 102 <tr> 103 <td valign="top"> 104 <gsf:link type="document"> 105 <gsf:icon type="document"/> 106 </gsf:link> 107 </td> 108 <td><b><gsf:link type="document"><gsf:metadata name="Subject"/></gsf:link></b><br/><gsf:displayItem name="From"/>:<gsf:metadata name="FromName"/> (<a><xsl:attribute name="href"><xsl:value-of disable-output-escaping="yes" select="/page/pageResponse/interfaceOptions/option[@name='library_name']/@value"/>/collection/<xsl:value-of disable-output-escaping="yes" select="/page/pageRequest/paramList/param[@name='c']/@value"/>/search/TextQuery?qs=1&rt=rd&s1.level=&startPage=1&s1.index=dfr&s1.query=&quot;<gsf:metadata name="FromName"/>&quot;</xsl:attribute><gsf:displayItem name="SearchBySender"/></a>)<br/><gsf:displayItem name="Date"/>:<gsf:metadata name="DateText"/></td> 109 </tr> 110 </table> 111 </gsf:template> 112 <gsf:template match="classifierNode"> 113 <gsf:format-gs2><![CDATA[ 112 114 <td valign=top>[link][icon][/link] 113 115 </td> … … 122 124 <br> _Date_: [DateText]} 123 125 </td> ]]></gsf:format-gs2> 124 <table> 125 <tr> 126 <td valign="top"> 127 <gsf:link type="classifier"> 128 <gsf:icon type="classifier"/> 129 </gsf:link> 130 </td> 131 <td> 132 <b> 133 <gsf:metadata name="Title"/> 134 </b> 135 </td> 136 </tr> 137 </table> 138 </gsf:template> 139 140 </format> 126 <table> 127 <tr> 128 <td valign="top"> 129 <gsf:link type="classifier"> 130 <gsf:icon type="classifier"/> 131 </gsf:link> 132 </td> 133 <td> 134 <b> 135 <gsf:metadata name="Title"/> 136 </b> 137 </td> 138 </tr> 139 </table> 140 </gsf:template> 141 </format> 141 142 </classifier> 142 143 <classifier name="AZCompactList"> … … 144 145 <option name="-mingroup" value="2"/> 145 146 <option name="-buttonname" value="From"/> 146 <format> <gsf:template match="documentNode"> 147 <gsf:format-gs2><![CDATA[ 147 <format> 148 <gsf:template match="documentNode"> 149 <gsf:format-gs2><![CDATA[ 148 150 <td valign=top>[link][icon][/link] 149 151 </td> … … 162 164 </strong> [DateText] } 163 165 </td> ]]></gsf:format-gs2> 164 165 166 167 168 169 170 171 172 173 174 175 176 166 <table> 167 <tr> 168 <td valign="top"> 169 <gsf:link type="document"> 170 <gsf:icon type="document"/> 171 </gsf:link> 172 </td> 173 <td><strong><gsf:displayItem name="From"/>:<gsf:metadata name="FromName"/></strong> (<a><xsl:attribute name="href"><xsl:value-of disable-output-escaping="yes" select="/page/pageResponse/interfaceOptions/option[@name='library_name']/@value"/>/collection/<xsl:value-of disable-output-escaping="yes" select="/page/pageRequest/paramList/param[@name='c']/@value"/>/search/TextQuery?qs=1&rt=rd&s1.level=&startPage=1&s1.index=dfr&s1.query=&quot;<gsf:metadata name="FromName"/>&quot;</xsl:attribute><gsf:displayItem name="SearchBySender"/></a>)<br/><strong><gsf:displayItem name="Subject"/>:</strong><gsf:link type="document"><gsf:metadata name="Subject"/></gsf:link><br/><strong><gsf:displayItem name="Date"/>:</strong><gsf:metadata name="DateText"/></td> 174 </tr> 175 </table> 176 </gsf:template> 177 <gsf:template match="classifierNode"> 178 <gsf:format-gs2><![CDATA[ 177 179 <td valign=top>[link][icon][/link] 178 180 </td> … … 191 193 </strong> [DateText] } 192 194 </td> ]]></gsf:format-gs2> 193 <table> 194 <tr> 195 <td valign="top"> 196 <gsf:link type="classifier"> 197 <gsf:icon type="classifier"/> 198 </gsf:link> 199 </td> 200 <td><strong><gsf:displayItem name="From"/>:</strong><gsf:metadata name="Title"/> (<gsf:metadata name="numleafdocs"/>)</td> 201 </tr> 202 </table> 203 </gsf:template> 204 205 </format> 195 <table> 196 <tr> 197 <td valign="top"> 198 <gsf:link type="classifier"> 199 <gsf:icon type="classifier"/> 200 </gsf:link> 201 </td> 202 <td><strong><gsf:displayItem name="From"/>:</strong><gsf:metadata name="Title"/> (<gsf:metadata name="numleafdocs"/>)</td> 203 </tr> 204 </table> 205 </gsf:template> 206 </format> 206 207 </classifier> 207 208 <classifier name="DateList"> 208 209 <option name="-nogroup"/> 209 <format> <gsf:template match="documentNode"> 210 <gsf:format-gs2><![CDATA[ 210 <format> 211 <gsf:template match="documentNode"> 212 <gsf:format-gs2><![CDATA[ 211 213 <td>[link][icon][/link] 212 214 </td> … … 215 217 <td>{Or}{[dc.Date],[exp.Date],[ex.Date]} 216 218 </td>]]></gsf:format-gs2> 217 <td> 218 <gsf:link type="document"> 219 <gsf:icon type="document"/> 220 </gsf:link> 221 </td> 222 <td> 223 <span class="highlight"> 224 <gsf:choose-metadata><gsf:metadata name="dc.Title"/><gsf:metadata name="exp.Title"/><gsf:metadata name="Title"/>Untitled</gsf:choose-metadata> 225 </span> 226 </td> 227 <td> 228 <gsf:choose-metadata> 229 <gsf:metadata name="dc.Date"/> 230 <gsf:metadata name="exp.Date"/> 231 <gsf:metadata name="Date"/> 232 </gsf:choose-metadata> 233 </td> 234 </gsf:template> 235 236 </format> 219 <td> 220 <gsf:link type="document"> 221 <gsf:icon type="document"/> 222 </gsf:link> 223 </td> 224 <td> 225 <span class="highlight"> 226 <gsf:choose-metadata><gsf:metadata name="dc.Title"/><gsf:metadata name="exp.Title"/><gsf:metadata name="Title"/>Untitled</gsf:choose-metadata> 227 </span> 228 </td> 229 <td> 230 <gsf:choose-metadata> 231 <gsf:metadata name="dc.Date"/> 232 <gsf:metadata name="exp.Date"/> 233 <gsf:metadata name="Date"/> 234 </gsf:choose-metadata> 235 </td> 236 </gsf:template> 237 </format> 237 238 </classifier> 238 <format> <gsf:template match="documentNode"> 239 <gsf:format-gs2><![CDATA[ 239 <format> 240 <gsf:template match="documentNode"> 241 <gsf:format-gs2><![CDATA[ 240 242 <td valign="top">[link][icon][/link] 241 243 </td> … … 247 249 </i>} 248 250 </td>]]></gsf:format-gs2> 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 251 <td valign="top"> 252 <gsf:link type="document"> 253 <gsf:icon type="document"/> 254 </gsf:link> 255 </td> 256 <td valign="top"> 257 <gsf:link type="source"> 258 <gsf:choose-metadata> 259 <gsf:metadata name="thumbicon"/> 260 <gsf:metadata name="srcicon"/> 261 </gsf:choose-metadata> 262 </gsf:link> 263 </td> 264 <td valign="top"> 265 <span class="highlight"> 266 <gsf:choose-metadata><gsf:metadata name="dc.Title"/><gsf:metadata name="exp.Title"/><gsf:metadata name="Title"/>Untitled</gsf:choose-metadata> 267 </span> 268 <gsf:switch> 269 <gsf:metadata name="Source"/> 270 <gsf:when test="exists"> 271 <br/> 272 <i>(<gsf:metadata name="Source"/>)</i> 273 </gsf:when> 274 </gsf:switch> 275 </td> 276 </gsf:template> 277 <gsf:template match="classifierNode"> 278 <gsf:format-gs2><![CDATA[ 277 279 <td valign="top">[link][icon][/link] 278 280 </td> … … 284 286 </i>} 285 287 </td>]]></gsf:format-gs2> 286 <td valign="top"> 287 <gsf:link type="classifier"> 288 <gsf:icon type="classifier"/> 289 </gsf:link> 290 </td> 291 <td valign="top"> 292 <gsf:link type="source"> 293 <gsf:choose-metadata> 294 <gsf:metadata name="thumbicon"/> 295 <gsf:metadata name="srcicon"/> 296 </gsf:choose-metadata> 297 </gsf:link> 298 </td> 299 <td valign="top"> 300 <span class="highlight"> 301 <gsf:choose-metadata><gsf:metadata name="dc.Title"/><gsf:metadata name="exp.Title"/><gsf:metadata name="Title"/>Untitled</gsf:choose-metadata> 302 </span> 303 <gsf:switch> 304 <gsf:metadata name="Source"/> 305 <gsf:when test="exists"> 306 <br/> 307 <i>(<gsf:metadata name="Source"/>)</i> 308 </gsf:when> 309 </gsf:switch> 310 </td> 311 </gsf:template> 312 <gsf:template match="classifierNode" mode="horizontal"> 313 <gsf:format-gs2><![CDATA[[link][highlight][ex.Title][/highlight][/link]]]></gsf:format-gs2> 314 <gsf:link type="classifier"> 315 <span class="highlight"> 316 <gsf:metadata name="Title"/> 317 </span> 318 </gsf:link> 319 </gsf:template> 320 321 </format> 288 <td valign="top"> 289 <gsf:link type="classifier"> 290 <gsf:icon type="classifier"/> 291 </gsf:link> 292 </td> 293 <td valign="top"> 294 <gsf:link type="source"> 295 <gsf:choose-metadata> 296 <gsf:metadata name="thumbicon"/> 297 <gsf:metadata name="srcicon"/> 298 </gsf:choose-metadata> 299 </gsf:link> 300 </td> 301 <td valign="top"> 302 <span class="highlight"> 303 <gsf:choose-metadata><gsf:metadata name="dc.Title"/><gsf:metadata name="exp.Title"/><gsf:metadata name="Title"/>Untitled</gsf:choose-metadata> 304 </span> 305 <gsf:switch> 306 <gsf:metadata name="Source"/> 307 <gsf:when test="exists"> 308 <br/> 309 <i>(<gsf:metadata name="Source"/>)</i> 310 </gsf:when> 311 </gsf:switch> 312 </td> 313 </gsf:template> 314 <gsf:template match="classifierNode" mode="horizontal"> 315 <gsf:format-gs2><![CDATA[[link][highlight][ex.Title][/highlight][/link]]]></gsf:format-gs2> 316 <gsf:link type="classifier"> 317 <span class="highlight"> 318 <gsf:metadata name="Title"/> 319 </span> 320 </gsf:link> 321 </gsf:template> 322 </format> 322 323 </browse> 323 324 <display> 324 <format> 325 <gsf:option name="TOC" value="true"/> 326 <gsf:option name="AllowUserComments" value="false"/> 325 <format> <gsf:option name="TOC" value="true"/> 326 <gsf:option name="AllowUserComments" value="false"/> 327 <gsf:template name="documentHeading"> 328 <span style="font-weight:bold; font-size: 120%;"> 329 <table> 330 <tr> 331 <td><gsf:displayItem name="From"/>:Â <gsf:metadata name="FromName"/></td> 332 </tr> 333 <tr> 334 <td><gsf:displayItem name="Date"/>:Â <gsf:metadata name="DateText"/></td> 335 </tr> 336 <tr> 337 <td><gsf:displayItem name="Subject"/>:Â <gsf:metadata name="Subject"/></td> 338 </tr> 339 <gsf:switch><gsf:metadata name='InReplyTo'/><gsf:when test='exists'><tr><td><gsf:displayItem name="ReplyTo"/>:Â <gsf:metadata name="InReplyTo"/></td></tr></gsf:when></gsf:switch> 340 341 </table> 342 </span> 343 </gsf:template> 327 344 <!-- 328 345 Overwriting this template allows you to change the heading of the document. … … 346 363 <xsl:call-template name="documentNodeText"/> 347 364 </div> 365 </div> 348 366 </gsf:template> 349 367 --> … … 374 392 </gsf:template> 375 393 --> 376 </format> 394 395 </format> 377 396 </display> 378 397 <replaceListRef id="gs2-standard"/> 398 <importOption name="groupsize" value="200"/> 379 399 </CollectionConfig> -
documented-examples/trunk/gsarch-e/resources/collectionConfig.properties
r36404 r36472 4 4 Date=Date 5 5 From=From 6 ReplyTo=In reply to 6 7 index_text=Messages 7 8 index_subject=Subject lines … … 12 13 description1=<h3>How the collection works</h3><p>The Greenstone Archives collection uses the <i>Email</i> plugin, which parses files in email formats. In this case, there is a file per month per mailing list, and each file contains many email messages. The <i>Email</i> plugin splits these into individual documents, and produces <i>Title</i>, <i>Subject</i>, <i>From</i>, <i>FromName</i>, <i>FromAddr</i>, <i>Date</i>, <i>DateText</i>, <i>InReplyTo</i>, and optionally <i>Headers</i>, metadata.</p> 13 14 14 description2=<p>The collection configuration file, <tt>etc/collectionConfig.xml</tt> , begins with the specification <i>groupsize 200</i>. This groups documents together into groups of 200. Email collections typically have many small documents, and grouping them together prevents Greenstone's internal file structures from becoming bloated and occupying more disk space than necessary. Notice that the <i>Email</i> plugin first splits the input files up into individual Emails, then <i>groupsize</i> groups them together again. This allows the collection designer to control what is going on.</p>15 description2=<p>The collection configuration file, <tt>etc/collectionConfig.xml</tt> specifies <importOption name="groupsize" value="200"/>. This groups documents together into groups of 200. Email collections typically have many small documents, and grouping them together prevents Greenstone's internal file structures from becoming bloated and occupying more disk space than necessary. Notice that the <i>Email</i> plugin first splits the input files up into individual Emails, then <i>groupsize</i> groups them together again. This allows the collection designer to control what is going on.</p> 15 16 16 17 description3=<p>The <i>indexes</i> line specifies 3 searchable indexes, which can be seen by clicking beside the word "Messages" on the <tt>search page</tt> to reveal a drop-down menu. The first (called <i>Messages</i>) is created from the document text, while the others are formed from <i>From</i> and <i>Subject</i> metadata.</p> … … 22 23 description6=<p>The third classifier is a <i>DateList</i>, which allows selection by month and year.</p> 23 24 24 description7=<p>Finally, the document text is formatted to show the header fields (<i>FromName</i>, <i>DateText</i>, <i>Subject</i>, <i>InReplyTo</i>), followed by the message text (written as <i>lt;gsf:metadata name="rawtext"/></i> in the format statement). <i>FromName</i> is linked to a search on that name, while <i>InReplyTo</i> links to the email message that it refers to.</p>25 description7=<p>Finally, the <tt>documentHeading</tt> is overridden to show the header fields: <i>FromName</i>, <i>DateText</i>, <i>Subject</i>, <i>InReplyTo</i> (as the default documentHeading would not show the <i>InReplyTo</i> Field, nor to label the fields). The default <tt>documentContent</tt> already displays the message text (with the call to <xsl:call-template name="documentNodeText"/>). <i>FromName</i> is linked to a search on that name, while <i>InReplyTo</i> links to the email message that it refers to.</p> -
documented-examples/trunk/isis-e/etc/collectionConfig.xml
r36456 r36472 565 565 </display> 566 566 <replaceListRef id="gs2-standard"/> 567 <importOption name="groupsize" value="100"/> 567 568 </CollectionConfig> -
documented-examples/trunk/isis-e/resources/collectionConfig.properties
r36391 r36472 37 37 description1=<h3>How the collection works</h3><p>The collection configuration file, <tt>etc/collectionConfig.xml</tt> specifies the ISISPlugin plugin, which processes CDS/ISIS databases. These databases have several files, but ISISPlugin uses just three: CDS.fdt (where CDS is the name of the database), containing the field names used in the database, CDF.xrf (a cross-reference file), and CDS.mst, containing the actual records. Whenever ISISPlugin encounters an ".mst" file, it looks for the corresponding ".fdt" and ".xrf" files. In this case the plugin has been given an <i>input_encoding</i> argument because some entries in the database contain extended characters (in a form that was used in early versions of the DOS operating system). It has also been given a subfield separator argument, whose purpose is explained below. The <i>-OIDtype incremental</i> plugin option was used to give identifiers that are consistent across different operating systems (which may not happen with HASH identifiers), so that we can link to a document in this description.</p> 38 38 39 description2=<p>Like the <i>bibliography collection</i>, this collection incorporates a <tt>form-based search interface</tt> that allows fielded searching. This is specified by the line <i>format SearchTypes "form,plain"</i> in the configuration file; the <i>plain</i> argument ensures that there is a plain textual full-text search feature as well (which can be selected from the <tt>Preferences</tt> page). The <i> groupsize 100</i> line puts documents together into groups of 100 (as explained in the <i>bibliography collection</i>).</p>39 description2=<p>Like the <i>bibliography collection</i>, this collection incorporates a <tt>form-based search interface</tt> that allows fielded searching. This is specified by the line <i>format SearchTypes "form,plain"</i> in the configuration file; the <i>plain</i> argument ensures that there is a plain textual full-text search feature as well (which can be selected from the <tt>Preferences</tt> page). The <i><importOption name="groupsize" value="100"/></i> line in the <tt>collectionConfig.xml</tt> file puts documents together into groups of 100 (as explained in the <i>bibliography collection</i>).</p> 40 40 41 41 description3=<p>Some fields in CDS/ISIS databases have subfields. For example, in this case the <i>Imprint</i> field has subfields <i>Imprint.a</i> for place, <i>Imprint.b</i> for publisher and <i>Imprint.c</i> for date. For each field and subfield, ISISPlugin generates a metadata element -- in this case there will be metadata called <i>Imprint^a</i>, <i>Imprint^b</i> and <i>Imprint^c</i>. (There could be a field called just <i>Imprint</i>, although in this case there is not.) ISISPlugin also generates a metadata element called <i>Imprint^all</i> that gives all subfields concatenated together, separated by the character string that was specified as a plugin argument (in this case ", ").</p>
Note:
See TracChangeset
for help on using the changeset viewer.