Mercurial > hg > mpdl-group
comparison software/eXist/webapp/mpdl/presentation/queryHtml.xsl @ 15:e99964f390e4
diverse Fehlerbehebungen
author | Josef Willenborg <jwillenborg@mpiwg-berlin.mpg.de> |
---|---|
date | Mon, 29 Aug 2011 17:40:19 +0200 |
parents | 5589d865af7a |
children | 7e883ce72fec |
comparison
equal
deleted
inserted
replaced
14:5df60f24e997 | 15:e99964f390e4 |
---|---|
92 </xsl:if> | 92 </xsl:if> |
93 <xsl:if test="$queryType = 'fulltext' or $queryType = 'fulltextMorph' or $queryType = 'fulltextMorphLemma'"> | 93 <xsl:if test="$queryType = 'fulltext' or $queryType = 'fulltextMorph' or $queryType = 'fulltextMorphLemma'"> |
94 <xsl:for-each select="/result/query/result/hits/hit"> | 94 <xsl:for-each select="/result/query/result/hits/hit"> |
95 <xsl:variable name="pos" select="pos"/> | 95 <xsl:variable name="pos" select="pos"/> |
96 <xsl:variable name="term" select="term"/> | 96 <xsl:variable name="term" select="term"/> |
97 <xsl:variable name="hitString" select="hitString"/> | |
97 <div class="queryResultPageHit"> | 98 <div class="queryResultPageHit"> |
98 <div class="queryResultPageHitLink"> | 99 <div class="queryResultPageHitLink"> |
99 <xsl:value-of select="concat($pos, '.')"/> | 100 <xsl:value-of select="concat($pos, '.')"/> |
101 <xsl:variable name="hitType" select="hitType"/> | |
100 <xsl:variable name="hitPN" select="pn"/> | 102 <xsl:variable name="hitPN" select="pn"/> |
101 <xsl:variable name="hitPosOfS" select="pos-of-s"/> | 103 <xsl:variable name="hitPos" select="hitPos"/> |
102 <xsl:variable name="sSurroundsPB" select="s-surrounds-pb"/> | 104 <xsl:variable name="hitSurroundsPB" select="hitSurroundsPB"/> |
103 <xsl:variable name="queryValue" select="concat('&', 'query=', $query)"/> | 105 <xsl:variable name="queryValue" select="concat('&', 'query=', $query)"/> |
104 <xsl:variable name="queryValueEscaped1" select="replace($queryValue, '\+', '%2B')"/> | 106 <xsl:variable name="queryValueEscaped1" select="replace($queryValue, '\+', '%2B')"/> |
105 <xsl:variable name="queryValueEscaped2" select="replace($queryValueEscaped1, ' ', '+')"/> | 107 <xsl:variable name="queryValueEscaped2" select="replace($queryValueEscaped1, ' ', '+')"/> |
106 <xsl:choose> | 108 <xsl:choose> |
107 <!-- if a found sentence surrounds a page break then a special presentation of the hit is done --> | 109 <!-- if a found sentence surrounds a page break then a special presentation of the hit is done --> |
108 <xsl:when test="$sSurroundsPB = 'false'"> | 110 <xsl:when test="$hitType = 's' and $hitSurroundsPB = 'false'"> |
109 <a href="page-fragment.xql?{$documentValue}&pn={$hitPN}&sn={$hitPosOfS}&{$modeValue}&highlightQuery={$query}#sn{$hitPosOfS}">Page <xsl:value-of select="$hitPN"/>, Sentence <xsl:value-of select="$hitPosOfS"/></a> | 111 <a href="page-fragment.xql?{$documentValue}&pn={$hitPN}&{$modeValue}&highlightQuery={$query}&highlightElement={$hitType}&highlightElementPos={$hitPos}#s{$hitPos}">Page <xsl:value-of select="$hitPN"/>, Sentence <xsl:value-of select="$hitPos"/></a> |
112 </xsl:when> | |
113 <xsl:when test="$hitType = 'head'"> | |
114 <a href="page-fragment.xql?{$documentValue}&pn={$hitPN}&{$modeValue}&highlightQuery={$query}&highlightElement={$hitType}&highlightElementPos={$hitPos}#head{$hitPos}">Page <xsl:value-of select="$hitPN"/>, Head <xsl:value-of select="$hitPos"/></a> | |
110 </xsl:when> | 115 </xsl:when> |
111 <xsl:otherwise> | 116 <xsl:otherwise> |
112 <a href="page-fragment.xql?{$documentValue}&pn={$hitPN}&sn={$hitPosOfS}&{$modeValue}&highlightQuery={$query}#sn{$hitPosOfS}">Page <xsl:value-of select="$hitPN"/>, Sentence <xsl:value-of select="$hitPosOfS"/></a> / <a href="page-fragment.xql?{$documentValue}&pn={$hitPN + 1}&sn=0&{$modeValue}&highlightQuery={$query}#sn0">Page <xsl:value-of select="$hitPN + 1"/>, continuation of the sentence</a> | 117 <a href="page-fragment.xql?{$documentValue}&pn={$hitPN}&{$modeValue}&highlightQuery={$query}&highlightElement={$hitType}&highlightElementPos={$hitPos}#s{$hitPos}">Page <xsl:value-of select="$hitPN"/>, Sentence <xsl:value-of select="$hitPos"/></a> / <a href="page-fragment.xql?{$documentValue}&pn={$hitPN + 1}&{$modeValue}&highlightQuery={$query}#s0">Page <xsl:value-of select="$hitPN + 1"/>, continuation of the sentence</a> |
113 </xsl:otherwise> | 118 </xsl:otherwise> |
114 </xsl:choose> | 119 </xsl:choose> |
115 <xsl:value-of select="':'"/> | 120 <xsl:value-of select="':'"/> |
116 </div> | 121 </div> |
117 <div class="queryResultPageHitContent"> | 122 <div class="queryResultPageHitContent"> |
118 <!-- Highlight the query terms in each hit sentence and clip the result --> | 123 <!-- Highlight the query terms in each hit sentence and clip the result --> |
119 <xsl:sequence select="text:highlight(s, $ftQueryTerms, $ftQueryHighlightWords, 'true')"/> | 124 <xsl:sequence select="text:highlight($hitString, $ftQueryTerms, $ftQueryHighlightWords, 'true')"/> |
120 </div> | 125 </div> |
121 </div> | 126 </div> |
122 </xsl:for-each> | 127 </xsl:for-each> |
123 </xsl:if> | 128 </xsl:if> |
124 <xsl:if test="$queryType = 'ftIndex' or $queryType = 'ftIndexMorph'"> | 129 <xsl:if test="$queryType = 'ftIndex' or $queryType = 'ftIndexMorph'"> |