Skip to content

Commit

Permalink
Introduce default ordering of samples
Browse files Browse the repository at this point in the history
  • Loading branch information
wolfgangmm committed Feb 5, 2024
1 parent 9c770c1 commit c5f93ba
Show file tree
Hide file tree
Showing 16 changed files with 18 additions and 14 deletions.
1 change: 1 addition & 0 deletions collection.xconf
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
<field name="author" expression="nav:get-metadata(ancestor::tei:TEI, 'author')"/>
<field name="language" expression="nav:get-metadata(ancestor::tei:TEI, 'language')"/>
<field name="date" expression="nav:get-metadata(ancestor::tei:TEI, 'date')"/>
<field name="category" expression="nav:get-metadata(ancestor::tei:TEI, 'category')"/>
<field name="file" expression="util:document-name(.)"/>
<field name="text" expression="."/>
<facet dimension="genre" expression="nav:get-metadata(ancestor::tei:TEI, 'genre')" hierarchical="yes"/>
Expand Down
2 changes: 1 addition & 1 deletion data/test/DamenConvLex-1834.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<?teipublisher template="tei-lex.html" odd="lex-0.odd"?>
<TEI xmlns="http://www.tei-c.org/ns/1.0" xmlns:tei="http://www.tei-c.org/ns/1.0">
<TEI xmlns="http://www.tei-c.org/ns/1.0" n="cb">
<teiHeader>
<fileDesc>
<titleStmt>
Expand Down
2 changes: 1 addition & 1 deletion data/test/F-rom.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<?teipublisher template="shakespeare.html" odd="shakespeare.odd" view="page" media="pdf epub print"?>
<TEI xmlns="http://www.tei-c.org/ns/1.0">
<TEI xmlns="http://www.tei-c.org/ns/1.0" n="Ab">
<teiHeader>
<fileDesc>
<titleStmt>
Expand Down
2 changes: 1 addition & 1 deletion data/test/cortes_to_dantiscus.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<?teipublisher template="cortez-with-translation.html" odd="dantiscus.odd" view="page" media="epub"?>
<TEI xmlns="http://www.tei-c.org/ns/1.0" xml:id="CIDTC5772">
<TEI xmlns="http://www.tei-c.org/ns/1.0" xml:id="CIDTC5772" n="Cc">
<teiHeader>
<fileDesc>
<titleStmt>
Expand Down
2 changes: 1 addition & 1 deletion data/test/cortes_to_dantiscus_Mexico.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<?teipublisher template="cortez.html" odd="dantiscus.odd" view="page" media="epub"?>
<TEI xmlns="http://www.tei-c.org/ns/1.0" xml:id="CIDTC3823">
<TEI xmlns="http://www.tei-c.org/ns/1.0" xml:id="CIDTC3823" n="Cd">
<teiHeader>
<fileDesc>
<titleStmt>
Expand Down
2 changes: 1 addition & 1 deletion data/test/ebbe.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml-model href="http://www.tei-c.org/release/xml/tei/custom/schema/relaxng/tei_all.rng" type="application/xml" schematypens="http://relaxng.org/ns/structure/1.0"?><?xml-model href="http://www.tei-c.org/release/xml/tei/custom/schema/relaxng/tei_all.rng" type="application/xml"
schematypens="http://purl.oclc.org/dsdl/schematron"?>
<?teipublisher template="ebbe.html" odd="ebbe.odd" view="page" media="epub"?>
<TEI xmlns="http://www.tei-c.org/ns/1.0" xml:id="EBBE_BS_sample">
<TEI xmlns="http://www.tei-c.org/ns/1.0" xml:id="EBBE_BS_sample" n="Ce">
<teiHeader>
<fileDesc>
<titleStmt>
Expand Down
2 changes: 1 addition & 1 deletion data/test/graves6.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<?teipublisher odd="graves.odd" template="letter.html" media="latex epub print fo"?>
<TEI xmlns="http://www.tei-c.org/ns/1.0" xmlns:xi="http://www.w3.org/2001/XInclude">
<TEI xmlns="http://www.tei-c.org/ns/1.0" xmlns:xi="http://www.w3.org/2001/XInclude" n="Ac">
<teiHeader>
<fileDesc>
<titleStmt>
Expand Down
2 changes: 1 addition & 1 deletion data/test/kant_rvernunft_1781.TEI-P5.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?><?oxygen RNGSchema="http://www.deutschestextarchiv.de/basisformat.rng" type="xml"?>
<?teipublisher view="page" odd="dta.odd" template="dta.html" media="epub print"?>
<TEI xmlns="http://www.tei-c.org/ns/1.0">
<TEI xmlns="http://www.tei-c.org/ns/1.0" n="Aa">
<teiHeader>
<fileDesc>
<titleStmt>
Expand Down
2 changes: 1 addition & 1 deletion data/test/let695.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<!--Licensed under Attribution-NonCommercial-ShareAlike 4.0 International (CC BY-NC-SA 4.0)-->
<?xml-model href="https://xmlschema.huygens.knaw.nl/vgodd.rng" type="application/xml" schematypens="http://relaxng.org/ns/structure/1.0"?>
<?teipublisher odd="vangogh.odd" template="vangogh.html" view="page" media="latex"?>
<TEI xmlns:vg="http://www.vangoghletters.org/ns/" xmlns="http://www.tei-c.org/ns/1.0">
<TEI xmlns:vg="http://www.vangoghletters.org/ns/" xmlns="http://www.tei-c.org/ns/1.0" n="Ca">
<teiHeader xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<fileDesc>
<titleStmt>
Expand Down
2 changes: 1 addition & 1 deletion data/test/orlik_to_serafin.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?teipublisher template="translation.html" odd="serafin.odd" view="div" media="print latex epub"?>
<TEI xmlns="http://www.tei-c.org/ns/1.0" xml:id="MS2">
<TEI xmlns="http://www.tei-c.org/ns/1.0" xml:id="MS2" n="Bb">
<teiHeader>
<fileDesc>
<titleStmt>
Expand Down
2 changes: 1 addition & 1 deletion data/test/osinski.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<?teipublisher template="osinski.html" odd="osinski.odd" view="page" media="epub print"?>
<TEI xmlns="http://www.tei-c.org/ns/1.0">
<TEI xmlns="http://www.tei-c.org/ns/1.0" n="Ca">
<teiHeader>
<fileDesc>
<titleStmt>
Expand Down
2 changes: 1 addition & 1 deletion data/test/pb-mei-app.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<?teipublisher media="print" template="mei.html"?>
<?xml-model href="bolz_example.rng" type="application/xml" schematypens="http://relaxng.org/ns/structure/1.0"?>
<?xml-model href="bolz_example.rng" type="application/xml" schematypens="http://purl.oclc.org/dsdl/schematron"?>
<TEI xmlns="http://www.tei-c.org/ns/1.0">
<TEI xmlns="http://www.tei-c.org/ns/1.0" n="Ad">
<teiHeader>
<fileDesc>
<titleStmt>
Expand Down
2 changes: 1 addition & 1 deletion data/test/test.docx.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?teipublisher odd="docx-output.odd"?>
<TEI xmlns="http://www.tei-c.org/ns/1.0">
<TEI xmlns="http://www.tei-c.org/ns/1.0" n="Ba">
<teiHeader>
<fileDesc>
<titleStmt>
Expand Down
4 changes: 3 additions & 1 deletion index.xql
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,8 @@ declare function idx:get-metadata($root as element(), $field as xs:string) {
root($root)//dbk:info/dbk:keywordset[@vocab="#genre"]/dbk:keyword,
root($root)//article-meta/kwd-group[@kwd-group-type="genre"]/kwd
)
case "category" return
(root($root)/tei:TEI/@n, "ZZZ")[1]
case "feature" return (
idx:get-classification($header, 'feature'),
$root/dbk:info/dbk:keywordset[@vocab="#feature"]/dbk:keyword
Expand Down Expand Up @@ -94,4 +96,4 @@ declare function idx:get-classification($header as element()?, $scheme as xs:str
let $category := id(substring($target, 2), doc($idx:app-root || "/data/taxonomy.xml"))
return
$category/ancestor-or-self::tei:category[parent::tei:category]/tei:catDesc
};
};
2 changes: 1 addition & 1 deletion modules/lib/browse.xql
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ function app:clear-facets($node as node(), $model as map(*)) {
declare
%templates:wrap
%templates:default("field", "text")
%templates:default("sort", "title")
%templates:default("sort", "category")
function app:form($node as node(), $model as map(*), $field as xs:string, $sort as xs:string) {
map {
"field": $field,
Expand Down
1 change: 1 addition & 0 deletions templates/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ <h1 class="tp-title">The Instant Publishing Toolbox<small data-template="pages:v
<pb-custom-form class="options">
<input type="hidden" name="collection" value="${collection}" data-template="pages:parse-params"/>
<pb-select label="browse.sort" name="sort" value="${sort}" data-template="pages:parse-params">
<paper-item value="category"><pb-i18n key="browse.category">Default</pb-i18n></paper-item>
<paper-item value="title"><pb-i18n key="browse.title"></pb-i18n></paper-item>
<paper-item value="author"><pb-i18n key="browse.author"></pb-i18n></paper-item>
</pb-select>
Expand Down

0 comments on commit c5f93ba

Please sign in to comment.