Skip to content

Commit

Permalink
Merge pull request #84 from acdh-oeaw/82-corpus-query-and-layout-fixes
Browse files Browse the repository at this point in the history
Support special chars and remove a shawi reference
  • Loading branch information
simar0at authored Jul 17, 2024
2 parents 4384bae + bf0524b commit 0871d96
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
2 changes: 1 addition & 1 deletion vicav.xqm
Original file line number Diff line number Diff line change
Expand Up @@ -1921,7 +1921,7 @@ declare function vicav:_search_corpus($query as xs:string, $print as xs:string?,
else if (count($line/Right/_) > 0) then
$line/Right/_[1]/text() else ""
let $u := collection('vicav_corpus')
/descendant::tei:TEI[./tei:teiHeader/tei:fileDesc/tei:publicationStmt/tei:idno[@type="SHAWICorpusID"]/text() = $docId]
/descendant::tei:TEI[./tei:teiHeader/tei:fileDesc/tei:publicationStmt/tei:idno[ends-with(@type, "CorpusID")]/text() = $docId]
/tei:text/tei:body/tei:div/tei:annotationBlock/tei:u[@xml:id = $uId]
return <hit u="{$uId}" doc="{$docId}">{$u}{$tokenId!<token>{normalize-space(.)}</token>}</hit>}</hits>
(: , $_ := admin:write-log(serialize($hits), 'INFO') :)
Expand Down
12 changes: 10 additions & 2 deletions xslt/menu-json.xslt
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
</xsl:function>

<xsl:template match="/">
<json objects="json projectConfig logo frontpage menu params map center styleSettings colors staticData" arrays="panel param main item subnav scope geo table dataTypes" numbers="zoom lat lng">
<json objects="json projectConfig logo frontpage menu params map center styleSettings colors staticData" arrays="panel param main item subnav scope geo table dataTypes specialCharacters" numbers="zoom lat lng">
<xsl:apply-templates/>
</json>
</xsl:template>
Expand Down Expand Up @@ -56,7 +56,15 @@
<type><xsl:value-of select="local-name()"/></type>
</_>
</xsl:template>


<xsl:template match="char">
<_ type="object">
<xsl:apply-templates select="./text" />
<xsl:apply-templates select="./value" />
</_>
</xsl:template>


<xsl:template match="panel|item">
<_ type="object">
<xsl:apply-templates select="@* except @type"/>
Expand Down

0 comments on commit 0871d96

Please sign in to comment.