diff --git a/docs/doc_chapters.css b/docs/doc_chapters.css index 690e036a..bbe7ada1 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: 3; + width: 100%; + flex: auto; + } } .tei_front > div { @@ -22,6 +25,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 +38,15 @@ body.simple{ div.tei_body{ max-width:45vw; margin:0 2rem; + @media only screen and (max-width: 768px) { + max-width: 96vw; + width: 96vw; + margin: 0; + order: 1; + } +} +div.notes{ + order: 2; } div.tei_front > div > ul.toc{ @@ -36,8 +54,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: 96vw; + width: 96vw; + margin: 0; + } } div[data-section] > h1 + ul { @@ -83,7 +105,17 @@ h3{ margin-left:0; } - +/* Fix width of examples for small-format devices. */ +@media only screen and (max-width: 768px) { + pre, div.pre, div.pre_eg, pre.eg, div.eg { + max-width: 85vw; + } + td{ + pre, div.pre, div.pre_eg, pre.eg, div.eg { + max-width: 55vw + } + } +} div.notes, diff --git a/docs/documentation.css b/docs/documentation.css index beccafcb..a6620a05 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; } @@ -192,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; @@ -352,11 +393,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; @@ -475,7 +520,7 @@ span.specChildModule{ div.specChild{ margin-bottom: 4pt; margin-left: 25px; - text-indent: -30px; + text-indent: -20px; } span.emptySlash::after{ content: "/"; @@ -688,6 +733,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 +747,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 +911,7 @@ div.eg{ white-space: pre; background-color: silver; max-width: 35em; + text-wrap: wrap; } div.pre{ @@ -878,6 +934,9 @@ div.egXML_invalid{ /* table of contents */ ul.toc{ list-style: none; + @media only screen and (max-width: 768px) { + padding-left: 1em; + } } li.toc{ list-style: none; @@ -1133,6 +1192,9 @@ tr.label td{ span.label{ font-weight: bold; + @media only screen and (max-width: 768px) { + font-size: 0.8rem; + } } h5{ @@ -1606,18 +1668,30 @@ 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; } +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; } +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; } @@ -1628,6 +1702,37 @@ 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 +} + +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; + 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; + } + } +} */ diff --git a/docs/staticSearch.html b/docs/staticSearch.html index 94f93389..a7f37341 100644 --- a/docs/staticSearch.html +++ b/docs/staticSearch.html @@ -3,6 +3,7 @@ Project Endings staticSearch Generator (Martin Holmes, Joey Takeda) + @@ -399,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.
@@ -411,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.

@@ -419,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)
  • @@ -438,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, @@ -460,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 @@ -481,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"/>

@@ -496,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"/>

@@ -506,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.

@@ -529,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.) @@ -559,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.)
@@ -809,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.

@@ -819,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:

@@ -857,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,..."
+
"...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>
+
"...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>
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:

    @@ -929,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".)

@@ -969,15 +970,16 @@

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 @@ -991,11 +993,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 @@ -1015,7 +1017,7 @@

8.7 Running the search

Before running the search on your own site, you can test that your system is able to do the build by doing the (very quick) build of the test materials. If you simply run the ant command, like this:

-
mholmes@linuxbox:~/Documents/staticSearch$ ant
+
mholmes@linuxbox:~/Documents/staticSearch$ ant

you should see a build process proceed using the small test collection of documents, and at the end, a results page should open up giving you a report on what was done. If this fails, then you'll need to troubleshoot the problem based on any error messages @@ -1025,7 +1027,7 @@

8.7 Running the search

If the tests all work, then you're ready to build a search for your own site. Now you need to run the same command, but this time, tell the build process where to find your custom configuration file:2

-
ant -DssConfigFile=/home/mholmes/mysite/config_staticSearch.xml
+
ant -DssConfigFile=/home/mholmes/mysite/config_staticSearch.xml

The same process should run, and if it's successful, you should have a modified search.html page as well as a lot of index files in JSON format in your site HTML folder. Now you can test your own search in the same ways suggested above.

@@ -1037,14 +1039,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>
@@ -1058,14 +1060,14 @@

8.9 Generated reportBy default, the report includes only basic information about the number of stem files created, the the filters used, and any problems encountered. However, if you run the build process using the additional parameter ssVerboseReport:

-
ant -DssVerboseReport=true -DssConfigFile=...
+
ant -DssVerboseReport=true -DssConfigFile=...

then the report will also include a number of tables that outline some statistics about your project. However, please note that compiling these statistics is very memory-intensive and if your site is large, it may cause the build process to run out of memory.

As of version 1.4, the word frequency table is a separate document and is no longer included as part of the verbose report. Instead, after running a build, you can then build just the word frequency table with the special concordance target:

-
ant -DssConfigFile=path/to/your/config.xml concordance
+
ant -DssConfigFile=path/to/your/config.xml concordance

While the chart itself is not necessary for the core functionality of staticSearch, it is particularly useful during the initial development of a project’s search engine; it can be used to create and fine-tune the project-specific stopword list (i.e. if @@ -1089,18 +1091,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 @@ -1225,7 +1227,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')"/>
@@ -1236,16 +1238,16 @@

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"/>
How can I get staticSearch to show debugging messages? Set the ssVerbose property to true at the command line: -
ant -DssConfig=cfg.xml -DssVerbose=true 
Note that verbosity settings persist after creating the initial config; so, if you +
ant -DssConfig=cfg.xml -DssVerbose=true 
Note that verbosity settings persist after creating the initial config; so, if you are trying to debug just the tokenization process, you must make sure to run the config target beforehand: -
ant config tokenize -DssConfig=cfg.xml -DssVerbose=true 
+
ant config tokenize -DssConfig=cfg.xml -DssVerbose=true 
@@ -1260,11 +1262,10 @@

10 ‘ If you are indexing a very large collection of files, you may need to provide ant with additional memory by configuring the ANT_OPTS system property. To provide ant with 4GB of memory, you could do something like so: -
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 +
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.

@@ -1294,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 
@@ -1309,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; } 
@@ -1376,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.
  • @@ -1474,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.
    • @@ -1652,7 +1653,7 @@

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

      Appendix A.1.1 <con Content model -
      +                              
       <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>
      -    
      +
      Schema Declaration -
      +                              
       element config
       {
          attribute version { text }?,
          ( params, rules?, contexts?, excludes?, filters? )
      -}
      +}
      @@ -1799,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>
      @@ -1813,24 +1814,24 @@

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      Appendix A.1.16 <pa Content model -
      +                              
       <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>
      -    
      +
      Schema Declaration -
      -element params {  }
      +
      +element params {  }
      @@ -2839,18 +2840,18 @@

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

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

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

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

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

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

      Appendix A.1.23 <sc Content model -
      +                              
       <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: +
      Legal values are:
      raw
      (Default: Calculate the score based off of the weighted number of instances of a term @@ -3273,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 @@ -3331,18 +3332,18 @@

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

      Appendix A.1.25 <sp Content model -
      +                              
       <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>
      -    
      +
      Schema Declaration -
      -element span { attribute lang { text }?, ( anyElement_span_1* | text )+ }
      +
      +element span { attribute lang { text }?, ( anyElement_span_1* | text )+ }
      @@ -3498,18 +3499,18 @@

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

      Appendix A.1.27 <st + (words to be ignored when indexing).) @@ -3566,18 +3567,18 @@

      Appendix A.1.27 <st

      <stopwordsFile> (The relative path (from the config file) to a text file containing a list of stopwords - (words to be ignored when indexing). )
      Namespace
      Content model -
      +                              
       <content>
      - <dataRef name="anyURI"/>
      + <dataRef name="anyURI"/>
       </content>
      -    
      +
      Schema Declaration -
      -element stopwordsFile { xsd:anyURI }
      +
      +element stopwordsFile { xsd:anyURI }
      @@ -3629,18 +3630,18 @@

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

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

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

      Appendix A.2.2 att.mat
      Martin Holmes and Joey Takeda. Date: 2019-2025

    diff --git a/schema/staticSearch.odd b/schema/staticSearch.odd index b9f41dc6..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'] )]"/> - + - + @@ -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: - + @@ -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 139f8f97..21b7c9ad 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 @@ -65,8 +62,7 @@ TEI Edition Location: https://www.tei-c.org/Vault/P5/4.8.1/ - (specifies the major version of staticSearch to which - this configuration file corresponds. If this attribute is not used, the configuration file is assumed to have a version value of 1.) + (specifies the major version of staticSearch to which this configuration file corresponds. If this attribute is not used, the configuration file is assumed to have a version value of 1.) @@ -75,8 +71,7 @@ TEI Edition Location: https://www.tei-c.org/Vault/P5/4.8.1/ - (Element containing most of the settings which enable the Generator to - find the target website content and process it appropriately.) + (Element containing most of the settings which enable the Generator to find the target website content and process it appropriately.) @@ -129,8 +124,7 @@ TEI Edition Location: https://www.tei-c.org/Vault/P5/4.8.1/ - (The set of rules that control weighting of search terms - found in specific contexts.) + (The set of rules that control weighting of search terms found in specific contexts.) @@ -138,15 +132,11 @@ TEI Edition Location: https://www.tei-c.org/Vault/P5/4.8.1/ - (A rule that specifies a document path as XPath in the - match attribute, and provides weighting for search - terms found in that context.) + (A rule that specifies a document path as XPath in the match attribute, and provides weighting for search terms found in that context.) - (The weighting to give to a search token found in the context specified by the - match attribute. Set to 0 to completely suppress indexing for a - specific context, or greater than 1 to give stronger weighting.) + (The weighting to give to a search token found in the context specified by the match attribute. Set to 0 to completely suppress indexing for a specific context, or greater than 1 to give stronger weighting.) @@ -154,8 +144,7 @@ TEI Edition Location: https://www.tei-c.org/Vault/P5/4.8.1/ - (The set of context elements that identify - contexts for keyword-in-context fragments.) + (The set of context elements that identify contexts for keyword-in-context fragments.) @@ -163,8 +152,7 @@ TEI Edition Location: https://www.tei-c.org/Vault/P5/4.8.1/ - (A context definition, providing a match attribute that identifies the context, - allowing keyword-in-context fragments to be bounded by a specific context.) + (A context definition, providing a match attribute that identifies the context, allowing keyword-in-context fragments to be bounded by a specific context.) - (The set of exclusions, expressed as exclude elements, that control the subset of documents - or filters used for a particular search.) + (The set of exclusions, expressed as exclude elements, that control the subset of documents or filters used for a particular search.) @@ -210,8 +197,7 @@ TEI Edition Location: https://www.tei-c.org/Vault/P5/4.8.1/ - (An exclusion definition, which excludes either documents or filters - as defined by an XPath in the match attribute.) + (An exclusion definition, which excludes either documents or filters as defined by an XPath in the match attribute.) @@ -231,8 +217,7 @@ TEI Edition Location: https://www.tei-c.org/Vault/P5/4.8.1/ - (An XPath equivalent to the @match attribute of an xsl:template, which - specifies a context in a document.) + (An XPath equivalent to the @match attribute of an xsl:template, which specifies a context in a document.) @@ -249,26 +234,19 @@ TEI Edition Location: https://www.tei-c.org/Vault/P5/4.8.1/ - (The search file (aka page) that will be the primary access point for the staticSearch. Note - that this page must be at the root of the collection directory.) + (The search file (aka page) that will be the primary access point for the staticSearch. Note that this page must be at the root of the collection directory.) - (The relative path to a text file containing a single version identifier (such as - 1.5, 123456, or 06ad419). This will be used to create - unique filenames for JSON resources, so that the browser - will not use cached versions of older index files.) + (The relative path to a text file containing a single version identifier (such as 1.5, 123456, or 06ad419). This will be used to create unique filenames for JSON resources, so that the browser will not use cached versions of older index files.) - (The name of a folder inside the staticSearch /stemmers/ folder, - in which the JavaScript and XSLT implementations - of stemmers can be found. If left blank, then the staticSearch default English - stemmer (en) will be used.) + (The name of a folder inside the staticSearch /stemmers/ folder, in which the JavaScript and XSLT implementations of stemmers can be found. If left blank, then the staticSearch default English stemmer (en) will be used.) @@ -277,8 +255,7 @@ TEI Edition Location: https://www.tei-c.org/Vault/P5/4.8.1/ (The scoring algorithm to use for ranking keyword results. Default is "raw" (i.e. weighted counts)) raw - (Default: Calculate the score based off of the weighted number of - instances of a term in a text.) raw score + (Default: Calculate the score based off of the weighted number of instances of a term in a text.) raw score tf-idf (Calculate the score based off of the tf-idf scoring algorithm.) @@ -286,8 +263,7 @@ TEI Edition Location: https://www.tei-c.org/Vault/P5/4.8.1/ - (Whether to recurse into subdirectories of the collection directory or - not.) + (Whether to recurse into subdirectories of the collection directory or not.) @@ -305,84 +281,67 @@ TEI Edition Location: https://www.tei-c.org/Vault/P5/4.8.1/ - (If createContexts is set to true, then this parameter controls the length (in words) of - the harvested keyword-in-context string.) + (If createContexts is set to true, then this parameter controls the length (in words) of the harvested keyword-in-context string.) - (This controls the maximum number of keyword-in-context extracts that will be - stored for each term in a document.) + (This controls the maximum number of keyword-in-context extracts that will be stored for each term in a document.) - (This controls the maximum number of keyword-in-context extracts that will be shown - in the search page for each hit document returned.) + (This controls the maximum number of keyword-in-context extracts that will be shown in the search page for each hit document returned.) - (The string that will be used to signal ellipsis at the beginning and end of a - keyword-in-context extract. Conventionally three periods, or an ellipsis - character (which is the default value).) + (The string that will be used to signal ellipsis at the beginning and end of a keyword-in-context extract. Conventionally three periods, or an ellipsis character (which is the default value).) - (Whether or not to support phrasal searches. If this is true, then the maxContexts - setting will be ignored, because all contexts are required to properly support phrasal search.) + (Whether or not to support phrasal searches. If this is true, then the maxContexts setting will be ignored, because all contexts are required to properly support phrasal search.) - (Whether or not to support wildcard searches. Note that wildcard searches are - more effective when phrasal searching is also turned on, because the contexts - available for phrasal searches are also used to provide wildcard results.) + (Whether or not to support wildcard searches. Note that wildcard searches are more effective when phrasal searching is also turned on, because the contexts available for phrasal searches are also used to provide wildcard results.) - (The maximum number of document results to be displayed per page. All results - are displayed by default; setting resultsPerPage to a positive integer creates a - Show More/Show All widget at the bottom of the batch of results.) + (The maximum number of document results to be displayed per page. All results are displayed by default; setting resultsPerPage to a positive integer creates a Show More/Show All widget at the bottom of the batch of results.) - (The maximum number of results that can be returned for any search before returning 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. ) + (The maximum number of results that can be returned for any search before returning 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.) - (The relative path (from the config file) to a text file containing a list of - stopwords (words to be ignored when indexing). ) + (The relative path (from the config file) to a text file containing a list of stopwords (words to be ignored when indexing).) - (The relative path (from the config file) to a dictionary file (one word per line) which will be used to check - tokens when indexing.) + (The relative path (from the config file) to a dictionary file (one word per line) which will be used to check tokens when indexing.) - (The name of the output folder into which the index data and JavaScript will - be placed in the site search. This should conform with the - XML Name specification.) + (The name of the output folder into which the index data and JavaScript will be placed in the site search. This should conform with the XML Name specification.) @@ -431,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..c02a605e 100644 --- a/schema/staticSearch.sch +++ b/schema/staticSearch.sch @@ -2,12 +2,6 @@ - + + + + + + + id="d9e3448-constraint"> span descendants must be in the namespaces diff --git a/xsl/spiff_up_documentation.xsl b/xsl/spiff_up_documentation.xsl index c8d0684a..c2a6c4ad 100644 --- a/xsl/spiff_up_documentation.xsl +++ b/xsl/spiff_up_documentation.xsl @@ -58,7 +58,7 @@ be present. --> - + @@ -66,6 +66,13 @@ ) + + + + + + \ No newline at end of file