From daf430ce50030c98d278b9db55281ada086b1188 Mon Sep 17 00:00:00 2001 From: martindholmes Date: Mon, 6 Jan 2025 15:52:27 -0800 Subject: [PATCH 01/11] Some small optimizations for small-format devices. --- docs/documentation.css | 31 +++++++++++++++++++++++++------ 1 file changed, 25 insertions(+), 6 deletions(-) diff --git a/docs/documentation.css b/docs/documentation.css index beccafcb..e8d5b4bd 100644 --- a/docs/documentation.css +++ b/docs/documentation.css @@ -137,7 +137,6 @@ table.attList{ } td.odd_label{ vertical-align: top; - width: 15em; font-weight: bold; } td.odd_value{ @@ -149,7 +148,6 @@ table.attDef{ width: 100%; } table.attDef td.odd_label{ - min-width: 10%; vertical-align: top; font-weight: normal; } @@ -352,11 +350,15 @@ span.moduleSpecHead{ font-style: italic; } ul.specList{ - position: relative; - left: -2em; + margin-left: -2em; padding: 0.5em; background-color: #e0e0e0; width: calc(100% + 2em); + @media only screen and (max-width: 768px) { + margin-left: 0; + margin-right: 0.25em; + width: auto; + } } ul.specList li{ list-style: none; @@ -688,6 +690,9 @@ h2{ background-color: white; padding: 0.5em; border: solid 1pt gray; + @media only screen and (max-width: 768px) { + margin-left: 0; + } } h3{ @@ -699,6 +704,13 @@ h3{ background-color: white; padding: 0.25em; border: solid 1pt gray; + @media only screen and (max-width: 768px) { + margin-left: 0; + } +} + +.teidiv2 h3{ + font-size: 1em; } h1.maintitle{ @@ -856,6 +868,7 @@ div.eg{ white-space: pre; background-color: silver; max-width: 35em; + text-wrap: wrap; } div.pre{ @@ -1133,6 +1146,9 @@ tr.label td{ span.label{ font-weight: bold; + @media only screen and (max-width: 768px) { + font-size: 0.8rem; + } } h5{ @@ -1611,9 +1627,12 @@ body{ font-family: georgia, sans-serif; } +div.tei_front{ + padding: 0.25rem 1rem; +} + div.tei_body{ - border-right: solid 1pt black; - border-left: solid 1pt black; + border: solid 1pt black; padding: 1em; background-color: #f9f9f9; } From 742af4e1236f003e21b31c2f3033f09ba0f00f02 Mon Sep 17 00:00:00 2001 From: martindholmes Date: Thu, 9 Jan 2025 14:11:43 -0800 Subject: [PATCH 02/11] Lots of CSS tweaks and some changes to reprocessing of documentation output file for responsiveness. --- docs/documentation.css | 44 +++++++- docs/staticSearch.html | 179 +++++++++++++++++---------------- schema/staticSearch.rng | 2 +- xsl/spiff_up_documentation.xsl | 9 +- 4 files changed, 142 insertions(+), 92 deletions(-) diff --git a/docs/documentation.css b/docs/documentation.css index e8d5b4bd..5554f52b 100644 --- a/docs/documentation.css +++ b/docs/documentation.css @@ -190,6 +190,49 @@ td p{ margin-bottom: 2pt; } + +/* Messing with tables because they're too squashed. */ +td.odd_value{ + width: 100%; +} + +table.attList{ + width: 100%; +} + +ul.attList, ul.attList ul{ + padding-left: 1em; + +} + +table.attList>tbody>tr, table.attDef>tbody>tr{ + display: list; + list-style-type: none; + padding-left: 0; + ul, ol{ + padding-left: 0.25em; + } + >td{ + display: list-item; + margin: 0; + padding: 0; + list-style-type: none; + border: none; + div.pre, pre{ + max-width: 90%; + } + } + table.attDef td+td{ + margin-left: 0.5em; + } +} + +table.wovenodd div.pre, table.wovenodd pre{ + max-width: 90%; +} + + + div.cdata{ white-space: pre; clear: both; @@ -1647,6 +1690,5 @@ a:link, a:visited, a.anchorlink{ table{ border-collapse: collapse; - box-shadow: rgba(50, 50, 93, 0.25) 0px 2px 5px -1px, rgba(0, 0, 0, 0.3) 0px 1px 3px -1px; margin-top: 0.25em; } \ No newline at end of file diff --git a/docs/staticSearch.html b/docs/staticSearch.html index 94f93389..d0b7133c 100644 --- a/docs/staticSearch.html +++ b/docs/staticSearch.html @@ -3,6 +3,7 @@ Project Endings staticSearch Generator (Martin Holmes, Joey Takeda) + @@ -1692,13 +1693,13 @@

Appendix A.1.1 <con
 <content>
- <sequence minOccurs="1" maxOccurs="1">
-  <elementRef key="params"/>
-  <elementRef key="rules" minOccurs="0"/>
-  <elementRef key="contexts" minOccurs="0"/>
-  <elementRef key="excludes" minOccurs="0"/>
-  <elementRef key="filters" minOccurs="0"/>
- </sequence>
+ <sequence minOccurs="1" maxOccurs="1">
+  <elementRef key="params"/>
+  <elementRef key="rules" minOccurs="0"/>
+  <elementRef key="contexts" minOccurs="0"/>
+  <elementRef key="excludes" minOccurs="0"/>
+  <elementRef key="filters" minOccurs="0"/>
+ </sequence>
 </content>
     
@@ -1815,7 +1816,7 @@

Appendix A.1.2 <con
 <content>
- <empty/>
+ <empty/>
 </content>
     
@@ -1874,8 +1875,8 @@

Appendix A.1.3 <con
 <content>
- <elementRef key="context" minOccurs="1"
-  maxOccurs="unbounded"/>
+ <elementRef key="context" minOccurs="1"
+  maxOccurs="unbounded"/>
 </content>
     
@@ -1939,7 +1940,7 @@

Appendix A.1.4 <cre
 <content>
- <dataRef name="boolean"/>
+ <dataRef name="boolean"/>
 </content>
     
@@ -2005,7 +2006,7 @@

Appendix A.1.5 <dic
 <content>
- <dataRef name="anyURI"/>
+ <dataRef name="anyURI"/>
 </content>
     
@@ -2107,7 +2108,7 @@

Appendix A.1.6 <exc
 <content>
- <empty/>
+ <empty/>
 </content>
     
@@ -2166,8 +2167,8 @@

Appendix A.1.7 <exc
 <content>
- <elementRef key="exclude" minOccurs="1"
-  maxOccurs="unbounded"/>
+ <elementRef key="exclude" minOccurs="1"
+  maxOccurs="unbounded"/>
 </content>
     
@@ -2250,8 +2251,8 @@

Appendix A.1.8 <fil
 <content>
- <elementRef key="span" minOccurs="1"
-  maxOccurs="unbounded"/>
+ <elementRef key="span" minOccurs="1"
+  maxOccurs="unbounded"/>
 </content>
     
@@ -2306,8 +2307,8 @@

Appendix A.1.9 <fil
 <content>
- <elementRef key="filter" minOccurs="1"
-  maxOccurs="unbounded"/>
+ <elementRef key="filter" minOccurs="1"
+  maxOccurs="unbounded"/>
 </content>
     
@@ -2366,7 +2367,7 @@

Appendix A.1.10 <kw
 <content>
- <textNode/>
+ <textNode/>
 </content>
     
@@ -2428,7 +2429,7 @@

Appendix A.1.11 <li
 <content>
- <dataRef name="boolean"/>
+ <dataRef name="boolean"/>
 </content>
     
@@ -2495,7 +2496,7 @@

Appendix A.1.12 <ma
 <content>
- <dataRef name="nonNegativeInteger"/>
+ <dataRef name="nonNegativeInteger"/>
 </content>
     
@@ -2558,7 +2559,7 @@

Appendix A.1.13 <ma
 <content>
- <dataRef name="nonNegativeInteger"/>
+ <dataRef name="nonNegativeInteger"/>
 </content>
     
@@ -2622,7 +2623,7 @@

Appendix A.1.14 <mi
 <content>
- <dataRef name="nonNegativeInteger"/>
+ <dataRef name="nonNegativeInteger"/>
 </content>
     
@@ -2687,7 +2688,7 @@

Appendix A.1.15 <ou
 <content>
- <dataRef name="NCName"/>
+ <dataRef name="NCName"/>
 </content>
     
@@ -2741,40 +2742,40 @@

Appendix A.1.16 <pa
 <content>
- <elementRef key="searchFile"/>
- <elementRef key="versionFile"
-  minOccurs="0"/>
- <elementRef key="stemmerFolder"
-  minOccurs="0"/>
- <elementRef key="recurse"/>
- <elementRef key="minWordLength"
-  minOccurs="0"/>
- <elementRef key="scoringAlgorithm"
-  minOccurs="0"/>
- <elementRef key="phrasalSearch"
-  minOccurs="0"/>
- <elementRef key="wildcardSearch"
-  minOccurs="0"/>
- <elementRef key="createContexts"
-  minOccurs="0"/>
- <elementRef key="maxKwicsToHarvest"
-  minOccurs="0"/>
- <elementRef key="maxKwicsToShow"
-  minOccurs="0"/>
- <elementRef key="totalKwicLength"
-  minOccurs="0"/>
- <elementRef key="kwicTruncateString"
-  minOccurs="0"/>
- <elementRef key="stopwordsFile"
-  minOccurs="1" maxOccurs="1"/>
- <elementRef key="dictionaryFile"
-  minOccurs="1" maxOccurs="1"/>
- <elementRef key="outputFolder"
-  minOccurs="0"/>
- <elementRef key="resultsPerPage"
-  minOccurs="0"/>
- <elementRef key="resultsLimit"
-  minOccurs="0"/>
+ <elementRef key="searchFile"/>
+ <elementRef key="versionFile"
+  minOccurs="0"/>
+ <elementRef key="stemmerFolder"
+  minOccurs="0"/>
+ <elementRef key="recurse"/>
+ <elementRef key="minWordLength"
+  minOccurs="0"/>
+ <elementRef key="scoringAlgorithm"
+  minOccurs="0"/>
+ <elementRef key="phrasalSearch"
+  minOccurs="0"/>
+ <elementRef key="wildcardSearch"
+  minOccurs="0"/>
+ <elementRef key="createContexts"
+  minOccurs="0"/>
+ <elementRef key="maxKwicsToHarvest"
+  minOccurs="0"/>
+ <elementRef key="maxKwicsToShow"
+  minOccurs="0"/>
+ <elementRef key="totalKwicLength"
+  minOccurs="0"/>
+ <elementRef key="kwicTruncateString"
+  minOccurs="0"/>
+ <elementRef key="stopwordsFile"
+  minOccurs="1" maxOccurs="1"/>
+ <elementRef key="dictionaryFile"
+  minOccurs="1" maxOccurs="1"/>
+ <elementRef key="outputFolder"
+  minOccurs="0"/>
+ <elementRef key="resultsPerPage"
+  minOccurs="0"/>
+ <elementRef key="resultsLimit"
+  minOccurs="0"/>
 </content>
     
@@ -2841,7 +2842,7 @@

Appendix A.1.17 <ph
 <content>
- <dataRef name="boolean"/>
+ <dataRef name="boolean"/>
 </content>
     
@@ -2894,7 +2895,7 @@

Appendix A.1.18 <re
 <content>
- <dataRef name="boolean"/>
+ <dataRef name="boolean"/>
 </content>
     
@@ -2962,7 +2963,7 @@

Appendix A.1.19 <re
 <content>
- <dataRef name="nonNegativeInteger"/>
+ <dataRef name="nonNegativeInteger"/>
 </content>
     
@@ -3030,7 +3031,7 @@

Appendix A.1.20 <re
 <content>
- <dataRef name="nonNegativeInteger"/>
+ <dataRef name="nonNegativeInteger"/>
 </content>
     
@@ -3124,7 +3125,7 @@

Appendix A.1.21 <ru
 <content>
- <empty/>
+ <empty/>
 </content>
     
@@ -3177,8 +3178,8 @@

Appendix A.1.22 <ru
 <content>
- <elementRef key="rule" minOccurs="1"
-  maxOccurs="unbounded"/>
+ <elementRef key="rule" minOccurs="1"
+  maxOccurs="unbounded"/>
 </content>
     
@@ -3249,16 +3250,16 @@

Appendix A.1.23 <sc
 <content>
- <valList type="closed">
-  <valItem ident="raw">
-   <desc>raw score</desc>
-   <gloss>Default: Calculate the score based off of the weighted number of
-       instances of a term in a text.</gloss>
-  </valItem>
-  <valItem ident="tf-idf">
-   <gloss>Calculate the score based off of the tf-idf scoring algorithm.</gloss>
-  </valItem>
- </valList>
+ <valList type="closed">
+  <valItem ident="raw">
+   <desc>raw score</desc>
+   <gloss>Default: Calculate the score based off of the weighted number of
+       instances of a term in a text.</gloss>
+  </valItem>
+  <valItem ident="tf-idf">
+   <gloss>Calculate the score based off of the tf-idf scoring algorithm.</gloss>
+  </valItem>
+ </valList>
 </content>
     
Legal values are:
@@ -3333,7 +3334,7 @@

Appendix A.1.24 <se
 <content>
- <dataRef name="anyURI"/>
+ <dataRef name="anyURI"/>
 </content>
     
@@ -3410,12 +3411,12 @@

Appendix A.1.25 <sp
 <content>
- <alternate minOccurs="1"
-  maxOccurs="unbounded">
-  <anyElement require="http://www.w3.org/1999/xhtml"
-   minOccurs="0" maxOccurs="unbounded"/>
-  <textNode/>
- </alternate>
+ <alternate minOccurs="1"
+  maxOccurs="unbounded">
+  <anyElement require="http://www.w3.org/1999/xhtml"
+   minOccurs="0" maxOccurs="unbounded"/>
+  <textNode/>
+ </alternate>
 </content>
     
@@ -3500,7 +3501,7 @@

Appendix A.1.26 <st
 <content>
- <dataRef name="NCName"/>
+ <dataRef name="NCName"/>
 </content>
     
@@ -3568,7 +3569,7 @@

Appendix A.1.27 <st
 <content>
- <dataRef name="anyURI"/>
+ <dataRef name="anyURI"/>
 </content>
     
@@ -3631,7 +3632,7 @@

Appendix A.1.28 <to
 <content>
- <dataRef name="nonNegativeInteger"/>
+ <dataRef name="nonNegativeInteger"/>
 </content>
     
@@ -3701,7 +3702,7 @@

Appendix A.1.29 <ve
 <content>
- <dataRef name="anyURI"/>
+ <dataRef name="anyURI"/>
 </content>
     
@@ -3766,7 +3767,7 @@

Appendix A.1.30 <wi
 <content>
- <dataRef name="boolean"/>
+ <dataRef name="boolean"/>
 </content>
     
@@ -3895,7 +3896,7 @@

Appendix A.2.2 att.mat diff --git a/schema/staticSearch.rng b/schema/staticSearch.rng index 139f8f97..3728262d 100644 --- a/schema/staticSearch.rng +++ b/schema/staticSearch.rng @@ -5,7 +5,7 @@ xmlns:xlink="http://www.w3.org/1999/xlink" datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes" ns="http://hcmc.uvic.ca/ns/staticSearch"> - + @@ -66,6 +66,13 @@ ) + + + + + + \ No newline at end of file From 0b7a81c0de15ad1937b32fb52fad8fc6bb71f620 Mon Sep 17 00:00:00 2001 From: martindholmes Date: Sat, 11 Jan 2025 11:45:31 -0800 Subject: [PATCH 03/11] Handle most of the remaining table issues; there are still some nbsp entities that survive to the output, for some reason, but once those are fixed I believe there will be no more horizontal scrolling. --- docs/documentation.css | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/docs/documentation.css b/docs/documentation.css index 5554f52b..fe5fa3e8 100644 --- a/docs/documentation.css +++ b/docs/documentation.css @@ -1665,7 +1665,7 @@ table.border{ color: orange; } -/* Updates 2022 to make our documentation more readable. */ +/* Updates 2022-2024 to make our documentation more readable. */ body{ font-family: georgia, sans-serif; } @@ -1691,4 +1691,22 @@ a:link, a:visited, a.anchorlink{ table{ border-collapse: collapse; margin-top: 0.25em; +} + +section[id]>div.table table>tbody>tr{ + display: list; + list-style-type: none; + padding-left: 0; + border-style: solid; + border-color: gray; + border-width: 1pt 0; + td:first-child{ + padding-top: 0.25em; + margin-top: 0.25em; + font-weight: bold; + text-decoration: underline; + } + td{ + display: list-item; + } } \ No newline at end of file From fcf95d8a693198ccd506121d2c69f2fab1d57d8f Mon Sep 17 00:00:00 2001 From: martindholmes Date: Sat, 11 Jan 2025 13:33:49 -0800 Subject: [PATCH 04/11] Finally no horizontal scrolling. --- docs/documentation.css | 2 +- docs/staticSearch.html | 88 +++++++++++++++++----------------- schema/staticSearch.rng | 2 +- xsl/spiff_up_documentation.xsl | 2 +- 4 files changed, 47 insertions(+), 47 deletions(-) diff --git a/docs/documentation.css b/docs/documentation.css index fe5fa3e8..6bd2305f 100644 --- a/docs/documentation.css +++ b/docs/documentation.css @@ -1693,7 +1693,7 @@ table{ margin-top: 0.25em; } -section[id]>div.table table>tbody>tr{ +section[id] div.table table>tbody>tr{ display: list; list-style-type: none; padding-left: 0; diff --git a/docs/staticSearch.html b/docs/staticSearch.html index d0b7133c..a305b3e1 100644 --- a/docs/staticSearch.html +++ b/docs/staticSearch.html @@ -400,8 +400,8 @@

8.1 Configuring your s

8.1.1 Description filters

The description (desc) filter is a word or phrase describing or associated with the document. Here is a simple example: -
<meta name="Document type"
 class="staticSearch_desccontent="Poems"/>
This specifies that there is to be a descriptive search filter called ‘Document type’, and one of the types is ‘Poems’; the document containing this <meta> tag is one of the Poems. Another type might be: -
<meta name="Document type"
 class="staticSearch_desccontent="Short stories"/>
If the Generator finds such meta tags when it is indexing, it will create a set of +
<meta name="Document type"
class="staticSearch_desc" content="Poems"/>
This specifies that there is to be a descriptive search filter called ‘Document type’, and one of the types is ‘Poems’; the document containing this <meta> tag is one of the Poems. Another type might be: +
<meta name="Document type"
class="staticSearch_desc" content="Short stories"/>
If the Generator finds such meta tags when it is indexing, it will create a set of filter controls on the search page, enabling the user to constrain the search to a specific set of filter settings.
@@ -412,7 +412,7 @@

8.1.1.1 Sort order for the strict alphabetical order of items may not be exactly what you want; you may want to sort ‘305 2’ before ‘305 10’ for example. To deal with cases like this, in addition to the content attribute, you can also supply a custom data-ssfiltersortkey attribute, providing a sort key for each label. Here is are a couple of examples: -
<meta name="Archival series"
 class="staticSearch_descdata-ssfiltersortkey="305_02"
 content="305 2"/>

<meta name="Archival series"
 class="staticSearch_descdata-ssfiltersortkey="305_10"
 content="305 10"/>
In this case, the first item will sort in the filter list before the second item +
<meta name="Archival series"
class="staticSearch_desc" data-ssfiltersortkey="305_02"
content="305 2"/>

<meta name="Archival series"
class="staticSearch_desc" data-ssfiltersortkey="305_10"
content="305 10"/>
In this case, the first item will sort in the filter list before the second item based on the sort key; without it, they would sort in reverse order based on the content attribute. Note that the data-ssfiltersortkey attribute name is all-lower-case, to comply with the XHTML5 schema.

@@ -420,7 +420,7 @@

8.1.1.1 Sort order for

8.1.2 Date filters

Another slightly different kind of search control is a document date. If your collection of documents has items from different dates, you can add a <meta> tag like this: -
<meta name="Date of publication"
 class="staticSearch_datecontent="1895-01-05"/>
The date may take any of the following forms: +
<meta name="Date of publication"
class="staticSearch_date" content="1895-01-05"/>
The date may take any of the following forms:
  • 1895 (year only)
  • 1895-01 (year and month)
  • @@ -439,21 +439,21 @@

    8.1.3 Number filtersYou can also configure a range filter based on a numeric value (integer or decimal). For example, you might want to allow people to filter documents in the search results based on their word-count: -
    <meta name="Word-count"
     class="staticSearch_numcontent="2193"/>
    Users would then be able to set a minimum and/or maximum word-count when searching +
    <meta name="Word-count"
    class="staticSearch_num" content="2193"/>
    Users would then be able to set a minimum and/or maximum word-count when searching for documents.

8.1.4 Boolean filters

A fourth filter type is the boolean (true/false) filter. To use boolean filters, add meta tags like this to your documents: -
<meta name="Peer-reviewed"
 class="staticSearch_boolcontent="true"/>
+
<meta name="Peer-reviewed"
class="staticSearch_bool" content="true"/>

8.1.5 Feature filters

The feature (feat) filter, just like a description filter, is a word or phrase describing or associated with the document. Here is a simple example: -
<meta name="People mentioned"
 class="staticSearch_featcontent="Nelson Mandela"/>
This specifies that there is to be a feature search filter called ‘People mentioned’, and one of the possible people is ‘Nelson Mandela’. This differs from a description filter in that the number of possible people (or +
<meta name="People mentioned"
class="staticSearch_feat" content="Nelson Mandela"/>
This specifies that there is to be a feature search filter called ‘People mentioned’, and one of the possible people is ‘Nelson Mandela’. This differs from a description filter in that the number of possible people (or other feature) is expected to be large. If there are (for example) three hundred people mentioned in the document collection, then using a description filter would result in three hundred checkboxes in the search page; this is clearly impractical. Instead, @@ -461,7 +461,7 @@

8.1.5 Feature filters< the user can type some part of the feature they're searching for, and get a drop-down list of matches. Selecting a match creates a checkbox in the search page, which then functions just like a description filter. Here's another example: -
<meta name="Postcodes mentioned"
 class="staticSearch_featcontent="V8W 1P4"/>
Obviously, a feature filter must be based on data that a searcher will be able to +
<meta name="Postcodes mentioned"
class="staticSearch_feat" content="V8W 1P4"/>
Obviously, a feature filter must be based on data that a searcher will be able to predict. Searchers can also search for names or postcodes using the text search facility, of course, but names might appear in different forms in different texts, so a feature filter allows the user to find all instances of a particular person using the canonical @@ -482,7 +482,7 @@

8.2 Configuring your s part of their document title, but it would be pointless to include this in the search result links. Therefore you can override the document title value by providing another meta tag, like this: -
<meta name="docTitle"
 class="staticSearch_docTitlecontent="What I did in my holidays"/>
+
<meta name="docTitle"
class="staticSearch_docTitle" content="What I did in my holidays"/>

@@ -497,7 +497,7 @@

8.3 Configuring your s which documents without hit scores, or sequences of documents with the same hit score, are presented. You can do this by adding a single meta tag to the document providing a ‘sort key’, which can be used to sort the list of hits. This is an example: -
<meta name="docSortKey"
 class="staticSearch_docSortKeycontent="d_1854-01-02"/>
+
<meta name="docSortKey"
class="staticSearch_docSortKey" content="d_1854-01-02"/>

@@ -507,7 +507,7 @@

8.4 Configuring your s document itself is actually an image (perhaps your site is a set of pages dealing with works of art, for instance). Whatever the reason, you can supply a link to a thumbnail image like this: -
<meta name="docImage"
 class="staticSearch_docImagecontent="images/thisPage.jpg"/>
The content attribute value should either be the path to an image relative to the document itself +
<meta name="docImage"
class="staticSearch_docImage" content="images/thisPage.jpg"/>
The content attribute value should either be the path to an image relative to the document itself or the URL to an external image; so in the example above, there would be a folder called images which is a sibling of the HTML file containing the tag, and that folder would contain a file called thisPage.jpg.

@@ -530,7 +530,7 @@

8.5 Creating a configu

8.5.1 The <config> element

The configuration element has a root <config> element in the staticSearch namespace (http://hcmc.uvic.ca/ns/staticSearch): -
<config xmlns="http://hcmc.uvic.ca/ns/staticSearch">
 <params>
<!--Parameters-->
 </params>
 <rules>
<!--Rules-->
 </rules>
 <contexts>
<!--Contexts-->
 </contexts>
</config>
The <config> element may bear the optional version attribute, which provides the major version number (i.e. a single integer value) +
<config xmlns="http://hcmc.uvic.ca/ns/staticSearch">
<params>
<!--Parameters-->
</params>
<rules>
<!--Rules-->
</rules>
<contexts>
<!--Contexts-->
</contexts>
</config>
The <config> element may bear the optional version attribute, which provides the major version number (i.e. a single integer value) of staticSearch that corresponds with the configuration file.
  • config (The root element for the Search Generator configuration file.) @@ -810,8 +810,8 @@

    8.5.3 Specifying rules
    The <rules> elements specifies a list of conditions (using the <rule> element) that tell the parser, using XPath statements in the match attribute, specific weights to assign to particular parts of each document. For instance, if you wanted all heading elements (<h1>, <h2>, etc) in documents to be given a greater weight and thus receive a higher score in the results, you can do so using a rule like so: -
    <rules>
     <rule weight="2"
      match="h1 | h2 | h3 | h4 | h5 | h6"/>

    </rules>
    Since we're using XPath 3.0 and XSLT 3.0, this can also be simplified to: -
    <rules>
     <rule weight="2"
      match="*[matches(local-name(),'^h\d+$')]"/>

    </rules>
    (It is worth noting, however, the above example is unnecessary: all heading elements +
    <rules>
    <rule weight="2"
    match="h1 | h2 | h3 | h4 | h5 | h6"/>

    </rules>
    Since we're using XPath 3.0 and XSLT 3.0, this can also be simplified to: +
    <rules>
    <rule weight="2"
    match="*[matches(local-name(),'^h\d+$')]"/>

    </rules>
    (It is worth noting, however, the above example is unnecessary: all heading elements are given a weight of 2 by default, which is the only preconfigured weight in staticSearch.)

    The value of the match attribute is transformed in a XSLT template match attribute, and thus must follow the same rules (i.e. no complex rules like p/ancestor::div). See the W3C XSLT Specification for further details on allowable pattern rules.

    @@ -820,8 +820,8 @@

    8.5.3 Specifying rules index its contents on every page. These elements can be ignored simply by using a <rule> and setting its weight to 0. For instance, if you want to remove the header and the footer from the search indexing process, you could write something like: -
    <rule weight="0match="footer | header"/>
    Or if you want to remove XHTML anchor tags (<a>) whose text is identical to the URL specified in its href, you could do something like: -
    <rule weight="0match="a[@href=./text()]"/>
    +
    <rule weight="0" match="footer | header"/>
    Or if you want to remove XHTML anchor tags (<a>) whose text is identical to the URL specified in its href, you could do something like: +
    <rule weight="0" match="a[@href=./text()]"/>

Note that the indexer does not tokenize any content in the <head> of the document (but as noted in 8.1 Configuring your site: search filters, metadata can be configured into filters) and that all elements in the <body> of a document are considered tokenizable. However, common elements that you might want to exclude include:

@@ -858,22 +858,22 @@

8.5.4 Specifying conte
When the staticSearch creates the keywords-in-context strings (the "kwic" or "snippets") for each token, it does so by looking for the nearest block-level element that it can use as its context. Take, for instance, this unordered list: -
<ul>
 <li>Keyword-in-context search results. This is also configurable, since including contexts
   increases the size of the index.</li>
 <li>Search filtering using any metadata you like, allowing users to limit their search - to specific
   document types.</li>
</ul>
Each <li> elements is, by default, a context element, meaning that the snippet generated for each token will not extend beyond +
<ul>
<li>Keyword-in-context search results. This is also configurable, since including contexts
increases the size of the index.</li>
<li>Search filtering using any metadata you like, allowing users to limit their search + to specific
document types.</li>
</ul>
Each <li> elements is, by default, a context element, meaning that the snippet generated for each token will not extend beyond the <li> element boundaries; in this case, if the <li> was not a context attribute, the term ‘search’ would produce a context that looks something like:
"...the size of the index.Search filtering using any metadata you like,..."
Using the <contexts> element, you can control what elements operate as contexts. For instance, say a page contained a marginal note, encoded as a <span> in your document beside its point of attachment:1 -
<p>About that program I shall have nothing to say here,<span class="sidenote">Some information on this subject can be found in "Second Thoughts"</span> [...]
</p>
Using CSS, the footnote might be alongside the text of the document in margin, or +
<p>About that program I shall have nothing to say here,<span class="sidenote">Some information on this subject can be found in "Second Thoughts"</span> [...]
</p>
Using CSS, the footnote might be alongside the text of the document in margin, or made into a clickable object using Javascript. However, since the tokenizer is unaware of any server-side processing, it understands the <span> as an inline element and assumes the <p> constitutes the context of the element. A search for ‘information’ might then return:
"...nothing to say here,Some information on this subject can be found...
To tell the tokenizer that the <span> constitutes the context block for any of its tokens, use the <context> element with an match pattern: -
<contexts>
 <context match="span[contains-token(@class,'sidenote')]"/>
</contexts>
+
<contexts>
<context match="span[contains-token(@class,'sidenote')]"/>
</contexts>
You can also configure it the other way: if a <div>, which is by default a context block, should not be understood as a context block, then you can tell the parser to not consider it as such using context set to false: -
<contexts>
 <context match="divcontext="false"/>
</contexts>
+
<contexts>
<context match="div" context="false"/>
</contexts>

The default context elements are:

    @@ -930,7 +930,7 @@

    8.5.5 Specifying searc users to perform a search within only a particular component of the page. For instance, for a page structured like the journal article mentioned above, we could specify the abstract, the notes, and the document’s body like so: -
    <contexts>
     <context match="article[@id='article_content']"
      label="Article text only"/>

     <context match="div[contains-token(@class,'footnote')]"
      label="Notes only"/>

     <context match="section[@id='abstract']"
      label="Abstracts only"/>

     <context match="span[contains-token(@class,'inline-note')]"
      label="Notes only"/>

    </contexts>
    The generated search page will then contain a set of checkboxes derived from the +
    <contexts>
    <context match="article[@id='article_content']"
    label="Article text only"/>

    <context match="div[contains-token(@class,'footnote')]"
    label="Notes only"/>

    <context match="section[@id='abstract']"
    label="Abstracts only"/>

    <context match="span[contains-token(@class,'inline-note')]"
    label="Notes only"/>

    </contexts>
    The generated search page will then contain a set of checkboxes derived from the distinct label values. There is no requirement for the label values to be distinct, but any identical labels will be treated as identical contexts (i.e. in the example above, searching for a string within "Notes only" will return all results found within both the div elements with a class="footnote" and the span elements with class="inline-note".)

@@ -970,15 +970,15 @@

8.5.6 Specifying exclu contexts and rules. For example, imagine that you are creating a special search page that focuses only on the text describing images or figures in your documents. You might do it like this: -
<rules>
 <rule match="text()[not(ancestor::div[@class='figure']or ancestor::title)]"
  weight="0"/>

</rules>
This specifies that all text nodes which are not part of the document title or descendants +
<rules>
<rule match="text()[not(ancestor::div[@class='figure']or ancestor::title)]"
weight="0"/>

</rules>
This specifies that all text nodes which are not part of the document title or descendants of <div class="figure"> should be ignored (weight=0), so only your target nodes will be indexed.

However, it's also likely that you will want to exclude certain features or documents from a specialized search page, and this is done using the <excludes> section and its child <exclude> elements.

Here is an example: -
<excludes>
<!-- We only index files which have illustrations in them. -->
 <exclude type="index"
  match="html[not(descendant::meta[@name='Has illustration(s)'][@content='true'])]"/>

<!-- We ignore the document type filter, +
<excludes>
<!-- We only index files which have illustrations in them. -->
<exclude type="index"
match="html[not(descendant::meta[@name='Has illustration(s)'][@content='true'])]"/>

<!-- We ignore the document type filter, because we are only indexing one type - of document anyway. -->
 <exclude type="filter"
  match="meta[@name='Document type']"/>

<!-- We exclude the filter that specifies - these documents because it's pointless. -->
 <exclude type="filter"
  match="meta[@name='Has illustration(s)']"/>

</excludes>
Here we use <exclude type="index"/> to specify that all documents which do not contain <meta name="Has illustration(s)" content="true"/>> should be ignored. Then we use two <exclude type="filter"/> tags to specify first that the Document type filter should be ignored (i.e. it should not appear on the search page), and second, + of document anyway. -->

<exclude type="filter"
match="meta[@name='Document type']"/>

<!-- We exclude the filter that specifies + these documents because it's pointless. -->
<exclude type="filter"
match="meta[@name='Has illustration(s)']"/>

</excludes>
Here we use <exclude type="index"/> to specify that all documents which do not contain <meta name="Has illustration(s)" content="true"/>> should be ignored. Then we use two <exclude type="filter"/> tags to specify first that the Document type filter should be ignored (i.e. it should not appear on the search page), and second, that the boolean filter Has illustrations(s) should also be excluded.

Using exclusions, you can create multiple specialized search pages which have customized form controls within the same document collection. This is at the expense of additional @@ -992,11 +992,11 @@

8.6 Creating a search also be well-formed XML, so it can be processed), containing all the site components you need, and then the search build process will insert all the necessary components into that file. The only requirement is that the page contains one <div> element with the correct id attribute: -
<div id="staticSearch">
[...content will be supplied by the build process...]
</div>
This <div> will be empty initially. The build process will find insert the search controls, +
<div id="staticSearch">
[...content will be supplied by the build process...]
</div>
This <div> will be empty initially. The build process will find insert the search controls, scripts and results <div> into this container. Then whenever you rebuild the search for your site, the contents will be replaced. There is no need to make sure it's empty every time.
The search process will also add a link to the staticSearch CSS file to the <head> of the document: -
<link rel="stylesheet"
 href="staticSearch/ssSearch.cssid="ssCss"/>
You can customize this CSS by providing your own CSS that overrides it, using <style>, or <link>, placed after it in the <head> element, or by replacing the inserted CSS after the build process. Note that some +
<link rel="stylesheet"
href="staticSearch/ssSearch.css" id="ssCss"/>
You can customize this CSS by providing your own CSS that overrides it, using <style>, or <link>, placed after it in the <head> element, or by replacing the inserted CSS after the build process. Note that some features, like <resultsPerPage> or the ‘Searching’ loading dialog, rely on rules included in the base staticSearch CSS; if you do remove or disable the CSS, then some features may not work properly.

Note that once your file has been processed and all this content has been added, you @@ -1038,14 +1038,14 @@

8.8 Running staticSear using ssConfig or an absolute path using ssConfigFile). Assuming that the build file, your config file, and your staticSearch directory are all at the root of the project, you could call the staticSearch build in ant like so: -
<ant antfile="${basedir}/staticSearch"
 inheritall="false">

 <property name="ssConfig"
  value="staticSearch_config.xml"/>

</ant>
+
<ant antfile="${basedir}/staticSearch"
inheritall="false">

<property name="ssConfig"
value="staticSearch_config.xml"/>

</ant>
Note that any arguments passed to ant at the command line arguments will be passed on to the staticSearch build. This can cause issues when the main build requires the use of the -lib parameter (since the project's version of Saxon may conflict, for instance, with the version used by staticSearch). If your build requires the use of the -lib parameter, then an alternative approach for calling staticSearch from your build is to use the exec task like so: -
<exec executable="antdir="staticSearch">
 <arg value="-DssConfig=../config_staticSearch.xml"/>
</exec>
+
<exec executable="ant" dir="staticSearch">
<arg value="-DssConfig=../config_staticSearch.xml"/>
</exec>
@@ -1090,18 +1090,18 @@

8.10.1 Custom attribut result string (which is in the form of an HTML <li> element).

Imagine that some of the paragraphs in your documents are special in some way. You could add an attribute whose name begins with data-ss- to each of those paragraphs, like this: -
<p data-ss-type="special">This paragraph is special for some reason or other...</p>
When the staticSearch indexer creates KWIC extracts, it automatically harvests any +
<p data-ss-type="special">This paragraph is special for some reason or other...</p>
When the staticSearch indexer creates KWIC extracts, it automatically harvests any attribute whose name begins with data-ss- from the containing element or its ancestors, and adds them to the keyword-in-context record in the index. Then when that KWIC string is displayed as the result of a search, the attribute will be added to the HTML <li> element on the page: -
<li data-ss-type="special">[KWIC with marked search hit, link, etc.]</li>
This means that you can add your own CSS or JavaScript to make that KWIC appear distinct +
<li data-ss-type="special">[KWIC with marked search hit, link, etc.]</li>
This means that you can add your own CSS or JavaScript to make that KWIC appear distinct from other KWICs which come from non-special paragraphs.

You can add as many custom attributes as you like (although bear in mind that they increase the size of the index JSON files slightly and may add to the build time).

One specific custom attribute has built-in handling that you may find useful. If you add the attribute data-ss-img with a value that points to an image, that image will be displayed to the left of the KWIC string. For example, if you do this: -
<p data-ss-img="images/elephant.png">This paragraph is all about elephants...</p>
then any KWIC results from that paragraph will show the elephant.png image to the left of the KWIC text. This can be especially useful if your site contains +
<p data-ss-img="images/elephant.png">This paragraph is all about elephants...</p>
then any KWIC results from that paragraph will show the elephant.png image to the left of the KWIC text. This can be especially useful if your site contains large documents which are broken into sections, and those sections can be helpfully represented by images; the search results will be easier for the user to understand by virtue of the associated images. Image URLs should be relative to the location @@ -1226,7 +1226,7 @@

10 ‘ How do I get staticSearch to ignore large chunks of my document? Any element with a weight of 0 is ignored completely by the indexer, so add a <rule> for the element. So to ignore all elements with the class ignoreThisElement, you could do something like: -
<rule weight="0"
 match="div[contains-token(@class,'ignoreThisElement')"/>
+
<rule weight="0"
match="div[contains-token(@class,'ignoreThisElement')"/>
@@ -1237,7 +1237,7 @@

10 ‘ How do I get staticSearch to ignore an element, but retain its text in the KWIC? Here, you'll want to use the <exclude> function, which excludes the element from indexing, but doesn't remove it from the document itself. So, if you wanted to exclude all keyboard entry items (<xh:kbd>), but still have them in the KWIC, you could do something like: -
<exclude match="kbd"
 type="index"/>
+
<exclude match="kbd"
type="index"/>
@@ -1475,7 +1475,7 @@

11.6 Changes in versio
  • The encoding structure for docImage, docSortKey, and docTitle has been constrained such that each doc* <meta> must include both a name and class value: -
    <meta name="docTitle"
     class="staticSearch_docTitlecontent="My custom document title"/>
    +
    <meta name="docTitle"
    class="staticSearch_docTitle" content="My custom document title"/>
  • Temporary XML files from dictionaries are now removed during the clean step of the build process.
  • All HTML characters are properly escaped in context snippets.
  • @@ -1653,7 +1653,7 @@

    Appendix A.1.1 <con -
    <config version="1">
     <params>
    <!--Config options-->
     </params>
    </config>
    +
    <config version="1">
    <params>
    <!--Config options-->
    </params>
    </config>
    @@ -1800,13 +1800,13 @@

    Appendix A.1.2 <con Schematron
    - <sch:ns uri="http://hcmc.uvic.ca/ns/staticSearch" -  prefix="ss"/> + <sch:ns uri="http://hcmc.uvic.ca/ns/staticSearch" + prefix="ss"/> <sch:pattern> - <sch:rule context="ss:context"> -  <sch:assert test="not(@label and @context = 'false')"> ERROR: If a context has a - label, it must be a context for the purposes of indexing. -  </sch:assert> + <sch:rule context="ss:context"> + <sch:assert test="not(@label and @context = 'false')"> ERROR: If a context has a label, + it must be a context for the purposes of indexing. + </sch:assert> </sch:rule> </sch:pattern>
    @@ -3896,7 +3896,7 @@

    Appendix A.2.2 att.mat

diff --git a/schema/staticSearch.rng b/schema/staticSearch.rng index 3728262d..aa7d9b43 100644 --- a/schema/staticSearch.rng +++ b/schema/staticSearch.rng @@ -5,7 +5,7 @@ xmlns:xlink="http://www.w3.org/1999/xlink" datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes" ns="http://hcmc.uvic.ca/ns/staticSearch"> - + From 3d5d094794ac93e1833e0951a8de2f66b175d468 Mon Sep 17 00:00:00 2001 From: martindholmes Date: Sat, 11 Jan 2025 13:59:48 -0800 Subject: [PATCH 05/11] List view of tables should only be in narrow format. --- docs/documentation.css | 31 +++++++++++++++++-------------- 1 file changed, 17 insertions(+), 14 deletions(-) diff --git a/docs/documentation.css b/docs/documentation.css index 6bd2305f..c77a6eaa 100644 --- a/docs/documentation.css +++ b/docs/documentation.css @@ -1694,19 +1694,22 @@ table{ } section[id] div.table table>tbody>tr{ - display: list; - list-style-type: none; - padding-left: 0; - border-style: solid; - border-color: gray; - border-width: 1pt 0; - td:first-child{ - padding-top: 0.25em; - margin-top: 0.25em; - font-weight: bold; - text-decoration: underline; - } - td{ - display: list-item; + + @media only screen and (max-width: 768px) { + display: list; + list-style-type: none; + padding-left: 0; + border-style: solid; + border-color: gray; + border-width: 1pt 0; + td:first-child{ + padding-top: 0.25em; + margin-top: 0.25em; + font-weight: bold; + text-decoration: underline; + } + td{ + display: list-item; + } } } \ No newline at end of file From aa12efc547b9cb8f1f0a875e56612dde819f9ef6 Mon Sep 17 00:00:00 2001 From: martindholmes Date: Sat, 11 Jan 2025 14:09:06 -0800 Subject: [PATCH 06/11] Some initial work on the searchable site documentation. --- docs/doc_chapters.css | 17 ++++++++++++++++- docs/documentation.css | 1 - 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/docs/doc_chapters.css b/docs/doc_chapters.css index 690e036a..1ae11b18 100644 --- a/docs/doc_chapters.css +++ b/docs/doc_chapters.css @@ -22,6 +22,12 @@ body.simple{ overflow-y:auto; margin:0 2rem; padding-right:1rem; + @media only screen and (max-width: 768px) { + height: auto; + margin: 0; + padding-right: 0; + position: static; + } } @@ -29,6 +35,11 @@ body.simple{ div.tei_body{ max-width:45vw; margin:0 2rem; + @media only screen and (max-width: 768px) { + max-width: 98vw; + width: 98vw; + margin: 0; + } } div.tei_front > div > ul.toc{ @@ -36,8 +47,12 @@ div.tei_front > div > ul.toc{ } div.tei_body[data-section='schemaSpec']{ - max-width:60vw; + @media only screen and (max-width: 768px) { + max-width: 98vw; + width: 98vw; + margin: 0; + } } div[data-section] > h1 + ul { diff --git a/docs/documentation.css b/docs/documentation.css index c77a6eaa..f7a7d1e1 100644 --- a/docs/documentation.css +++ b/docs/documentation.css @@ -1694,7 +1694,6 @@ table{ } section[id] div.table table>tbody>tr{ - @media only screen and (max-width: 768px) { display: list; list-style-type: none; From e3bf422027e04775ed893bc5d2ca1b1151ac12f7 Mon Sep 17 00:00:00 2001 From: martindholmes Date: Sun, 12 Jan 2025 10:57:46 -0800 Subject: [PATCH 07/11] Tweak the flex order for small-format devices. --- docs/doc_chapters.css | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/docs/doc_chapters.css b/docs/doc_chapters.css index 1ae11b18..1768bec0 100644 --- a/docs/doc_chapters.css +++ b/docs/doc_chapters.css @@ -10,9 +10,12 @@ body.simple{ .tei_front{ flex: 0 1 30vw; - font-size:0.95em; - + @media only screen and (max-width: 768px) { + order: 2; + width: 100%; + flex: auto; + } } .tei_front > div { @@ -39,6 +42,7 @@ div.tei_body{ max-width: 98vw; width: 98vw; margin: 0; + order: 1; } } From 30e2b31984a98592b5f130e7979a3ab593bdbea5 Mon Sep 17 00:00:00 2001 From: martindholmes Date: Fri, 17 Jan 2025 10:16:44 -0800 Subject: [PATCH 08/11] Rebuild of docs. --- docs/staticSearch.html | 8 ++-- schema/staticSearch.rng | 92 ++++++++++++----------------------------- 2 files changed, 31 insertions(+), 69 deletions(-) diff --git a/docs/staticSearch.html b/docs/staticSearch.html index a305b3e1..7e2590c0 100644 --- a/docs/staticSearch.html +++ b/docs/staticSearch.html @@ -560,7 +560,7 @@

8.5.2.1 Required param Note that this page must be at the root of the collection directory.)
  • recurse (Whether to recurse into subdirectories of the collection directory or not.)
  • stopwordsFile (The relative path (from the config file) to a text file containing a list of stopwords - (words to be ignored when indexing). )
  • + (words to be ignored when indexing).)
  • dictionaryFile (The relative path (from the config file) to a dictionary file (one word per line) which will be used to check tokens when indexing.)
  • @@ -2919,7 +2919,7 @@

    Appendix A.1.19 <re an error; if the number of documents in a result set exceeds this number, then staticSearch will not render the results and will provide a message saying that the search returned too many results. This is usually set to 2000 by default, but you may want to have - a higher or lower limit, depending on the specific structure of your project. ) + a higher or lower limit, depending on the specific structure of your project.) Namespace @@ -3522,7 +3522,7 @@

    Appendix A.1.27 <st + (words to be ignored when indexing).) @@ -3896,7 +3896,7 @@

    Appendix A.2.2 att.mat diff --git a/schema/staticSearch.rng b/schema/staticSearch.rng index aa7d9b43..9e52dc3a 100644 --- a/schema/staticSearch.rng +++ b/schema/staticSearch.rng @@ -5,7 +5,7 @@ xmlns:xlink="http://www.w3.org/1999/xlink" datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes" ns="http://hcmc.uvic.ca/ns/staticSearch"> diff --git a/schema/staticSearch.rng b/schema/staticSearch.rng index 9e52dc3a..adb9b047 100644 --- a/schema/staticSearch.rng +++ b/schema/staticSearch.rng @@ -5,7 +5,7 @@ xmlns:xlink="http://www.w3.org/1999/xlink" datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes" ns="http://hcmc.uvic.ca/ns/staticSearch"> Home Feedback 
    Martin Holmes and Joey Takeda. Date: 2019-2025
    diff --git a/schema/staticSearch.odd b/schema/staticSearch.odd index b9f41dc6..8be769b6 100644 --- a/schema/staticSearch.odd +++ b/schema/staticSearch.odd @@ -1156,7 +1156,7 @@ How do I get staticSearch to ignore large chunks of my document? Any element with a weight of 0 is ignored completely by the indexer, so add a rule for the element. So to ignore all elements with the class ignoreThisElement, you could do something like: - + diff --git a/schema/staticSearch.rng b/schema/staticSearch.rng index adb9b047..24e84269 100644 --- a/schema/staticSearch.rng +++ b/schema/staticSearch.rng @@ -5,14 +5,11 @@ xmlns:xlink="http://www.w3.org/1999/xlink" datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes" ns="http://hcmc.uvic.ca/ns/staticSearch"> - @@ -35,7 +32,7 @@ TEI Edition Location: https://www.tei-c.org/Vault/P5/4.8.1/ - + span descendants must be in the namespaces @@ -393,4 +390,58 @@ TEI Edition Location: https://www.tei-c.org/Vault/P5/4.8.1/ + + + + + + diff --git a/schema/staticSearch.sch b/schema/staticSearch.sch index 03d642a7..18f73c4d 100644 --- a/schema/staticSearch.sch +++ b/schema/staticSearch.sch @@ -2,12 +2,6 @@ - + + + + + + + id="d9e3450-constraint"> span descendants must be in the namespaces From 86299abdf53d4c45d159a3a473152f8684c49475 Mon Sep 17 00:00:00 2001 From: martindholmes Date: Sun, 2 Feb 2025 15:13:50 -0800 Subject: [PATCH 11/11] Final tweaks to small-format display. --- docs/documentation.css | 28 ++++- docs/staticSearch.html | 262 ++++++++++++++++++++-------------------- schema/staticSearch.odd | 9 +- schema/staticSearch.rng | 4 +- schema/staticSearch.sch | 2 +- 5 files changed, 163 insertions(+), 142 deletions(-) diff --git a/docs/documentation.css b/docs/documentation.css index 0bd98740..a6620a05 100644 --- a/docs/documentation.css +++ b/docs/documentation.css @@ -520,7 +520,7 @@ span.specChildModule{ div.specChild{ margin-bottom: 4pt; margin-left: 25px; - text-indent: -30px; + text-indent: -20px; } span.emptySlash::after{ content: "/"; @@ -1683,6 +1683,15 @@ div.tei_body{ background-color: #f9f9f9; } +div.tei_back{ + @media only screen and (max-width: 768px) { + max-width: 92vw; + padding: 0.2em 1vw; + margin-left: auto; + margin-right: auto; + } +} + div.tei_body>nav{ max-width: 43vw; } @@ -1696,7 +1705,20 @@ table{ margin-top: 0.25em; } -section[id] div.table table>tbody>tr{ +li.item div.table{ + @media only screen and (max-width: 768px) { + tr{ + display: list; + border-bottom: solid 1pt gray; + td{ + display: list-item; + list-style-type: none; + } + } + } +} + +/* section[id] div.table table>tbody>tr{ @media only screen and (max-width: 768px) { display: list; list-style-type: none; @@ -1713,4 +1735,4 @@ section[id] div.table table>tbody>tr{ display: list-item; } } -} \ No newline at end of file +} */ diff --git a/docs/staticSearch.html b/docs/staticSearch.html index f54b8e6c..a7f37341 100644 --- a/docs/staticSearch.html +++ b/docs/staticSearch.html @@ -975,10 +975,11 @@

    8.5.6 Specifying exclu

    However, it's also likely that you will want to exclude certain features or documents from a specialized search page, and this is done using the <excludes> section and its child <exclude> elements.

    Here is an example: -
    <excludes>
    <!-- We only index files which have illustrations in them. -->
    <exclude type="index"
    match="html[not(descendant::meta[@name='Has illustration(s)'][@content='true'])]"/>

    <!-- We ignore the document type filter, +
    <excludes>
    <!-- We only index files which have illustrations in them. -->
    <exclude type="index"
    match="html [not( descendant::meta [@name='Has illustration(s)'] [@content='true'] + )]"/>

    <!-- We ignore the document type filter, because we are only indexing one type - of document anyway. -->
    <exclude type="filter"
    match="meta[@name='Document type']"/>

    <!-- We exclude the filter that specifies - these documents because it's pointless. -->
    <exclude type="filter"
    match="meta[@name='Has illustration(s)']"/>

    </excludes>
    Here we use <exclude type="index"/> to specify that all documents which do not contain <meta name="Has illustration(s)" content="true"/>> should be ignored. Then we use two <exclude type="filter"/> tags to specify first that the Document type filter should be ignored (i.e. it should not appear on the search page), and second, + of document anyway. -->

    <exclude type="filter"
    match="meta[ @name='Document type' ]"/>

    <!-- We exclude the filter that specifies + these documents because it's pointless. -->
    <exclude type="filter"
    match="meta[ @name='Has illustration(s)' ]"/>

    </excludes>
    Here we use <exclude type="index"/> to specify that all documents which do not contain <meta name="Has illustration(s)" content="true"/>> should be ignored. Then we use two <exclude type="filter"/> tags to specify first that the Document type filter should be ignored (i.e. it should not appear on the search page), and second, that the boolean filter Has illustrations(s) should also be excluded.

    Using exclusions, you can create multiple specialized search pages which have customized form controls within the same document collection. This is at the expense of additional @@ -1264,8 +1265,7 @@

    10
    export ANT_OPTS="-Xmx4g"; ant -DjavaFork=false -DssConfigFile=/absolute/path/to/your/config.xml
    How much memory you can and should provide to Ant depends on your particular system and the size of the document collection. See Ant's documentation for some further examples and explanation. The javaFork parameter prevents calls to Java processes (such as Saxon) from forking into a new Java VM, which allows them - to take advantage of the expanded memory you have assigned to Ant. -
    This + to take advantage of the expanded memory you have assigned to Ant.

    <stopwordsFile> (The relative path (from the config file) to a text file containing a list of stopwords - (words to be ignored when indexing). )
    Namespace

    @@ -1295,7 +1295,7 @@

    11.1 Changes in versio <verbose> The verbose option has been removed and replaced by the ssVerbose property in ant. To get debugging messages, set the ssVerbose parameter to true (other accepted values: t, yes, y, 1) -
    ant -DssConfig=cfg.xml -DssVerbose=true 
    +
    ant -DssConfig=cfg.xml -DssVerbose=true 
    @@ -1310,7 +1310,7 @@

    11.1 Changes in versio fragment with an id, has been made part of the default behaviour of staticSearch and is no longer configurable. However, if you do not want the link to the nearest fragment to appear in the results, you can visually hide the link element with the fidLink class in your site's CSS: -
    .fidLink{ display:none; } 
    +
    .fidLink{ display:none; } 
    @@ -1377,7 +1377,7 @@

    11.5 Changes in versio
  • The staticSearch report has been simplified and no longer produces a concordance of stems by default. The concordance can be built at the command line by calling the concordance target in ant: -
    ant concordance -DssConfig=cfg.xml
    +
    ant concordance -DssConfig=cfg.xml
  • The version attribute has been added to the root <config> element to better future-proof the alignment of configuration files and the staticSearch codebase. See 8.5.1 The config element for more details.
  • @@ -1475,7 +1475,7 @@

    11.6 Changes in versio
    • The encoding structure for docImage, docSortKey, and docTitle has been constrained such that each doc* <meta> must include both a name and class value: -
      <meta name="docTitle"
      class="staticSearch_docTitle" content="My custom document title"/>
      +
      <meta name="docTitle"
      class="staticSearch_docTitle" content="My custom document title"/>
    • Temporary XML files from dictionaries are now removed during the clean step of the build process.
    • All HTML characters are properly escaped in context snippets.
    • @@ -1653,7 +1653,7 @@

      Appendix A.1.1 <con -
      <config version="1">
      <params>
      <!--Config options-->
      </params>
      </config>
      +
      <config version="1">
      <params>
      <!--Config options-->
      </params>
      </config>
      @@ -1691,7 +1691,7 @@

      Appendix A.1.1 <con Content model -
      +                              
       <content>
        <sequence minOccurs="1" maxOccurs="1">
         <elementRef key="params"/>
      @@ -1701,18 +1701,18 @@ 

      Appendix A.1.1 <con <elementRef key="filters" minOccurs="0"/> </sequence> </content> -

      +
      Schema Declaration -
      +                              
       element config
       {
          attribute version { text }?,
          ( params, rules?, contexts?, excludes?, filters? )
      -}
      +}
      @@ -1814,24 +1814,24 @@

      Appendix A.1.2 <con Content model -
      +                              
       <content>
        <empty/>
       </content>
      -    
      +
      Schema Declaration -
      +                              
       element context
       {
          att.match.attributes,
          att.labelled.attributes,
          attribute context { text }?,
          empty
      -}
      +}
      @@ -1873,19 +1873,19 @@

      Appendix A.1.3 <con Content model -
      +                              
       <content>
        <elementRef key="context" minOccurs="1"
         maxOccurs="unbounded"/>
       </content>
      -    
      +
      Schema Declaration -
      -element contexts { context+ }
      +
      +element contexts { context+ }
      @@ -1938,18 +1938,18 @@

      Appendix A.1.4 <cre Content model -
      +                              
       <content>
        <dataRef name="boolean"/>
       </content>
      -    
      +
      Schema Declaration -
      -element createContexts { xsd:boolean }
      +
      +element createContexts { xsd:boolean }
      @@ -2004,18 +2004,18 @@

      Appendix A.1.5 <dic Content model -
      +                              
       <content>
        <dataRef name="anyURI"/>
       </content>
      -    
      +
      Schema Declaration -
      -element dictionaryFile { xsd:anyURI }
      +
      +element dictionaryFile { xsd:anyURI }
      @@ -2106,23 +2106,23 @@

      Appendix A.1.6 <exc Content model -
      +                              
       <content>
        <empty/>
       </content>
      -    
      +
      Schema Declaration -
      +                              
       element exclude
       {
          att.match.attributes,
          attribute type { "index" | "filter" },
          empty
      -}
      +}
      @@ -2165,19 +2165,19 @@

      Appendix A.1.7 <exc Content model -
      +                              
       <content>
        <elementRef key="exclude" minOccurs="1"
         maxOccurs="unbounded"/>
       </content>
      -    
      +
      Schema Declaration -
      -element excludes { exclude+ }
      +
      +element excludes { exclude+ }
      @@ -2249,19 +2249,19 @@

      Appendix A.1.8 <fil Content model -
      +                              
       <content>
        <elementRef key="span" minOccurs="1"
         maxOccurs="unbounded"/>
       </content>
      -    
      +
      Schema Declaration -
      -element filter { attribute filterName { text }, span+ }
      +
      +element filter { attribute filterName { text }, span+ }
      @@ -2305,19 +2305,19 @@

      Appendix A.1.9 <fil Content model -
      +                              
       <content>
        <elementRef key="filter" minOccurs="1"
         maxOccurs="unbounded"/>
       </content>
      -    
      +
      Schema Declaration -
      -element filters { filter+ }
      +
      +element filters { filter+ }
      @@ -2365,18 +2365,18 @@

      Appendix A.1.10 <kw Content model -
      +                              
       <content>
        <textNode/>
       </content>
      -    
      +
      Schema Declaration -
      -element kwicTruncateString { text }
      +
      +element kwicTruncateString { text }
      @@ -2427,18 +2427,18 @@

      Appendix A.1.11 <li Content model -
      +                              
       <content>
        <dataRef name="boolean"/>
       </content>
      -    
      +
      Schema Declaration -
      -element linkToFragmentId { xsd:boolean }
      +
      +element linkToFragmentId { xsd:boolean }
      @@ -2494,18 +2494,18 @@

      Appendix A.1.12 <ma Content model -
      +                              
       <content>
        <dataRef name="nonNegativeInteger"/>
       </content>
      -    
      +
      Schema Declaration -
      -element maxKwicsToHarvest { xsd:nonNegativeInteger }
      +
      +element maxKwicsToHarvest { xsd:nonNegativeInteger }
      @@ -2557,18 +2557,18 @@

      Appendix A.1.13 <ma Content model -
      +                              
       <content>
        <dataRef name="nonNegativeInteger"/>
       </content>
      -    
      +
      Schema Declaration -
      -element maxKwicsToShow { xsd:nonNegativeInteger }
      +
      +element maxKwicsToShow { xsd:nonNegativeInteger }
      @@ -2621,18 +2621,18 @@

      Appendix A.1.14 <mi Content model -
      +                              
       <content>
        <dataRef name="nonNegativeInteger"/>
       </content>
      -    
      +
      Schema Declaration -
      -element minWordLength { xsd:nonNegativeInteger }
      +
      +element minWordLength { xsd:nonNegativeInteger }
      @@ -2686,18 +2686,18 @@

      Appendix A.1.15 <ou Content model -
      +                              
       <content>
        <dataRef name="NCName"/>
       </content>
      -    
      +
      Schema Declaration -
      -element outputFolder { xsd:NCName }
      +
      +element outputFolder { xsd:NCName }
      @@ -2740,7 +2740,7 @@

      Appendix A.1.16 <pa Content model -
      +                              
       <content>
        <elementRef key="searchFile"/>
        <elementRef key="versionFile"
      @@ -2777,14 +2777,14 @@ 

      Appendix A.1.16 <pa <elementRef key="resultsLimit" minOccurs="0"/> </content> -

      +
      Schema Declaration -
      -element params {  }
      +
      +element params {  }
      @@ -2840,18 +2840,18 @@

      Appendix A.1.17 <ph Content model -
      +                              
       <content>
        <dataRef name="boolean"/>
       </content>
      -    
      +
      Schema Declaration -
      -element phrasalSearch { xsd:boolean }
      +
      +element phrasalSearch { xsd:boolean }
      @@ -2893,18 +2893,18 @@

      Appendix A.1.18 <re Content model -
      +                              
       <content>
        <dataRef name="boolean"/>
       </content>
      -    
      +
      Schema Declaration -
      -element recurse { xsd:boolean }
      +
      +element recurse { xsd:boolean }
      @@ -2961,18 +2961,18 @@

      Appendix A.1.19 <re Content model -
      +                              
       <content>
        <dataRef name="nonNegativeInteger"/>
       </content>
      -    
      +
      Schema Declaration -
      -element resultsLimit { xsd:nonNegativeInteger }
      +
      +element resultsLimit { xsd:nonNegativeInteger }
      @@ -3029,18 +3029,18 @@

      Appendix A.1.20 <re Content model -
      +                              
       <content>
        <dataRef name="nonNegativeInteger"/>
       </content>
      -    
      +
      Schema Declaration -
      -element resultsPerPage { xsd:nonNegativeInteger }
      +
      +element resultsPerPage { xsd:nonNegativeInteger }
      @@ -3123,18 +3123,18 @@

      Appendix A.1.21 <ru Content model -
      +                              
       <content>
        <empty/>
       </content>
      -    
      +
      Schema Declaration -
      -element rule { att.match.attributes, attribute weight { text }, empty }
      +
      +element rule { att.match.attributes, attribute weight { text }, empty }
      @@ -3176,19 +3176,19 @@

      Appendix A.1.22 <ru Content model -
      +                              
       <content>
        <elementRef key="rule" minOccurs="1"
         maxOccurs="unbounded"/>
       </content>
      -    
      +
      Schema Declaration -
      -element rules { rule+ }
      +
      +element rules { rule+ }
      @@ -3248,7 +3248,7 @@

      Appendix A.1.23 <sc Content model -
      +                              
       <content>
        <valList type="closed">
         <valItem ident="raw">
      @@ -3261,7 +3261,7 @@ 

      Appendix A.1.23 <sc </valItem> </valList> </content> -

      Legal values are: +
      Legal values are:
      raw
      (Default: Calculate the score based off of the weighted number of instances of a term @@ -3274,8 +3274,8 @@

      Appendix A.1.23 <sc Schema Declaration -
      -element scoringAlgorithm { "raw" | "tf-idf" }
      Legal values are: +
      +element scoringAlgorithm { "raw" | "tf-idf" }
      Legal values are:
      raw
      (Default: Calculate the score based off of the weighted number of instances of a term @@ -3332,18 +3332,18 @@

      Appendix A.1.24 <se Content model -
      +                              
       <content>
        <dataRef name="anyURI"/>
       </content>
      -    
      +
      Schema Declaration -
      -element searchFile { xsd:anyURI }
      +
      +element searchFile { xsd:anyURI }
      @@ -3409,7 +3409,7 @@

      Appendix A.1.25 <sp Content model -
      +                              
       <content>
        <alternate minOccurs="1"
         maxOccurs="unbounded">
      @@ -3418,14 +3418,14 @@ 

      Appendix A.1.25 <sp <textNode/> </alternate> </content> -

      +
      Schema Declaration -
      -element span { attribute lang { text }?, ( anyElement_span_1* | text )+ }
      +
      +element span { attribute lang { text }?, ( anyElement_span_1* | text )+ }
      @@ -3499,18 +3499,18 @@

      Appendix A.1.26 <st Content model -
      +                              
       <content>
        <dataRef name="NCName"/>
       </content>
      -    
      +
      Schema Declaration -
      -element stemmerFolder { xsd:NCName }
      +
      +element stemmerFolder { xsd:NCName }
      @@ -3567,18 +3567,18 @@

      Appendix A.1.27 <st Content model -
      +                              
       <content>
        <dataRef name="anyURI"/>
       </content>
      -    
      +
      Schema Declaration -
      -element stopwordsFile { xsd:anyURI }
      +
      +element stopwordsFile { xsd:anyURI }
      @@ -3630,18 +3630,18 @@

      Appendix A.1.28 <to Content model -
      +                              
       <content>
        <dataRef name="nonNegativeInteger"/>
       </content>
      -    
      +
      Schema Declaration -
      -element totalKwicLength { xsd:nonNegativeInteger }
      +
      +element totalKwicLength { xsd:nonNegativeInteger }
      @@ -3700,18 +3700,18 @@

      Appendix A.1.29 <ve Content model -
      +                              
       <content>
        <dataRef name="anyURI"/>
       </content>
      -    
      +
      Schema Declaration -
      -element versionFile { xsd:anyURI }
      +
      +element versionFile { xsd:anyURI }
      @@ -3765,18 +3765,18 @@

      Appendix A.1.30 <wi Content model -
      +                              
       <content>
        <dataRef name="boolean"/>
       </content>
      -    
      +
      Schema Declaration -
      -element wildcardSearch { xsd:boolean }
      +
      +element wildcardSearch { xsd:boolean }
      @@ -3896,7 +3896,7 @@

      Appendix A.2.2 att.mat diff --git a/schema/staticSearch.odd b/schema/staticSearch.odd index 8be769b6..3fc5b54f 100644 --- a/schema/staticSearch.odd +++ b/schema/staticSearch.odd @@ -781,16 +781,16 @@ + match="html [not( descendant::meta [@name='Has illustration(s)'] [@content='true'] )]"/> - + - + @@ -1201,8 +1201,7 @@ The javaFork parameter prevents calls to Java processes (such as Saxon) from forking into a new Java VM, which allows them to take advantage of the expanded memory you have assigned to Ant. - - This + diff --git a/schema/staticSearch.rng b/schema/staticSearch.rng index 24e84269..21b7c9ad 100644 --- a/schema/staticSearch.rng +++ b/schema/staticSearch.rng @@ -5,7 +5,7 @@ xmlns:xlink="http://www.w3.org/1999/xlink" datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes" ns="http://hcmc.uvic.ca/ns/staticSearch">