Skip to content

Commit

Permalink
When concatenating text nodes remove white space due to indention.
Browse files Browse the repository at this point in the history
  • Loading branch information
simar0at committed Jan 25, 2021
1 parent f9c4449 commit 0a089c5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions create_autocomplete_index.xq
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
declare namespace tei = "http://www.tei-c.org/ns/1.0";
declare variable $colls external := ('dc_arz_eng_publ');
declare variable $colls external := ('dc_apc_eng_publ');

declare function local:getTranslations($lang as xs:string) as element(index) {
<index id="{$lang}">{
for $coll in $colls return
for $v in distinct-values(collection($coll)//tei:entry[tei:fs/tei:f/tei:symbol/@value="released"]/tei:sense/tei:cit[@xml:lang=$lang]!string-join(.//text(), ' '))
for $v in distinct-values(collection($coll)//tei:entry[tei:fs/tei:f/tei:symbol/@value="released"]/tei:sense/tei:cit[@xml:lang=$lang]!normalize-space(string-join(.//text(), ' ')))
order by $v
return <w>{$v}</w>
}</index>
Expand Down

0 comments on commit 0a089c5

Please sign in to comment.