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 @@
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.
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 @@"...the size of the index.Search filtering using any metadata you like,..."⚓+
"...the size of the index.Search filtering using any metadata you like,..."⚓
"...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: -
"...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: +
The default context elements are:
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.
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 @@
Note that once your file has been processed and all this content has been added, you @@ -1015,7 +1017,7 @@
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 @@
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 @@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:
- -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:
- By 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 @@
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).
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 ⚓
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
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 ⚓
.fidLink{ display:none; } ⚓
+ .fidLink{ display:none; } ⚓
concordance target in ant:
- ant concordance -DssConfig=cfg.xml⚓+
ant concordance -DssConfig=cfg.xml⚓
clean step of the build process.+<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> - ⚓+ ⚓
+
element config
{
attribute version { text }?,
( params, rules?, contexts?, excludes?, filters? )
-}⚓
+}⚓
+<content> - <empty/> + <empty/> </content> - ⚓+ ⚓
+
element context
{
att.match.attributes,
att.labelled.attributes,
attribute context { text }?,
empty
-}⚓
+}⚓
+<content> - <elementRef key="context" minOccurs="1" - maxOccurs="unbounded"/> + <elementRef key="context" minOccurs="1" + maxOccurs="unbounded"/> </content> - ⚓+ ⚓
-element contexts { context+ }⚓
+
+element contexts { context+ }⚓
+<content> - <dataRef name="boolean"/> + <dataRef name="boolean"/> </content> - ⚓+ ⚓
-element createContexts { xsd:boolean }⚓
+
+element createContexts { xsd:boolean }⚓
+<content> - <dataRef name="anyURI"/> + <dataRef name="anyURI"/> </content> - ⚓+ ⚓
-element dictionaryFile { xsd:anyURI }⚓
+
+element dictionaryFile { xsd:anyURI }⚓
+<content> - <empty/> + <empty/> </content> - ⚓+ ⚓
+
element exclude
{
att.match.attributes,
attribute type { "index" | "filter" },
empty
-}⚓
+}⚓
+<content> - <elementRef key="exclude" minOccurs="1" - maxOccurs="unbounded"/> + <elementRef key="exclude" minOccurs="1" + maxOccurs="unbounded"/> </content> - ⚓+ ⚓
-element excludes { exclude+ }⚓
+
+element excludes { exclude+ }⚓
+<content> - <elementRef key="span" minOccurs="1" - maxOccurs="unbounded"/> + <elementRef key="span" minOccurs="1" + maxOccurs="unbounded"/> </content> - ⚓+ ⚓
-element filter { attribute filterName { text }, span+ }⚓
+
+element filter { attribute filterName { text }, span+ }⚓
+<content> - <elementRef key="filter" minOccurs="1" - maxOccurs="unbounded"/> + <elementRef key="filter" minOccurs="1" + maxOccurs="unbounded"/> </content> - ⚓+ ⚓
-element filters { filter+ }⚓
+
+element filters { filter+ }⚓
+<content> - <textNode/> + <textNode/> </content> - ⚓+ ⚓
-element kwicTruncateString { text }⚓
+
+element kwicTruncateString { text }⚓
+<content> - <dataRef name="boolean"/> + <dataRef name="boolean"/> </content> - ⚓+ ⚓
-element linkToFragmentId { xsd:boolean }⚓
+
+element linkToFragmentId { xsd:boolean }⚓
+<content> - <dataRef name="nonNegativeInteger"/> + <dataRef name="nonNegativeInteger"/> </content> - ⚓+ ⚓
-element maxKwicsToHarvest { xsd:nonNegativeInteger }⚓
+
+element maxKwicsToHarvest { xsd:nonNegativeInteger }⚓
+<content> - <dataRef name="nonNegativeInteger"/> + <dataRef name="nonNegativeInteger"/> </content> - ⚓+ ⚓
-element maxKwicsToShow { xsd:nonNegativeInteger }⚓
+
+element maxKwicsToShow { xsd:nonNegativeInteger }⚓
+<content> - <dataRef name="nonNegativeInteger"/> + <dataRef name="nonNegativeInteger"/> </content> - ⚓+ ⚓
-element minWordLength { xsd:nonNegativeInteger }⚓
+
+element minWordLength { xsd:nonNegativeInteger }⚓
+<content> - <dataRef name="NCName"/> + <dataRef name="NCName"/> </content> - ⚓+ ⚓
-element outputFolder { xsd:NCName }⚓
+
+element outputFolder { xsd:NCName }⚓
+<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> - ⚓+ ⚓
-element params { }⚓
+
+element params { }⚓
+<content> - <dataRef name="boolean"/> + <dataRef name="boolean"/> </content> - ⚓+ ⚓
-element phrasalSearch { xsd:boolean }⚓
+
+element phrasalSearch { xsd:boolean }⚓
+<content> - <dataRef name="boolean"/> + <dataRef name="boolean"/> </content> - ⚓+ ⚓
-element recurse { xsd:boolean }⚓
+
+element recurse { xsd:boolean }⚓
+<content> - <dataRef name="nonNegativeInteger"/> + <dataRef name="nonNegativeInteger"/> </content> - ⚓+ ⚓
-element resultsLimit { xsd:nonNegativeInteger }⚓
+
+element resultsLimit { xsd:nonNegativeInteger }⚓
+<content> - <dataRef name="nonNegativeInteger"/> + <dataRef name="nonNegativeInteger"/> </content> - ⚓+ ⚓
-element resultsPerPage { xsd:nonNegativeInteger }⚓
+
+element resultsPerPage { xsd:nonNegativeInteger }⚓
+<content> - <empty/> + <empty/> </content> - ⚓+ ⚓
-element rule { att.match.attributes, attribute weight { text }, empty }⚓
+
+element rule { att.match.attributes, attribute weight { text }, empty }⚓
+<content> - <elementRef key="rule" minOccurs="1" - maxOccurs="unbounded"/> + <elementRef key="rule" minOccurs="1" + maxOccurs="unbounded"/> </content> - ⚓+ ⚓
-element rules { rule+ }⚓
+
+element rules { rule+ }⚓
+Legal values are:<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: + ⚓
-element scoringAlgorithm { "raw" | "tf-idf" }⚓Legal values are:
+
+element scoringAlgorithm { "raw" | "tf-idf" }⚓Legal values are:
+<content> - <dataRef name="anyURI"/> + <dataRef name="anyURI"/> </content> - ⚓+ ⚓
-element searchFile { xsd:anyURI }⚓
+
+element searchFile { xsd:anyURI }⚓
+<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> - ⚓+ ⚓
-element span { attribute lang { text }?, ( anyElement_span_1* | text )+ }⚓
+
+element span { attribute lang { text }?, ( anyElement_span_1* | text )+ }⚓
+<content> - <dataRef name="NCName"/> + <dataRef name="NCName"/> </content> - ⚓+ ⚓
-element stemmerFolder { xsd:NCName }⚓
+
+element stemmerFolder { xsd:NCName }⚓
| <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).)||||
| Namespace | @@ -3566,18 +3567,18 @@||||
| Content model |
- +<content> - <dataRef name="anyURI"/> + <dataRef name="anyURI"/> </content> - ⚓+ ⚓ |
|||
| Schema Declaration |
-
-element stopwordsFile { xsd:anyURI }⚓
+
+element stopwordsFile { xsd:anyURI }⚓
|
|||
+<content> - <dataRef name="nonNegativeInteger"/> + <dataRef name="nonNegativeInteger"/> </content> - ⚓+ ⚓
-element totalKwicLength { xsd:nonNegativeInteger }⚓
+
+element totalKwicLength { xsd:nonNegativeInteger }⚓
+<content> - <dataRef name="anyURI"/> + <dataRef name="anyURI"/> </content> - ⚓+ ⚓
-element versionFile { xsd:anyURI }⚓
+
+element versionFile { xsd:anyURI }⚓
+<content> - <dataRef name="boolean"/> + <dataRef name="boolean"/> </content> - ⚓+ ⚓
-element wildcardSearch { xsd:boolean }⚓
+
+element wildcardSearch { xsd:boolean }⚓