# HG changeset patch # User Josef Willenborg # Date 1317134475 -7200 # Node ID 7e883ce72fec81f90fe211711f7c00152605bb07 # Parent 257f67be5c0085a2201683b531740f272192aac6 diverse Fehlerbehebungen diff -r 257f67be5c00 -r 7e883ce72fec software/eXist/webapp/mpdl/_stuff/.DS_Store Binary file software/eXist/webapp/mpdl/_stuff/.DS_Store has changed diff -r 257f67be5c00 -r 7e883ce72fec software/eXist/webapp/mpdl/_stuff/tmp/.DS_Store Binary file software/eXist/webapp/mpdl/_stuff/tmp/.DS_Store has changed diff -r 257f67be5c00 -r 7e883ce72fec software/eXist/webapp/mpdl/attribute-query-result.xql --- a/software/eXist/webapp/mpdl/attribute-query-result.xql Tue Sep 27 16:40:57 2011 +0200 +++ b/software/eXist/webapp/mpdl/attribute-query-result.xql Tue Sep 27 16:41:15 2011 +0200 @@ -46,45 +46,80 @@ let $docBaseArch := "archimedes" let $docBaseEcho := "echo" let $docBaseTei := "tei" +let $docBaseDiverse := "diverse" let $fulltextMorphArchDocPath := concat($docPathMorph, "/", $docBaseArch, "/", $language) let $fulltextMorphEchoDocPath := concat($docPathMorph, "/", $docBaseEcho, "/", $language) let $fulltextMorphTeiDocPath := concat($docPathMorph, "/", $docBaseTei, "/", $language) +let $fulltextMorphDiverseDocPath := concat($docPathMorph, "/", $docBaseDiverse, "/", $language) let $fulltextMorphCollection := - if(contains($docbase, $docBaseArch) and contains($docbase, $docBaseEcho) and contains($docbase, $docBaseTei)) + if(contains($docbase, $docBaseArch) and contains($docbase, $docBaseEcho) and contains($docbase, $docBaseTei) and contains($docbase, $docBaseDiverse)) + then collection($fulltextMorphArchDocPath, $fulltextMorphEchoDocPath, $fulltextMorphTeiDocPath, $fulltextMorphDiverseDocPath) + else if(contains($docbase, $docBaseArch) and contains($docbase, $docBaseEcho) and contains($docbase, $docBaseTei) and not(contains($docbase, $docBaseDiverse))) then collection($fulltextMorphArchDocPath, $fulltextMorphEchoDocPath, $fulltextMorphTeiDocPath) - else if(contains($docbase, $docBaseArch) and contains($docbase, $docBaseEcho) and not(contains($docbase, $docBaseTei))) + else if(contains($docbase, $docBaseArch) and contains($docbase, $docBaseEcho) and not(contains($docbase, $docBaseTei)) and contains($docbase, $docBaseDiverse)) + then collection($fulltextMorphArchDocPath, $fulltextMorphEchoDocPath, $fulltextMorphDiverseDocPath) + else if(contains($docbase, $docBaseArch) and not(contains($docbase, $docBaseEcho)) and contains($docbase, $docBaseTei) and contains($docbase, $docBaseDiverse)) + then collection($fulltextMorphArchDocPath, $fulltextMorphTeiDocPath, $fulltextMorphDiverseDocPath) + else if(not(contains($docbase, $docBaseArch)) and contains($docbase, $docBaseEcho) and contains($docbase, $docBaseTei) and contains($docbase, $docBaseDiverse)) + then collection($fulltextMorphEchoDocPath, $fulltextMorphTeiDocPath, $fulltextMorphDiverseDocPath) + else if(contains($docbase, $docBaseArch) and contains($docbase, $docBaseEcho) and not(contains($docbase, $docBaseTei)) and not(contains($docbase, $docBaseDiverse))) then collection($fulltextMorphArchDocPath, $fulltextMorphEchoDocPath) - else if(contains($docbase, $docBaseArch) and not(contains($docbase, $docBaseEcho)) and contains($docbase, $docBaseTei)) + else if(contains($docbase, $docBaseArch) and not(contains($docbase, $docBaseEcho)) and not(contains($docbase, $docBaseTei)) and contains($docbase, $docBaseDiverse)) + then collection($fulltextMorphArchDocPath, $fulltextMorphDiverseDocPath) + else if(not(contains($docbase, $docBaseArch)) and not(contains($docbase, $docBaseEcho)) and contains($docbase, $docBaseTei) and contains($docbase, $docBaseDiverse)) + then collection($fulltextMorphTeiDocPath, $fulltextMorphDiverseDocPath) + else if(not(contains($docbase, $docBaseArch)) and contains($docbase, $docBaseEcho) and not(contains($docbase, $docBaseTei)) and contains($docbase, $docBaseDiverse)) + then collection($fulltextMorphEchoDocPath, $fulltextMorphDiverseDocPath) + else if(not(contains($docbase, $docBaseArch)) and contains($docbase, $docBaseEcho) and contains($docbase, $docBaseTei) and not(contains($docbase, $docBaseDiverse))) + then collection($fulltextMorphEchoDocPath, $fulltextMorphTeiDocPath) + else if(contains($docbase, $docBaseArch) and not(contains($docbase, $docBaseEcho)) and contains($docbase, $docBaseTei) and not(contains($docbase, $docBaseDiverse))) then collection($fulltextMorphArchDocPath, $fulltextMorphTeiDocPath) - else if(not(contains($docbase, $docBaseArch)) and contains($docbase, $docBaseEcho) and contains($docbase, $docBaseTei)) - then collection($fulltextMorphEchoDocPath, $fulltextMorphTeiDocPath) - else if(contains($docbase, $docBaseArch) and not(contains($docbase, $docBaseEcho)) and not(contains($docbase, $docBaseTei))) + else if(not(contains($docbase, $docBaseArch)) and not(contains($docbase, $docBaseEcho)) and not(contains($docbase, $docBaseTei)) and contains($docbase, $docBaseDiverse)) + then collection($fulltextMorphDiverseDocPath) + else if(not(contains($docbase, $docBaseArch)) and not(contains($docbase, $docBaseEcho)) and contains($docbase, $docBaseTei) and not(contains($docbase, $docBaseDiverse))) + then collection($fulltextMorphTeiDocPath) + else if(not(contains($docbase, $docBaseArch)) and contains($docbase, $docBaseEcho) and not(contains($docbase, $docBaseTei)) and not(contains($docbase, $docBaseDiverse))) + then collection($fulltextMorphEchoDocPath) + else if(contains($docbase, $docBaseArch) and not(contains($docbase, $docBaseEcho)) and not(contains($docbase, $docBaseTei)) and not(contains($docbase, $docBaseDiverse))) then collection($fulltextMorphArchDocPath) - else if(not(contains($docbase, $docBaseArch)) and contains($docbase, $docBaseEcho) and not(contains($docbase, $docBaseTei))) - then collection($fulltextMorphEchoDocPath) - else if(not(contains($docbase, $docBaseArch)) and not(contains($docbase, $docBaseEcho)) and contains($docbase, $docBaseTei)) - then collection($fulltextMorphTeiDocPath) else () let $fulltextStandardArchDocPath := concat($docPathStandard, "/", $docBaseArch) let $fulltextStandardEchoDocPath := concat($docPathStandard, "/", $docBaseEcho) let $fulltextStandardTeiDocPath := concat($docPathStandard, "/", $docBaseTei) +let $fulltextStandardDiverseDocPath := concat($docPathStandard, "/", $docBaseDiverse) let $fulltextStandardCollectionStr := - if(contains($docbase, $docBaseArch) and contains($docbase, $docBaseEcho) and contains($docbase, $docBaseTei)) + if(contains($docbase, $docBaseArch) and contains($docbase, $docBaseEcho) and contains($docbase, $docBaseTei) and contains($docbase, $docBaseDiverse)) + then concat("collection('", $fulltextStandardArchDocPath, "', '", $fulltextStandardEchoDocPath, "', '", $fulltextStandardTeiDocPath, "', '", $fulltextStandardDiverseDocPath, "')") + else if(contains($docbase, $docBaseArch) and contains($docbase, $docBaseEcho) and contains($docbase, $docBaseTei) and not(contains($docbase, $docBaseDiverse))) then concat("collection('", $fulltextStandardArchDocPath, "', '", $fulltextStandardEchoDocPath, "', '", $fulltextStandardTeiDocPath, "')") - else if(contains($docbase, $docBaseArch) and contains($docbase, $docBaseEcho) and not(contains($docbase, $docBaseTei))) + else if(contains($docbase, $docBaseArch) and contains($docbase, $docBaseEcho) and not(contains($docbase, $docBaseTei)) and contains($docbase, $docBaseDiverse)) + then concat("collection('", $fulltextStandardArchDocPath, "', '", $fulltextStandardEchoDocPath, "', '", $fulltextStandardDiverseDocPath, "')") + else if(contains($docbase, $docBaseArch) and not(contains($docbase, $docBaseEcho)) and contains($docbase, $docBaseTei) and contains($docbase, $docBaseDiverse)) + then concat("collection('", $fulltextStandardArchDocPath, "', '", $fulltextStandardTeiDocPath, "', '", $fulltextStandardDiverseDocPath, "')") + else if(not(contains($docbase, $docBaseArch)) and contains($docbase, $docBaseEcho) and contains($docbase, $docBaseTei) and contains($docbase, $docBaseDiverse)) + then concat("collection('", $fulltextStandardEchoDocPath, "', '", $fulltextStandardTeiDocPath, "', '", $fulltextStandardDiverseDocPath, "')") + else if(contains($docbase, $docBaseArch) and contains($docbase, $docBaseEcho) and not(contains($docbase, $docBaseTei)) and not(contains($docbase, $docBaseDiverse))) then concat("collection('", $fulltextStandardArchDocPath, "', '", $fulltextStandardEchoDocPath, "')") - else if(contains($docbase, $docBaseArch) and not(contains($docbase, $docBaseEcho)) and contains($docbase, $docBaseTei)) + else if(contains($docbase, $docBaseArch) and not(contains($docbase, $docBaseEcho)) and not(contains($docbase, $docBaseTei)) and contains($docbase, $docBaseDiverse)) + then concat("collection('", $fulltextStandardArchDocPath, "', '", $fulltextStandardDiverseDocPath, "')") + else if(not(contains($docbase, $docBaseArch)) and not(contains($docbase, $docBaseEcho)) and contains($docbase, $docBaseTei) and contains($docbase, $docBaseDiverse)) + then concat("collection('", $fulltextStandardTeiDocPath, "', '", $fulltextStandardDiverseDocPath, "')") + else if(not(contains($docbase, $docBaseArch)) and contains($docbase, $docBaseEcho) and not(contains($docbase, $docBaseTei)) and contains($docbase, $docBaseDiverse)) + then concat("collection('", $fulltextStandardEchoDocPath, "', '", $fulltextStandardDiverseDocPath, "')") + else if(not(contains($docbase, $docBaseArch)) and contains($docbase, $docBaseEcho) and contains($docbase, $docBaseTei) and not(contains($docbase, $docBaseDiverse))) + then concat("collection('", $fulltextStandardEchoDocPath, "', '", $fulltextStandardTeiDocPath, "')") + else if(contains($docbase, $docBaseArch) and not(contains($docbase, $docBaseEcho)) and contains($docbase, $docBaseTei) and not(contains($docbase, $docBaseDiverse))) then concat("collection('", $fulltextStandardArchDocPath, "', '", $fulltextStandardTeiDocPath, "')") - else if(not(contains($docbase, $docBaseArch)) and contains($docbase, $docBaseEcho) and contains($docbase, $docBaseTei)) - then concat("collection('", $fulltextStandardEchoDocPath, "', '", $fulltextStandardTeiDocPath, "')") - else if(contains($docbase, $docBaseArch) and not(contains($docbase, $docBaseEcho)) and not(contains($docbase, $docBaseTei))) + else if(not(contains($docbase, $docBaseArch)) and not(contains($docbase, $docBaseEcho)) and not(contains($docbase, $docBaseTei)) and contains($docbase, $docBaseDiverse)) + then concat("collection('", $fulltextStandardDiverseDocPath, "')") + else if(not(contains($docbase, $docBaseArch)) and not(contains($docbase, $docBaseEcho)) and contains($docbase, $docBaseTei) and not(contains($docbase, $docBaseDiverse))) + then concat("collection('", $fulltextStandardTeiDocPath, "')") + else if(not(contains($docbase, $docBaseArch)) and contains($docbase, $docBaseEcho) and not(contains($docbase, $docBaseTei)) and not(contains($docbase, $docBaseDiverse))) + then concat("collection('", $fulltextStandardEchoDocPath, "')") + else if(contains($docbase, $docBaseArch) and not(contains($docbase, $docBaseEcho)) and not(contains($docbase, $docBaseTei)) and not(contains($docbase, $docBaseDiverse))) then concat("collection('", $fulltextStandardArchDocPath, "')") - else if(not(contains($docbase, $docBaseArch)) and contains($docbase, $docBaseEcho) and not(contains($docbase, $docBaseTei))) - then concat("collection('", $fulltextStandardEchoDocPath, "')") - else if(not(contains($docbase, $docBaseArch)) and not(contains($docbase, $docBaseEcho)) and contains($docbase, $docBaseTei)) - then concat("collection('", $fulltextStandardTeiDocPath, "')") - else "" + else () let $metadataStr := concat("(", $fulltextStandardCollectionStr, "/archimedes/info", "|" , $fulltextStandardCollectionStr, "/echo:echo/echo:metadata", "|" , $fulltextStandardCollectionStr, "/TEI:TEI/TEI:teiHeader", ")") let $fulltextStandardCollection := if($fulltextStandardCollectionStr != "") @@ -172,9 +207,14 @@ 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 $documentCollection := replace(string($documentUriOrig), "(.+)/.+\..*", "$1") let $documentUri := substring-after($documentUriOrig, $docPath) let $documentUriWithoutExtension := substring-before($documentUri, ".") + let $documentExtension := substring-after($documentUri, ".") + let $documentUriHtml := + if ($documentExtension = "html") + then concat($documentUriWithoutExtension, "-gen.html") + else concat($documentUriWithoutExtension, ".html") (: 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, "/"), "/") @@ -200,11 +240,12 @@ Download Download - Download + Download {$authors} {$titles} {$places} {$dates} + {$documentName} {$langs} {$docBase} {$lastModified} @@ -313,6 +354,7 @@ + @@ -324,7 +366,7 @@ - + @@ -340,6 +382,9 @@ + + + diff -r 257f67be5c00 -r 7e883ce72fec software/eXist/webapp/mpdl/doc/doc-operation-exist.xql --- a/software/eXist/webapp/mpdl/doc/doc-operation-exist.xql Tue Sep 27 16:40:57 2011 +0200 +++ b/software/eXist/webapp/mpdl/doc/doc-operation-exist.xql Tue Sep 27 16:41:15 2011 +0200 @@ -108,13 +108,16 @@ --> -let $eSciDocCookieId := session:get-attribute("eSciDocCookieId") +(: let $eSciDocCookieId := session:get-attribute("eSciDocCookieId") :) +let $eSciDocCookieId := "test4711" +let $bla := session:set-attribute("eSciDocCookieId", $eSciDocCookieId) let $docBaseOptions := let $docBaseOptionsSelected := for $option in $docBaseOptions/option diff -r 257f67be5c00 -r 7e883ce72fec software/eXist/webapp/mpdl/info.xql --- a/software/eXist/webapp/mpdl/info.xql Tue Sep 27 16:40:57 2011 +0200 +++ b/software/eXist/webapp/mpdl/info.xql Tue Sep 27 16:41:15 2011 +0200 @@ -33,7 +33,7 @@ else if ($info = 'malcolm') then (

Malcolm HymanDr. Malcolm Hyman
† September 4, 2009

,

In memoriam

, 'This software is dedicated to Malcolm Hyman, who was the founder and leader of this project. He died suddenly and unexpectedly. This project owes everything to him.',

His homepages

, ) else if ($info = 'docBases') - then (Archimedes DTD (until 2008): , 'more than 120 documents (4KB - 18MB), coming from Echo collections "Archimedes" and "Historical Travel Guides", languages: latin, italian, english, german, french, dutch, greek, arabic, chinese',
,
, Echo Schema (since 2009): , 'planned more than 100 documents in different languages',
,
, TEI Schema (since 2011): , 'different languages, mainly by external document providers') + then (Archimedes DTD (until 2008): , 'more than 120 documents (4KB - 18MB), coming from Echo collections "Archimedes" and "Historical Travel Guides", languages: latin, italian, english, german, french, dutch, greek, arabic, chinese',
,
, Echo Schema (since 2009): , 'planned more than 100 documents in different languages',
,
, TEI Schema (since 2011): , 'different languages, mainly by external document providers',
,
, Diverse (since 2011): , 'different languages, no schema prerequesites, mainly HTML documents') else if ($info = 'attr') then ('Attribute search is case sensitive.',

, 'Query syntax see: ', Lucene query syntax, '.') else if ($info = 'fulltextMorph') diff -r 257f67be5c00 -r 7e883ce72fec software/eXist/webapp/mpdl/interface/.DS_Store Binary file software/eXist/webapp/mpdl/interface/.DS_Store has changed diff -r 257f67be5c00 -r 7e883ce72fec software/eXist/webapp/mpdl/interface/page-fragment.xql --- a/software/eXist/webapp/mpdl/interface/page-fragment.xql Tue Sep 27 16:40:57 2011 +0200 +++ b/software/eXist/webapp/mpdl/interface/page-fragment.xql Tue Sep 27 16:41:15 2011 +0200 @@ -34,7 +34,7 @@ let $reqExport := request:get-parameter("export", "") let $options := string(request:get-parameter("options", "")) -let $presentationPath := "/db/mpdl/presentation" +let $presentationPath := "/mpdl/presentation" (: e.g. mpdlCollectioName is derived from mpdlDocUri: /archimedes/la/yourDoc.xml :) let $documentName := substring-before(substring-after(substring-after(substring-after($mpdlDocUri, "/"), "/"), "/"), ".") let $language := substring-before(substring-after(substring-after($mpdlDocUri, "/"), "/"), "/") @@ -50,7 +50,7 @@ then $document/echo:echo/echo:metadata else if ($docbase = 'tei') then $document/TEI:TEI/TEI:teiHeader - else '' + else () let $pageBreaks := if ($docbase = 'archimedes') @@ -59,7 +59,7 @@ then $document//echo:pb else if ($docbase = 'tei') then $document//TEI:pb - else $document//pb + else $document//*:pb let $countPagesTemp := count($pageBreaks) let $countPages := if ($countPagesTemp > 0) @@ -246,12 +246,13 @@ else false() let $returnPageFragmentWithExtObjects := + {$options} {$externalElements} {$xPointer} {$returnPageFragmentTmp} let $returnPageFragment := - if (contains($options, "withXmlNodeId") or $containsExternalElements or $xPointer != '') + if (contains($options, "withXmlNodeId") or contains($options, "withIdentifier") or $containsExternalElements or $xPointer != '') then mpdl-text:transform($returnPageFragmentWithExtObjects, concat($presentationPath, "/insertExternalElements.xsl")) else $returnPageFragmentTmp @@ -390,12 +391,13 @@ then {$errorCode}View mode {$mode} not available else {$errorCode}undefined error: {$errorCode} -let $declare := +let $outputProperties := if ($errorCode > 9 or $mode = "text" or $mode = "textPollux" or $mode = "gis" or $mode = "image" or $mode = "xml") - then util:declare-option("exist:serialize", "method=xhtml media-type=text/html omit-xml-declaration=no indent=no encoding=utf-8") + then "method=xhtml media-type=text/html omit-xml-declaration=no indent=no encoding=utf-8" else if ($mode = "pureXml") - then util:declare-option("exist:serialize", "method=xml media-type=text/xml omit-xml-declaration=no indent=yes encoding=utf-8") - else util:declare-option("exist:serialize", "method=xml media-type=text/xml omit-xml-declaration=no indent=yes encoding=utf-8") + then "method=xml media-type=text/xml omit-xml-declaration=no indent=yes encoding=utf-8" + else "method=xml media-type=text/xml omit-xml-declaration=no indent=yes encoding=utf-8" +let $declare := util:declare-option("exist:serialize", $outputProperties) let $xslFilePath := if($mode = "text" or $mode = "textPollux" or $mode = "gis" or $mode = "image" or $mode = "xml") then concat($presentationPath, "/pageFragmentHtml.xsl") diff -r 257f67be5c00 -r 7e883ce72fec software/eXist/webapp/mpdl/lucene/search.xql --- a/software/eXist/webapp/mpdl/lucene/search.xql Tue Sep 27 16:40:57 2011 +0200 +++ b/software/eXist/webapp/mpdl/lucene/search.xql Tue Sep 27 16:41:15 2011 +0200 @@ -48,7 +48,7 @@ then $document//echo:s[ft:query(., $query)]|$document//echo:head[ft:query(., $query)] else if ($mpdlCollectionName = 'tei') then $document//TEI:s[ft:query(., $query)]|$document//TEI:head[ft:query(., $query)] - else $document//s[ft:query(., $query)]|$document//head[ft:query(., $query)] + else $document//*:s[ft:query(., $query)]|$document//*:head[ft:query(., $query)] (: else $document//*[name() = 's' or name() = 'head'][ft:query(., $query)] this would be much slower and would consume too much memory :) let $from := ($pn * $pageSize) - $pageSize + 1 let $to := $pn * $pageSize @@ -57,6 +57,22 @@ for $ss at $poss in $t where $poss >= $from and $poss <= $to return $ss + let $docSentences := + if ($mpdlCollectionName = 'archimedes') + then $document//s + else if ($mpdlCollectionName = 'echo') + then $document//echo:s + else if ($mpdlCollectionName = 'tei') + then $document//TEI:s + else $document//*:s + let $docHeads := + if ($mpdlCollectionName = 'archimedes') + then $document//head + else if ($mpdlCollectionName = 'echo') + then $document//echo:head + else if ($mpdlCollectionName = 'tei') + then $document//TEI:head + else $document//*:head let $queryResult := for $hit at $pos in $tempQueryResult let $hitType := local-name($hit) @@ -68,20 +84,13 @@ if ($pbPlus1/parent::node() = $hit and $pbPlus1 intersect $hit/descendant::node()) then true() else false() - let $posOfHit := (: faster: comparison only in s or head elements of this document and only in a specific namespace :) - if ($mpdlCollectionName = 'archimedes' and $hitType = 's') - then count($pb/following::s[. << $hit]) + 1 - else if ($mpdlCollectionName = 'archimedes' and $hitType = 'head') - then count($pb/following::head[. << $hit]) + 1 - else if ($mpdlCollectionName = 'echo' and $hitType = 's') - then count($pb/following::echo:s[. << $hit]) + 1 - else if ($mpdlCollectionName = 'echo' and $hitType = 'head') - then count($pb/following::echo:head[. << $hit]) + 1 - else if ($mpdlCollectionName = 'tei' and $hitType = 's') - then count($pb/following::TEI:s[. << $hit]) + 1 - else if ($mpdlCollectionName = 'tei' and $hitType = 'head') - then count($pb/following::TEI:head[. << $hit]) + 1 - else count($pb/following::s[. << $hit]) + 1 + let $pageHits := + if ($hitType = 's') + then $docSentences/.[. >> $pb and . << $pbPlus1] + else if ($hitType = 'head') + then $docHeads/.[. >> $pb and . << $pbPlus1] + else $docSentences/.[. >> $pb and . << $pbPlus1] + let $posOfHit := count($pageHits/.[. << $hit]) + 1 let $position := $from - 1 + $pos let $resultElem := @@ -188,8 +197,14 @@ let $documentUri := document-uri($doc) let $docBase := functx:substring-after-last(functx:substring-before-last(functx:substring-before-last($documentUri, "/"), "/"), "/") let $metadataElem := mpdl-lucene:getMetadata($docBase, $doc) - let $attrElemName := mpdl-lucene:getElemNameByAttr($docBase, $orderBy) - let $orderByElem := mpdl-lucene:getElemDynamic($metadataElem, $attrElemName) (: this costs performance for many result elements :) + let $attrElemName := + if ($orderBy = "document") + then "document" + else mpdl-lucene:getElemNameByAttr($docBase, $orderBy) + let $orderByElem := + if ($attrElemName = "document") + then util:document-name($doc) + else mpdl-lucene:getElemDynamic($metadataElem, $attrElemName) (: this costs performance for many result elements :) let $orderByTemp := lower-case(string-join($orderByElem, ', ')) order by $orderByTemp return $attrElem) @@ -225,7 +240,7 @@ then $doc/echo:echo/echo:text else if ($docBase = 'tei') then $doc/TEI:TEI/TEI:text - else () + else $doc/*[1] return $result }; diff -r 257f67be5c00 -r 7e883ce72fec software/eXist/webapp/mpdl/page-query-result.xql --- a/software/eXist/webapp/mpdl/page-query-result.xql Tue Sep 27 16:40:57 2011 +0200 +++ b/software/eXist/webapp/mpdl/page-query-result.xql Tue Sep 27 16:41:15 2011 +0200 @@ -39,7 +39,7 @@ let $reqExport := request:get-parameter("export", "") let $options := string(request:get-parameter("options", "")) -let $presentationPath := "/db/mpdl/presentation" +let $presentationPath := "/mpdl/presentation" (: e.g. mpdlCollectioName is derived from mpdlDocUri: /archimedes/la/yourDoc.xml :) let $documentName := substring-before(substring-after(substring-after(substring-after($mpdlDocUri, "/"), "/"), "/"), ".") let $language := substring-before(substring-after(substring-after($mpdlDocUri, "/"), "/"), "/") @@ -60,7 +60,7 @@ then $document/echo:echo/echo:metadata else if ($docbase = 'tei') then $document/TEI:TEI/TEI:teiHeader - else '' + else () let $pageBreaks := if ($docbase = 'archimedes') @@ -69,7 +69,7 @@ then $document//echo:pb else if ($docbase = 'tei') then $document//TEI:pb - else $document//pb + else $document//*:pb let $countPagesTemp := count($pageBreaks) let $countPages := if ($countPagesTemp > 0) @@ -288,12 +288,13 @@ else false() let $returnPageFragmentWithExtObjects := + {$options} {$externalElements} {$xPointer} {$returnPageFragmentTmp} let $returnPageFragment := - if (contains($options, "withXmlNodeId") or $containsExternalElements or $xPointer != '') + if (contains($options, "withXmlNodeId") or contains($options, "withIdentifier") or $containsExternalElements or $xPointer != '') then mpdl-text:transform($returnPageFragmentWithExtObjects, concat($presentationPath, "/insertExternalElements.xsl")) else $returnPageFragmentTmp @@ -412,12 +413,13 @@ then {$errorCode}View mode {$mode} not available else {$errorCode}undefined error: {$errorCode} -let $declare := +let $outputProperties := if ($errorCode > 9 or $mode = "text" or $mode = "textPollux" or $mode = "gis" or $mode = "image" or $mode = "xml") - then util:declare-option("exist:serialize", "method=xhtml media-type=text/html omit-xml-declaration=no indent=no encoding=utf-8") + then "method=xhtml media-type=text/html omit-xml-declaration=no indent=no encoding=utf-8" else if ($mode = "pureXml") - then util:declare-option("exist:serialize", "method=xml media-type=text/xml omit-xml-declaration=no indent=yes encoding=utf-8") - else util:declare-option("exist:serialize", "method=xml media-type=text/xml omit-xml-declaration=no indent=yes encoding=utf-8") + then "method=xml media-type=text/xml omit-xml-declaration=no indent=yes encoding=utf-8" + else "method=xml media-type=text/xml omit-xml-declaration=no indent=yes encoding=utf-8" +let $declare := util:declare-option("exist:serialize", $outputProperties) let $xslFilePath := if($reqExport = "pdf") then concat($presentationPath, "/pageFragmentHtml.xsl") @@ -429,8 +431,10 @@ let $tmpResult := if ($errorCode < 10 and $reqExport = "pdf") then mpdl-text:html2pdf($language, $xmlResult, $xslFilePath, $titleStr, $pn, $mode) + else if ($errorCode < 10 and $reqExport = "pureXml") + then $xmlResult else if ($errorCode < 10 and not($reqExport = "pdf")) - then mpdl-text:transform($xmlResult, $xslFilePath) + then mpdl-text:transform($xmlResult, $xslFilePath) else

{$xmlResult}
(: error xml result :) let $result := diff -r 257f67be5c00 -r 7e883ce72fec software/eXist/webapp/mpdl/presentation/functions-text.xsl --- a/software/eXist/webapp/mpdl/presentation/functions-text.xsl Tue Sep 27 16:40:57 2011 +0200 +++ b/software/eXist/webapp/mpdl/presentation/functions-text.xsl Tue Sep 27 16:41:15 2011 +0200 @@ -7,7 +7,7 @@ xmlns:text="http://www.mpiwg-berlin.mpg.de/ns/mpdl/text" xmlns:xs="http://www.w3.org/2001/XMLSchema"> - + diff -r 257f67be5c00 -r 7e883ce72fec software/eXist/webapp/mpdl/presentation/insertExternalElements.xsl --- a/software/eXist/webapp/mpdl/presentation/insertExternalElements.xsl Tue Sep 27 16:40:57 2011 +0200 +++ b/software/eXist/webapp/mpdl/presentation/insertExternalElements.xsl Tue Sep 27 16:41:15 2011 +0200 @@ -10,6 +10,7 @@ + @@ -71,6 +72,7 @@ + @@ -81,6 +83,7 @@ + @@ -129,13 +132,28 @@ - - - - - - - + + + + + + + + + + + + + + + + + + + + + + diff -r 257f67be5c00 -r 7e883ce72fec software/eXist/webapp/mpdl/presentation/pageFragmentHtml.xsl --- a/software/eXist/webapp/mpdl/presentation/pageFragmentHtml.xsl Tue Sep 27 16:40:57 2011 +0200 +++ b/software/eXist/webapp/mpdl/presentation/pageFragmentHtml.xsl Tue Sep 27 16:41:15 2011 +0200 @@ -15,11 +15,9 @@ xmlns:svg="http://www.w3.org/2000/svg" xmlns:xhtml="http://www.w3.org/1999/xhtml"> - - - - - + + + @@ -75,53 +73,57 @@
- +
+ - + + + + - - + + - - - - - - - - - -
- Page image: {$linkImageScaler} -
-
- -
+ + + + + + + + + +
+ Page image: {$linkImageScaler} +
+
+ +
+










+ Page image:
+
+ , page +

+ not scanned +
+
+ +











- Page image:
+ Could not fetch:

, page

- not scanned -
-
- -
-










- Could not fetch:
-
- , page -

- from nausikaa2.rz-berlin.mpg.de: please try again later -
-
- -
-
- + from nausikaa2.rz-berlin.mpg.de: please try again later +
+
+ +
+
+
@@ -129,18 +131,28 @@
- + + - + - + + + + + + + + + + - + @@ -186,7 +198,15 @@ - + + + + + + + + + @@ -198,12 +218,12 @@
+ 0 - - - + + @@ -274,7 +294,16 @@ - + + + + + + + + + +
@@ -318,30 +347,41 @@
-
+ + +
+
+ +
+ -

- - - - - - - - - - - - - - - - -

+ + +

+ + + + + + + + + + + + + + + + +

+
+ +
@@ -365,6 +405,7 @@ +

@@ -640,6 +681,7 @@ + @@ -664,7 +706,7 @@
- + @@ -695,7 +737,12 @@ - + + + + + + @@ -707,12 +754,19 @@ + + + + + +

+ @@ -957,12 +1011,25 @@ - - - - - - + + + + + + + + + + + + + + + + + + + @@ -1171,6 +1238,7 @@ + @@ -1184,6 +1252,7 @@ + @@ -1207,12 +1276,12 @@
+ 0 - - - + + diff -r 257f67be5c00 -r 7e883ce72fec software/eXist/webapp/mpdl/presentation/pageHtml.css --- a/software/eXist/webapp/mpdl/presentation/pageHtml.css Tue Sep 27 16:40:57 2011 +0200 +++ b/software/eXist/webapp/mpdl/presentation/pageHtml.css Tue Sep 27 16:41:15 2011 +0200 @@ -23,6 +23,7 @@ span.xml.elementName { font-weight:bold;color:purple; } span.xml.attributeName { font-weight:bold; } span.xml.attributeValue { color:blue; } +span.xml.comment { color:green; font-style:italic; } ul.xml.element { margin-left:0px;padding-left:8px } ul.xml.element.highlight { background-color:#D3D3D3; } /* LightGrey */ @@ -105,8 +106,8 @@ /* notes */ span.note { font-style:italic; } -span.note.margin.left { position:absolute; left:2em; font-style:normal; } -span.note.margin.right { position:absolute; left:30em; font-style:normal; } +span.note.margin.left { position:absolute; left:2em; width: 5em; font-style:normal; } +span.note.margin.right { position:absolute; left:30em; width: 5em; font-style:normal; } /* GIS elements */ span.place { color:#0000FF; } /* Blue */ diff -r 257f67be5c00 -r 7e883ce72fec software/eXist/webapp/mpdl/presentation/pageHtml.xsl --- a/software/eXist/webapp/mpdl/presentation/pageHtml.xsl Tue Sep 27 16:40:57 2011 +0200 +++ b/software/eXist/webapp/mpdl/presentation/pageHtml.xsl Tue Sep 27 16:41:15 2011 +0200 @@ -15,14 +15,14 @@ xmlns:svg="http://www.w3.org/2000/svg" xmlns:xhtml="http://www.w3.org/1999/xhtml"> - - - - - + + + + + @@ -72,10 +72,10 @@ - . - . - , - . + . + . + , + . @@ -83,11 +83,9 @@ - +

- - @@ -241,7 +239,7 @@ - +
@@ -249,11 +247,15 @@ @@ -578,20 +580,6 @@ Lin Yutang - - - - - - - - - - - - - - Echo @@ -660,18 +648,28 @@ - + + - + - + + + + + + + + + + - + @@ -717,7 +715,15 @@ - + + + + + + + + + @@ -751,8 +757,6 @@ - - @@ -763,6 +767,7 @@ + @@ -807,7 +812,16 @@ - + + + + + + + + + +
@@ -851,30 +865,41 @@
-
+ + +
+
+ +
+ -

- - - - - - - - - - - - - - - - -

+ + +

+ + + + + + + + + + + + + + + + +

+
+ +
@@ -898,6 +923,7 @@ +

@@ -1173,6 +1199,7 @@ + @@ -1197,7 +1224,7 @@
- + @@ -1228,7 +1255,12 @@ - + + + + + + @@ -1240,12 +1272,19 @@ + + + + + +

+ @@ -1490,12 +1529,25 @@ - - - - - - + + + + + + + + + + + + + + + + + + + @@ -1702,6 +1754,7 @@ + @@ -1715,6 +1768,7 @@ + diff -r 257f67be5c00 -r 7e883ce72fec software/eXist/webapp/mpdl/presentation/queryHtml.xsl --- a/software/eXist/webapp/mpdl/presentation/queryHtml.xsl Tue Sep 27 16:40:57 2011 +0200 +++ b/software/eXist/webapp/mpdl/presentation/queryHtml.xsl Tue Sep 27 16:41:15 2011 +0200 @@ -12,8 +12,8 @@ xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns:functx="http://www.functx.com"> - - + + diff -r 257f67be5c00 -r 7e883ce72fec software/eXist/webapp/mpdl/query.xql --- a/software/eXist/webapp/mpdl/query.xql Tue Sep 27 16:40:57 2011 +0200 +++ b/software/eXist/webapp/mpdl/query.xql Tue Sep 27 16:41:15 2011 +0200 @@ -96,6 +96,13 @@
+ + @@ -242,7 +249,7 @@

See the eXist XQuery documentation and the XQuery source of this page, if you find a bug let us know -
Last MPDL software update: August, 2011 +
Last MPDL software update: September, 2011 \ No newline at end of file diff -r 257f67be5c00 -r 7e883ce72fec software/eXist/webapp/mpdl/text/all.xql --- a/software/eXist/webapp/mpdl/text/all.xql Tue Sep 27 16:40:57 2011 +0200 +++ b/software/eXist/webapp/mpdl/text/all.xql Tue Sep 27 16:41:15 2011 +0200 @@ -45,7 +45,7 @@ then $document/echo:echo/echo:text else if ($mpdlCollectionName = 'tei') then $document/TEI:TEI/TEI:text - else $document/archimedes/text + else $document/*[1] let $from := ($pn * $pageSize) - $pageSize + 1 let $to := $pn * $pageSize let $maxTo := 10000 @@ -218,7 +218,7 @@ then $document/echo:echo/echo:metadata else if ($docbase = 'tei') then $document/TEI:TEI/TEI:teiHeader - else '' + else () let $documentIdentifier := if ($docbase = 'archimedes') then $metadata/locator

- +
- + + + + +

Download
Download PDF

+ Diverse
+ (since 2011) +
+ + Info Document bases