Mercurial > hg > mpdl-group
diff software/eXist/webapp/mpdl/attribute-query-result.xql @ 15:e99964f390e4
diverse Fehlerbehebungen
author | Josef Willenborg <jwillenborg@mpiwg-berlin.mpg.de> |
---|---|
date | Mon, 29 Aug 2011 17:40:19 +0200 |
parents | d6f528ad5d96 |
children | 7e883ce72fec |
line wrap: on
line diff
--- a/software/eXist/webapp/mpdl/attribute-query-result.xql Mon Aug 29 17:40:02 2011 +0200 +++ b/software/eXist/webapp/mpdl/attribute-query-result.xql Mon Aug 29 17:40:19 2011 +0200 @@ -171,8 +171,12 @@ let $pageResult := for $elem at $pos in $orderedAttrQueryResult let $doc := $elem/fn:root() let $documentUriOrig := document-uri($doc) + let $documentName := util:document-name($doc) + let $documentCollection := replace(string($documentUriOrig), "(.+)/.+xml", "$1") let $documentUri := substring-after($documentUriOrig, $docPath) let $documentUriWithoutExtension := substring-before($documentUri, ".") + (: let $lastModified := replace(substring-before(string(xmldb:last-modified($documentCollection, $documentName)), "."), "T", " ") :) + let $lastModified := substring-before(string(xmldb:last-modified($documentCollection, $documentName)), ".") let $docBase := substring-before(substring-after($documentUri, "/"), "/") let $metadata := mpdl-lucene:getMetadata($docBase, $doc) (: Performance: following is slow: why (would be better structured code) ? @@ -183,10 +187,12 @@ let $titleElems := mpdl-lucene:getElementsByAttr($metadata, $docBase, "title") let $placeElems := mpdl-lucene:getElementsByAttr($metadata, $docBase, "place") let $dateElems := mpdl-lucene:getElementsByAttr($metadata, $docBase, "date") + let $langElems := mpdl-lucene:getElementsByAttr($metadata, $docBase, "language") let $authors := string-join($authorElems, ', ') let $titles := string-join($titleElems, ', ') let $places := string-join($placeElems, ', ') let $dates := string-join($dateElems, ', ') + let $langs := string-join($langElems, ', ') let $resultElem := <tr> <td valign="top" style="padding-left:5px;">{$pos}.</td> @@ -199,6 +205,9 @@ <td valign="top" style="padding-left:5px;">{$titles}</td> <td valign="top" style="padding-left:5px;">{$places}</td> <td valign="top" style="padding-left:5px;">{$dates}</td> + <td valign="top" style="padding-left:5px;">{$langs}</td> + <td valign="top" style="padding-left:5px;">{$docBase}</td> + <td valign="top" style="padding-left:5px;">{$lastModified}</td> </tr> where $pos >= $positionFrom and $pos <= $positionTo return $resultElem @@ -301,9 +310,12 @@ <col width="3%"/> <col width="3%"/> <col width="15%"/> - <col width="42%"/> - <col width="15%"/> + <col width="35%"/> + <col width="5%"/> <col width="6%"/> + <col width="3%"/> + <col width="3%"/> + <col width="3%"/> </colgroup> <thead> <tr> @@ -312,9 +324,9 @@ </th> <th align="left" valign="top"><button id="dummy" name="order-by" value="{$orderBy}" style="padding:0px;font-weight:bold;font-size:14px;background:none;border:none;">Full view</button></th> <th align="left" valign="top"><button id="dummy" name="order-by" value="{$orderBy}" style="padding:0px;font-weight:bold;font-size:14px;background:none;border:none;">Lite view</button></th> - <th align="left" valign="top"><button id="dummy" name="order-by" value="author" style="padding:0px;font-weight:bold;font-size:14px;background:none;border:none;">Xml</button></th> - <th align="left" valign="top"><button id="dummy" name="order-by" value="author" style="padding:0px;font-weight:bold;font-size:14px;background:none;border:none;">Pdf</button></th> - <th align="left" valign="top"><button id="dummy" name="order-by" value="author" style="padding:0px;font-weight:bold;font-size:14px;background:none;border:none;">Html</button></th> + <th align="left" valign="top"><button id="dummy" name="order-by" value="{$orderBy}" style="padding:0px;font-weight:bold;font-size:14px;background:none;border:none;">Xml</button></th> + <th align="left" valign="top"><button id="dummy" name="order-by" value="{$orderBy}" style="padding:0px;font-weight:bold;font-size:14px;background:none;border:none;">Pdf</button></th> + <th align="left" valign="top"><button id="dummy" name="order-by" value="{$orderBy}" style="padding:0px;font-weight:bold;font-size:14px;background:none;border:none;">Html</button></th> <th align="left" valign="top"> <button name="order-by" value="author" style="padding:0px;font-weight:bold;font-size:14px;background:none;border:none;">Author</button> </th> @@ -327,6 +339,11 @@ <th align="left" valign="top"> <button name="order-by" value="date" style="padding:0px;font-weight:bold;font-size:14px;background:none;border:none;">Year</button> </th> + <th align="left" valign="top"> + <button name="order-by" value="language" style="padding:0px;font-weight:bold;font-size:14px;background:none;border:none;">Language</button> + </th> + <th align="left" valign="top"><button id="dummy" name="order-by" value="{$orderBy}" style="padding:0px;font-weight:bold;font-size:14px;background:none;border:none;">Schema</button></th> + <th align="left" valign="top"><button id="dummy" name="order-by" value="{$orderBy}" style="padding:0px;font-weight:bold;font-size:14px;background:none;border:none;">Last modified</button></th> </tr> </thead> <tbody>