diff --git a/static/abaev.js b/static/abaev.js
index ce2d301..636c7d3 100644
--- a/static/abaev.js
+++ b/static/abaev.js
@@ -131,41 +131,16 @@ $( document ).ready(function() {
}
};
Plotly.newPlot(map, [$(this).data('map')], layout);
-
-
-
- // var data = [{
- // type: 'scattergeo',
- // mode: 'markers+text',
- // text: [
- // 'Montreal', 'Toronto', 'Vancouver', 'Calgary', 'Edmonton',
- // 'Ottawa', 'Halifax', 'Victoria', 'Winnepeg', 'Regina'
- // ],
- // hovertext: 'HIMEM.SYS
EGAVGA.BGI',
- // hoverinfo: 'text',
- // lon: [
- // -73.57, -79.24, -123.06, -114.1, -113.28,
- // -75.43, -63.57, -123.21, -97.13, -104.6
- // ],
- // lat: [
- // 45.5, 43.4, 49.13, 51.1, 53.34, 45.24,
- // 44.64, 48.25, 49.89, 50.45
- // ],
- // marker: {
- // size: 7,
- // // color: [
- // // '#bebada', '#fdb462', '#fb8072', '#d9d9d9', '#bc80bd',
- // // '#b3de69', '#8dd3c7', '#80b1d3', '#fccde5', '#ffffb3'
- // // ],
- // line: {
- // width: 1
- // }
- // },
- // name: 'Canadian cities',
- // textposition: [
- // 'top right', 'top left', 'top center', 'bottom right', 'top right',
- // 'top left', 'bottom right', 'bottom left', 'top right', 'top right'
- // ],
- // }];
});
+
+ // Event handler to show subentries
+ $('#show-re').on("change", function () {
+ if($(this).prop('checked')) {
+ console.log('haha')
+ $('li.abv-menu-re').removeAttr('hidden');
+ }
+ else {
+ $('li.abv-menu-re').prop('hidden',true);
+ }
+ });
});
diff --git a/xq/abv-mod.xqm b/xq/abv-mod.xqm
index 7479c99..21b1f9e 100644
--- a/xq/abv-mod.xqm
+++ b/xq/abv-mod.xqm
@@ -15,6 +15,7 @@ as xs:string {
=> replace('\)','')
=> replace('́','') (: combining acute :)
=> replace('\*','')
+ => replace('ᵆ','')
=> replace('a','/')
=> replace('A', '/')
@@ -44,6 +45,7 @@ as xs:string {
=> replace('ʒ', '6')
=> replace('Ʒ', '6')
+ => replace('ǯ', '6')
=> replace('e', '7')
=> replace('E', '7')
@@ -67,6 +69,8 @@ as xs:string {
=> replace('ǧ', 'A')
=> replace('Ǧ', 'A')
+ => replace('h', 'A')
+ => replace('H', 'A')
=> replace('i', 'B')
=> replace('I', 'B')
@@ -166,6 +170,8 @@ as xs:string {
=> replace('z', 'X')
=> replace('Z', 'X')
+ => replace('ž', 'X')
+ => replace('Ž', 'X')
};
declare function abv-m:sort-collection($docs as document-node()+) {
diff --git a/xq/make-lookup.xq b/xq/make-lookup.xq
index cd4ff9a..ed08202 100644
--- a/xq/make-lookup.xq
+++ b/xq/make-lookup.xq
@@ -2,11 +2,13 @@ declare default element namespace "http://www.tei-c.org/ns/1.0";
declare namespace tei = "http://www.tei-c.org/ns/1.0";
declare namespace abv = "http://ossetic-studies.org/ns/abaevdict";
+import module namespace abv-m = 'http://ossetic-studies.org/ns/abaevdict-mod' at './abv-mod.xqm';
+
declare function local:genLookupEntry($doc as document-node())
as element()?
{
let $node := $doc/tei:TEI/tei:text/tei:body/tei:entry
- let $phon := $node/tei:form[1]/tei:orth[1]/text()[1]
+ let $phon := normalize-space(data($node/tei:form[1]/tei:orth[1]))
return element entry {
attribute xml:id { $node/@xml:id },
@@ -16,9 +18,21 @@ as element()?
}
};
+let $entries := for $doc in collection('abaevdict')
+ return local:genLookupEntry($doc)
+
+let $subentries := for $doc in collection('abaevdict')
+ for $re in $doc//re
+ let $etext := normalize-space(data($re/form[1]/orth[1]))
+ where $etext != '' and not($etext = $entries/text())
+ and not(starts-with($etext,','))
+ and string-to-codepoints($etext)[1] != string-to-codepoints(' ')
+ return