You can subscribe to this list here.
2004 |
Jan
|
Feb
|
Mar
(57) |
Apr
(103) |
May
(164) |
Jun
(139) |
Jul
(173) |
Aug
(196) |
Sep
(221) |
Oct
(333) |
Nov
(214) |
Dec
(88) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2005 |
Jan
(163) |
Feb
(165) |
Mar
(98) |
Apr
(93) |
May
(199) |
Jun
(118) |
Jul
(200) |
Aug
(212) |
Sep
(185) |
Oct
(297) |
Nov
(437) |
Dec
(272) |
2006 |
Jan
(542) |
Feb
(329) |
Mar
(267) |
Apr
(332) |
May
(267) |
Jun
(130) |
Jul
(161) |
Aug
(348) |
Sep
(166) |
Oct
(305) |
Nov
(173) |
Dec
(173) |
2007 |
Jan
(199) |
Feb
(118) |
Mar
(133) |
Apr
(200) |
May
(208) |
Jun
(146) |
Jul
(198) |
Aug
(146) |
Sep
(187) |
Oct
(182) |
Nov
(181) |
Dec
(83) |
2008 |
Jan
(252) |
Feb
(124) |
Mar
(124) |
Apr
(101) |
May
(143) |
Jun
(122) |
Jul
(129) |
Aug
(60) |
Sep
(80) |
Oct
(89) |
Nov
(54) |
Dec
(112) |
2009 |
Jan
(88) |
Feb
(145) |
Mar
(105) |
Apr
(164) |
May
(123) |
Jun
(154) |
Jul
(374) |
Aug
(341) |
Sep
(219) |
Oct
(137) |
Nov
(373) |
Dec
(240) |
2010 |
Jan
(197) |
Feb
(270) |
Mar
(253) |
Apr
(150) |
May
(102) |
Jun
(51) |
Jul
(300) |
Aug
(512) |
Sep
(254) |
Oct
(258) |
Nov
(288) |
Dec
(143) |
2011 |
Jan
(238) |
Feb
(179) |
Mar
(253) |
Apr
(332) |
May
(248) |
Jun
(255) |
Jul
(216) |
Aug
(282) |
Sep
(146) |
Oct
(77) |
Nov
(86) |
Dec
(69) |
2012 |
Jan
(172) |
Feb
(234) |
Mar
(229) |
Apr
(101) |
May
(212) |
Jun
(267) |
Jul
(129) |
Aug
(210) |
Sep
(239) |
Oct
(271) |
Nov
(368) |
Dec
(220) |
2013 |
Jan
(179) |
Feb
(155) |
Mar
(59) |
Apr
(47) |
May
(99) |
Jun
(158) |
Jul
(185) |
Aug
(16) |
Sep
(16) |
Oct
(7) |
Nov
(20) |
Dec
(12) |
2014 |
Jan
(21) |
Feb
(17) |
Mar
(18) |
Apr
(13) |
May
(27) |
Jun
(15) |
Jul
(19) |
Aug
(22) |
Sep
(30) |
Oct
(16) |
Nov
(19) |
Dec
(16) |
2015 |
Jan
(14) |
Feb
(24) |
Mar
(33) |
Apr
(41) |
May
(14) |
Jun
(80) |
Jul
(53) |
Aug
(8) |
Sep
(7) |
Oct
(15) |
Nov
(13) |
Dec
(2) |
2016 |
Jan
(22) |
Feb
(12) |
Mar
(30) |
Apr
(6) |
May
(33) |
Jun
(16) |
Jul
(8) |
Aug
(20) |
Sep
(12) |
Oct
(18) |
Nov
(12) |
Dec
(11) |
2017 |
Jan
(24) |
Feb
(26) |
Mar
(47) |
Apr
(23) |
May
(19) |
Jun
(14) |
Jul
(28) |
Aug
(30) |
Sep
(17) |
Oct
|
Nov
|
Dec
|
2019 |
Jan
(1) |
Feb
(73) |
Mar
(90) |
Apr
(42) |
May
(116) |
Jun
(90) |
Jul
(127) |
Aug
(103) |
Sep
(56) |
Oct
(42) |
Nov
(95) |
Dec
(58) |
2020 |
Jan
(102) |
Feb
(31) |
Mar
(93) |
Apr
(60) |
May
(57) |
Jun
(45) |
Jul
(29) |
Aug
(32) |
Sep
(44) |
Oct
(86) |
Nov
(51) |
Dec
(71) |
2021 |
Jan
(44) |
Feb
(25) |
Mar
(78) |
Apr
(130) |
May
(64) |
Jun
(74) |
Jul
(21) |
Aug
(64) |
Sep
(40) |
Oct
(43) |
Nov
(21) |
Dec
(99) |
2022 |
Jan
(154) |
Feb
(64) |
Mar
(45) |
Apr
(95) |
May
(62) |
Jun
(48) |
Jul
(73) |
Aug
(37) |
Sep
(71) |
Oct
(27) |
Nov
(40) |
Dec
(65) |
2023 |
Jan
(89) |
Feb
(130) |
Mar
(124) |
Apr
(50) |
May
(93) |
Jun
(46) |
Jul
(45) |
Aug
(68) |
Sep
(62) |
Oct
(71) |
Nov
(108) |
Dec
(82) |
2024 |
Jan
(53) |
Feb
(76) |
Mar
(64) |
Apr
(75) |
May
(36) |
Jun
(54) |
Jul
(98) |
Aug
(137) |
Sep
(58) |
Oct
(177) |
Nov
(84) |
Dec
(52) |
2025 |
Jan
(70) |
Feb
(53) |
Mar
(72) |
Apr
(47) |
May
(88) |
Jun
(49) |
Jul
(86) |
Aug
(25) |
Sep
|
Oct
|
Nov
|
Dec
|
From: Wolfgang M. M. <wol...@us...> - 2004-07-22 08:31:26
|
Update of /cvsroot/exist/eXist-1.0/src/org/exist/xmldb In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv876/src/org/exist/xmldb Modified Files: RemoteIndexQueryService.java Log Message: Method reindexCollection throws ClassCastException: the xmlrpc method returns void. Index: RemoteIndexQueryService.java =================================================================== RCS file: /cvsroot/exist/eXist-1.0/src/org/exist/xmldb/RemoteIndexQueryService.java,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** RemoteIndexQueryService.java 21 Jul 2004 05:46:22 -0000 1.7 --- RemoteIndexQueryService.java 22 Jul 2004 08:31:17 -0000 1.8 *************** *** 57,61 **** params.addElement(path); try { ! Vector result = (Vector) rpcClient.execute("reindexCollection", params); } catch (XmlRpcException e) { throw new XMLDBException( --- 57,61 ---- params.addElement(path); try { ! rpcClient.execute("reindexCollection", params); } catch (XmlRpcException e) { throw new XMLDBException( |
From: Wolfgang M. M. <wol...@us...> - 2004-07-21 20:44:37
|
Update of /cvsroot/exist/eXist-1.0/webapp In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25102/webapp Modified Files: sitemap.xmap Log Message: First steps to integrate new library demo. Index: sitemap.xmap =================================================================== RCS file: /cvsroot/exist/eXist-1.0/webapp/sitemap.xmap,v retrieving revision 1.25 retrieving revision 1.26 diff -C2 -d -r1.25 -r1.26 *** sitemap.xmap 24 Apr 2004 13:45:54 -0000 1.25 --- sitemap.xmap 21 Jul 2004 20:44:28 -0000 1.26 *************** *** 616,619 **** --- 616,624 ---- </map:match> + <map:match pattern="mods/**"> + <map:mount check-reload="yes" src="mods/sitemap.xmap" + uri-prefix="mods"/> + </map:match> + <map:match pattern="examples.xml"> <map:generate src="examples.xml"/> |
From: Wolfgang M. M. <wol...@us...> - 2004-07-21 20:43:44
|
Update of /cvsroot/exist/eXist-1.0/webapp/mods/styles In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24889/webapp/mods/styles Added Files: mods-overview.xsl mods-detailed.xsl mods-common.xsl overview.xsl mods.css mods-form.css Log Message: First steps to integrate new library demo. --- NEW FILE: mods-form.css --- a {font-size:7pt;} a:link {text-decoration:none; color:#000000;} a:visited {text-decoration:none; color:#000000;} a:hover {text-decoration:underline; color:#000000;} a:active {text-decoration:underline; color:#000000;} a:focus {text-decoration:underline; color:#000000;} body { color:#000000; background-color:#ccc; font-family:Verdana,Arial,Helvetica; font-size:10pt; margin-top:5%; } input { color:#000000; background-color:#FFFFFF; font-family:Verdana,Arial,Helvetica; font-size:10pt; border:none; } input.invalid { background-color: #AA0000; } input:hover{ background-color:#aabbff; } input:focus{ background-color:#aabbff; color:white; } textarea { color:#000000; background-color:#FFFFFF; font-family:Verdana,Arial,Helvetica; font-size:10pt; border:none; } textarea:hover{ background-color:#aabbff; } textarea:focus{ background-color:#aabbff; color:white; } select { color:#000000; background-color:#FFFFFF; font-family:Verdana,Arial,Helvetica; font-size:10pt; border:none; } select:hover{ background-color:#aabbff; } select:focus{ background-color:#aabbff; color:white; } option {color:#000000; background-color:#FFFFFF; font-family:Verdana,Arial,Helvetica; font-size:10pt; border-color:#000000; border-width:0pt; border-style:hidden;} table { border-width:1pt; border-color:#000000; border-style:solid; border-collapse:collapse; border-spacing:0pt; margin-top:5pt; width:100%; } table.tabsheet { width: 690px; } td { color:#000000; background-color:#EEEEEE; font-family:Verdana,Arial,Helvetica; font-size:10pt; padding:5pt; } .hidden-table { border-width:1pt; border-color:#EEEEEE; border-style:solid; border-collapse:collapse; border-spacing:0pt; width:100%; } .active-tab {border-width:1pt; border-color:#000000; border-style:solid; border-bottom-style:hidden; padding-top:0pt; padding-bottom:0pt; padding-left:5pt; padding-right:5pt;} .inactive-tab { border-width:1pt; border-color:#000000; border-style:solid; background-color:#b8ceb4; padding:0pt; } .inactive-tab-button {background-color:#DDDDDD;} .filler-tab {border-width:1pt; border-color:#000000; border-style:solid; border-top-style:hidden; border-right-style:hidden; width:99%; background-color:#FFFFFF; text-align:right; padding-left:5pt; padding-right:5pt;} .group-label { color: white; font-weight: bold; border-width:1pt; border-color:#000000; border-style:solid; background-color:#b8ceb4; padding-left:5pt; padding-right:5pt; padding-top:2pt; padding-bottom:2pt; width:100%; } .control-label { vertical-align:middle; padding-left:5pt; padding-right:5pt; padding-bottom:5pt; width:30%; } .control { text-align:left; vertical-align:middle; padding-left:5pt; padding-right:5pt; padding-bottom: 5pt; width:70%; } .label { font-weight: bold; padding-bottom: 5px; } .full-group { padding: 5px; border: none; } .repeat-group { border: none; } .repeat-selected { border: none; white-space:nowrap; background-color:#FAFAFA; padding: 5px; } .repeat-deselected { border: none; white-space:nowrap; background-color:#dddddd; padding: 5px; } .selector-cell{ background-color:#cccccc; vertical-align:top; align:center; } .hint {font-size: 9pt;} .textarea { padding-top: 5px; } .action-panel {margin:5pt; text-align:center; vertical-align:middle;} .action-button {color:#000000; background-color:#DDDDDD; font-family:Verdana,Arial,Helvetica; font-size:10pt; border-color:#000000; border-width:1pt; border-style:solid; margin:5pt;} .alert { font-size: small; color:#FF0000; text-align:left; vertical-align:top; padding-top:2pt; padding-bottom:2pt; } .blog_shadow { background: url(../images/shadow-2.png); width: 680px; height: 20px; margin-left: 5px; } --- NEW FILE: mods-detailed.xsl --- <?xml version="1.0" encoding="UTF-8"?> <!-- Format query results for display --> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:m="http://www.loc.gov/mods/v3" xmlns:exist="http://exist.sourceforge.net/NS/exist" xmlns:java="http://xml.apache.org/xslt/java" version="1.0"> <xsl:template match="items"> <xsl:variable name="summary" select="floor((@start - 1) div @max) * @max + 1"/> <div> <table class="overview" cellspacing="0"> <xsl:call-template name="navigation"> <xsl:with-param name="position" select="'top'"/> <xsl:with-param name="summary" select="$summary"/> </xsl:call-template> <xsl:apply-templates/> <xsl:call-template name="navigation"> <xsl:with-param name="position" select="'bottom'"/> <xsl:with-param name="summary" select="$summary"/> </xsl:call-template> </table> <div class="blog_shadow"/> </div> </xsl:template> <xsl:template name="navigation"> <xsl:param name="position"/> <xsl:param name="summary"/> <tr class="result-head"> <th class="nav{$position}" width="20%"> <xsl:if test="@start > 1"> <a class="mods" href="?start={@start - 1}&display=details&max={@max}"> << Previous </a> </xsl:if> </th> <th class="nav{$position}" width="60%"> <a class="mods" href="?start={$summary}&display=summary&max={@max}"> <span class="icondesc">[Back to Overview]</span> </a> </th> <th class="nav{$position}" width="20%"> <xsl:if test="number(@next) < @hits"> <a class="mods" href="?start={@next}&display=details&max={@max}"> Next >> </a> </xsl:if> </th> </tr> </xsl:template> <xsl:template match="m:mods"> <tr> <td colspan="3"> <xsl:apply-templates select="m:titleInfo"/> <div class="mods_names"> <xsl:text>by </xsl:text><xsl:apply-templates select="m:name"/> </div> <xsl:apply-templates select="m:abstract"/> <table class="details" cellpadding="3"> <xsl:if test="m:subject"> <tr> <td class="details_heading">Subjects:</td> <td> <xsl:apply-templates select="m:subject/m:topic|m:geographic"/> </td> </tr> </xsl:if> <xsl:apply-templates select="m:typeOfResource"/> <xsl:apply-templates select="m:identifier"/> <xsl:apply-templates select="m:originInfo"/> </table> </td> </tr> </xsl:template> <xsl:template match="m:abstract"> <div class="mods_abstract"> <xsl:apply-templates/> </div> </xsl:template> <xsl:template match="m:titleInfo[not(@type)]"> <div class="dc_title"> <xsl:for-each select="m:nonSort|m:title"> <xsl:apply-templates select="."/><xsl:text> </xsl:text> </xsl:for-each> </div> <xsl:if test="m:subTitle"> <div class="mods_subTitle"> <xsl:apply-templates select="m:subTitle"/> </div> </xsl:if> </xsl:template> <xsl:template match="m:titleInfo[@type]"/> <xsl:template match="m:name"> <xsl:if test="position() > 1"> <xsl:text>; </xsl:text> </xsl:if> <xsl:choose> <xsl:when test="m:namePart[not(@type)]"> <a class="mods" href="?field=au&query={java:java.net.URLEncoder.encode(m:namePart[not(@type)], 'UTF-8')}&mode1=near&max={ancestor::query-results/@max}"> <xsl:apply-templates select="m:namePart[not(@type)]"/> </a> </xsl:when> <xsl:when test="m:namePart[@type='family']"> <xsl:variable name="name"> <xsl:value-of select="m:namePart[@type='family']"/>, <xsl:value-of select="m:namePart[@type='given']"/> </xsl:variable> <a class="mods" href="?field=au&query={java:java.net.URLEncoder.encode($name, 'UTF-8')}&mode1=near&max={ancestor::query-results/@max}"> <xsl:apply-templates select="m:namePart[@type='family']"/> <xsl:text>, </xsl:text> <xsl:apply-templates select="m:namePart[@type='given']"/> </a> </xsl:when> </xsl:choose> <xsl:if test="m:namePart[@type='date']"> <xsl:text> [</xsl:text> <xsl:value-of select="m:namePart[@type='date']"/> <xsl:text>]</xsl:text> </xsl:if> <xsl:if test="m:role"> <xsl:text> (</xsl:text> <xsl:value-of select="m:role/m:roleTerm|m:role/m:text"/> <xsl:text>)</xsl:text> </xsl:if> </xsl:template> <xsl:template match="m:typeOfResource"> <tr> <td class="details_heading">Type of Resource:</td> <td><xsl:apply-templates/></td> </tr> </xsl:template> <xsl:template match="m:subject"> <xsl:apply-templates select="m:topic"/> </xsl:template> <xsl:template match="m:topic"> <xsl:if test="position() != 1"> <xsl:text>; </xsl:text> </xsl:if> <xsl:apply-templates/> </xsl:template> <xsl:template match="m:originInfo"> <xsl:apply-templates select="m:edition"/> <xsl:apply-templates select="m:publisher"/> <xsl:apply-templates select="m:place"/> <xsl:apply-templates select="m:copyrightDate"/> <xsl:apply-templates select="m:dateIssued[1]"/> </xsl:template> <xsl:template match="m:dateIssued"> <tr> <td class="details_heading">Date Issued:</td> <td><xsl:apply-templates/></td> </tr> </xsl:template> <xsl:template match="m:copyrightDate"> <tr> <td class="details_heading">Copyright Date:</td> <td><xsl:apply-templates/></td> </tr> </xsl:template> <xsl:template match="m:edition"> <tr> <td class="details_heading">Edition:</td> <td><xsl:apply-templates/></td> </tr> </xsl:template> <xsl:template match="m:place"> <xsl:apply-templates select="m:placeTerm[@type='text']"/> </xsl:template> <xsl:template match="m:placeTerm"> <tr> <td class="details_heading">Place:</td> <td><xsl:apply-templates/></td> </tr> </xsl:template> <xsl:template match="m:publisher"> <tr> <td class="details_heading">Publisher:</td> <td><xsl:apply-templates/></td> </tr> </xsl:template> <xsl:template match="m:identifier"> <tr> <td class="details_heading"> Identifier (<xsl:value-of select="@type"/>) </td> <td> <xsl:choose> <xsl:when test="@type='uri'"> <a href="{text()}"> <xsl:apply-templates/> </a> </xsl:when> <xsl:otherwise> <xsl:apply-templates/> </xsl:otherwise> </xsl:choose> </td> </tr> </xsl:template> <xsl:template match="exist:match"> <span class="hit"><xsl:apply-templates/></span> </xsl:template> </xsl:stylesheet> --- NEW FILE: mods.css --- body { background-color: #ccc; font-family: Arial, Verdana, sans-serif; font-size: 11px; line-height: 1.4; } div#header { text-align: left; font-size: 18pt; padding: 10px; background: #686868; border: solid 1px gray; color: white; font-size: 14px; width: 860px; font-family: Arial; } .authors { margin-top: 35px; margin-bottom: 5px; padding-left: 10px; padding-right: 10px; text-align: right; border-top: 1px solid black; } .xmlsrc { margin-top: 20px; margin-bottom: 20px; padding-right: 10px; text-align: right; } div#content { margin-left: 160px; background: white; width: 690px; padding: 15px; border-left: 1px solid gray; border-bottom: 1px solid gray; border-right: 1px solid gray; } .blog_shadow { background: url(../images/shadow-2.png); width: 680px; height: 20px; margin-left: 5px; } div#sidebar { padding-left: 10px; padding-right: 10px; padding-bottom: 10px; width: 140px; margin-top: 0px; background: #f0f0f0; float: left } div.banner { padding-top: 30px; padding-bottom: 10px; } .variablelist { margin-left: 15px; } div.group { color: black; margin-top: 2px; text-align: left; font-size: 100%; font-weight: bold; padding-top: 10px; } a, a:visited: { color: #203cd8; text-decoration: none; } a:hover, a:active { color: black; background-color: #94FF9C; text-decoration: none; } a.group { color: black; text-decoration: none; } a.page { color: white; } div.item { font-size: 80%; padding-right: 10px; text-align: right; padding-left: 5px; padding-bottom: 2px; margin-left: 15px; } .item { font-size: 80%; } th, td { /* ns 4 */ } td.tab { border-right: 2px solid black; } td.tabpage { border-right: 2px solid black; border-bottom: 2px solid black; } tr.result-head { background-color: black; } tr.row-1 { background-color: rgb(235, 235, 235); } tr.row-2 { background-color: white; } .error { background-color: #ff5555; font-weight: bold; border: 1px solid black; padding-left: 5px; padding-right: 5px; padding-top: 5px; padding-bottom: 5px; margin-top: 5px; margin-bottom: 5px; text-align: center; } h1 { font-size: 14pt; font-weight: normal; border: 1px solid black; background-color: #F7F8E4; margin-left: 0px; margin-top: 5px; margin-bottom: 15px; padding: 10px; } h2.section { font-size: 14pt; font-weight: bold; margin-left: 10px; margin-top: 5px; margin-bottom: 5px; padding-left: 10px; text-align: left; } h3 { font-weight: bold; } div.expansion { font-weight: bold; } td.entry { border: 1pt solid black; } table.overview { border: 1pt solid black; background: white; cellspacing: 0; padding: 10px; width: 680px; } table.details { color: #666; margin-top: 10px; margin-left: 15px; } table.query { font-size: small; border: 1pt solid black; } a.mods { color: #666; text-decoration: underline; } td.overview { font-size: 11px; padding-left: 10px; padding-right: 10px; padding-top: 4px; padding-bottom: 4px; } th.navtop { font-size: 10px; background-color: #ceccb6; padding-left: 10px; padding-right: 10px; padding-top: 3px; padding-bottom: 4px; border-bottom: 1px black solid; } th.table-head { font-size: 10px; background-color: #b8ceb4; padding-left: 10px; padding-right: 10px; padding-top: 3px; padding-bottom: 4px; border-bottom: 1px black solid; } th.navbottom { font-size: 10px; border-top: 1px solid black; background-color: #ceccb6; padding-left: 10px; padding-right: 10px; } th.summary { color: white; } td.details_heading { font-weight: bold; } th.summary_heading { border-top: 1pt solid black; border-bottom: 1pt solid black; } div.hits { margin-top: 25px; margin-bottom: 25px; font-family: Courier, monospace; font-size: smaller; } div.dc_title { font-size: 16pt; margin-bottom: 8px; } div.mods_subTitle { font-size: 10pt; font-weight: bold; } div.mods_names { padding-top: 5px; padding-bottom: 5px; } div.mods_abstract { text-indent: 15px; text-align: justify; margin-top: 10px; margin-left: 25px; margin-right: 25px; } div.dcq_alternative { font-size: 10pt; font-weight: bold; } div.dcq_IMT { font-size: small; text-align: center; } blockquote { text-align: justify; } span.icondesc { font-size: small; padding-right: 5px; } img.icon { vertical-align: middle; padding-right: 15px; } a { text-decoration: none; color: gray; } span.hit { background-color: #F5FF82; } input { vertical-align: top; } input:hover{ background-color:#aabbff; } input:focus{ background-color:#aabbff; color:white; } --- NEW FILE: mods-common.xsl --- <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:m="http://www.loc.gov/mods/v3" xmlns:exist="http://exist.sourceforge.net/NS/exist" xmlns:java="http://xml.apache.org/xslt/java" version="1.0"> <xsl:template match="m:titleInfo[not(@type)]"> <span class="title"> <xsl:for-each select="m:nonSort|m:title"> <xsl:value-of select="."/><xsl:text> </xsl:text> </xsl:for-each> </span> </xsl:template> <xsl:template match="m:abstract"> <xsl:if test="string-length(text()) > 0"> <p class="keywords"> <span class="heading">Abstract: </span> <xsl:apply-templates/> </p> </xsl:if> </xsl:template> <xsl:template match="m:name"> <xsl:if test="position() != 1"> <xsl:text>; </xsl:text> </xsl:if> <xsl:choose> <xsl:when test="m:namePart[not(@type)]"> <a href="?field=au&query={java:java.net.URLEncoder.encode(m:namePart[not(@type)], 'UTF-8')}&mode1=near&max={ancestor::items/@max}"> <xsl:apply-templates select="m:namePart[not(@type)]"/> </a> </xsl:when> <xsl:when test="m:namePart[@type='family']"> <xsl:variable name="name"> <xsl:value-of select="m:namePart[@type='family']"/>, <xsl:value-of select="m:namePart[@type='given']"/> </xsl:variable> <a href="?field=au&query={java:java.net.URLEncoder.encode($name, 'UTF-8')}&mode1=near&max={ancestor::items/@max}"> <xsl:apply-templates select="m:namePart[@type='family']"/> <xsl:text>, </xsl:text> <xsl:apply-templates select="m:namePart[@type='given']"/> </a> </xsl:when> </xsl:choose> </xsl:template> <xsl:template match="m:topic|m:geographic"> <xsl:if test="position() != 1"> <xsl:text>; </xsl:text> </xsl:if> <a href="?field=su&query={java:java.net.URLEncoder.encode(text(), 'UTF-8')}&max={ancestor::items/@max}"> <xsl:value-of select="."/> </a> </xsl:template> </xsl:stylesheet> --- NEW FILE: overview.xsl --- <?xml version="1.0" encoding="UTF-8"?> <!-- Format query results for display --> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:m="http://www.loc.gov/mods/v3" xmlns:exist="http://exist.sourceforge.net/NS/exist" xmlns:java="http://xml.apache.org/xslt/java" version="1.0"> <xsl:include href="mods-common.xsl"/> <xsl:template match="items"> <div id="biblio"> <xsl:apply-templates select="item"/> </div> </xsl:template> <xsl:template match="item"> <div class="record"> <a href="{@chiba}&instance=/chiba/exist{../@collection}/{@doc}&submitsave=store.xq?document={@doc}"> <img src="images/edit.gif"/> </a> <a href="?action=remove&doc={java:java.net.URLEncoder.encode(@doc)}&collection={java:java.net.URLEncoder.encode(../@collection)}"><img src="images/delete.gif"/></a> <p class="citation"> <input type="checkbox" class="mark" value="N1"/> <xsl:apply-templates select="m:titleInfo"/> </p> <p class="keywords"> <span class="heading">By: </span> <xsl:apply-templates select="m:name"/> </p> <p class="keywords"> <span class="heading">Topics: </span> <xsl:apply-templates select="m:subject/m:topic|m:subject/m:geographic"/> </p> <xsl:apply-templates select="m:abstract"/> </div> </xsl:template> <xsl:template match="p"> <p><xsl:apply-templates/></p> </xsl:template> <xsl:template match="exist:match"> <span class="hit"><xsl:apply-templates/></span> </xsl:template> </xsl:stylesheet> --- NEW FILE: mods-overview.xsl --- <?xml version="1.0" encoding="UTF-8"?> <!-- Format query results for display --> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:m="http://www.loc.gov/mods/v3" xmlns:exist="http://exist.sourceforge.net/NS/exist" xmlns:java="http://xml.apache.org/xslt/java" version="1.0"> <xsl:template match="items"> <div> <table class="overview" cellspacing="0"> <xsl:call-template name="navigation"> <xsl:with-param name="position" select="'top'"/> </xsl:call-template> <xsl:apply-templates/> <xsl:call-template name="navigation"> <xsl:with-param name="position" select="'bottom'"/> </xsl:call-template> </table> <div class="blog_shadow"/> </div> </xsl:template> <xsl:template name="navigation"> <xsl:param name="position"/> <tr class="result-head"> <th class="nav{$position}" width="15%"> <xsl:if test="@start > 1"> <a class="mods" href="?start={@start - @max}&max={@max}"> << Previous </a> </xsl:if> </th> <th class="nav{$position}" width="70%" colspan="2"> Displaying items <xsl:value-of select="@start"/> to <xsl:value-of select="@next - 1"/> (total: <xsl:value-of select="@hits"/>)<br/> <span class="icondesc"> [<a class="mods" href="{@chiba}&submitsave={java:java.net.URLEncoder.encode('store.xq')}"> Create New </a>] </span> </th> <th class="nav{$position}" width="15%"> <xsl:if test="number(@next) < @hits"> <a class="mods" href="?start={@next}&max={@max}"> Next >> </a> </xsl:if> </th> </tr> <xsl:if test="$position='top'"> <tr class="result-head"> <th class="table-head" width="15%"></th> <th class="table-head" width="20%"> <a class="mods" href="?order=creator&start={@start}&max={@max}">Creator/Editor</a> </th> <th class="table-head" width="50%"> <a class="mods" href="?order=title&start={@start}&max={@max}">Title</a> </th> <th class="table-head" width="15%"> <a class="mods" href="?order=date&start={@start}&max={@max}">Date</a> </th> </tr> </xsl:if> </xsl:template> <xsl:template match="item"> <tr> <xsl:choose> <xsl:when test="position() mod 2 = 0"> <xsl:attribute name="class">row-1</xsl:attribute> </xsl:when> <xsl:otherwise> <xsl:attribute name="class">row-2</xsl:attribute> </xsl:otherwise> </xsl:choose> <td class="overview"> <a href="{@chiba}&instance=/chiba/exist/{@collection}/{@doc}&submitsave=store.xq?document={@doc}"> <img src="images/edit.gif"/> </a> <a href="?action=remove&doc={java:java.net.URLEncoder.encode(@doc)}&collection={java:java.net.URLEncoder.encode(@collection)}"><img src="images/delete.gif"/></a> </td> <td class="overview"> <xsl:apply-templates select="m:name"/> </td> <td class="overview"> <a class="mods" href="?start={../@start + position() - 1}&display=details&max={../@max}"> <xsl:apply-templates select="m:titleInfo"/> </a> </td> <td class="overview"> <xsl:choose> <xsl:when test="m:copyrightDate"> <xsl:value-of select="m:copyrightDate"/> </xsl:when> <xsl:when test="m:dateIssued[@type='marc']"> <xsl:value-of select="m:dateIssued[@type='marc']"/> </xsl:when> <xsl:when test="m:dateIssued"> <xsl:value-of select="m:dateIssued"/> </xsl:when> <xsl:when test="m:date"> <xsl:value-of select="m:date"/> </xsl:when> </xsl:choose> </td> </tr> </xsl:template> <xsl:template match="m:titleInfo[not(@type)]"> <xsl:for-each select="m:nonSort|m:title"> <xsl:value-of select="."/><xsl:text> </xsl:text> </xsl:for-each> </xsl:template> <xsl:template match="m:name"> <xsl:choose> <xsl:when test="m:namePart[not(@type)]"> <xsl:apply-templates select="m:namePart[not(@type)]"/> </xsl:when> <xsl:when test="m:namePart[@type='family']"> <xsl:apply-templates select="m:namePart[@type='family']"/> <xsl:text>, </xsl:text> <xsl:apply-templates select="m:namePart[@type='given']"/> </xsl:when> </xsl:choose> </xsl:template> <xsl:template match="p"> <p><xsl:apply-templates/></p> </xsl:template> <xsl:template match="exist:match"> <span class="hit"><xsl:apply-templates/></span> </xsl:template> </xsl:stylesheet> |
From: Wolfgang M. M. <wol...@us...> - 2004-07-21 20:43:44
|
Update of /cvsroot/exist/eXist-1.0/webapp/mods In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24889/webapp/mods Added Files: sitemap.xmap login.xhtml overview.xq config.xqm Log Message: First steps to integrate new library demo. --- NEW FILE: login.xhtml --- <html> <head> <title>Bibliography Login</title> <link href="styles/mods.css" type="text/css" rel="stylesheet"/> </head> <body> <h1>Login</h1> <form action="overview.xq" method="POST"> <table class="overview" cellpadding="5"> <tr> <th colspan="2" align="left">Please Login</th> </tr> <tr> <td align="left">Username:</td> <td><input name="user" type="text" size="20"/></td> </tr> <tr> <td align="left">Password:</td> <td><input name="pass" type="password" size="20"/></td> </tr> <tr> <td colspan="2" align="left"><input type="submit"/></td> </tr> </table> </form> </body> </html> --- NEW FILE: overview.xq --- xquery version "1.0"; declare namespace m="http://www.loc.gov/mods/v3"; declare namespace b="http://exist-db.org/bibliography"; (: Load library modules :) declare namespace request="http://exist-db.org/xquery/request"; declare namespace xsl="http://exist-db.org/xquery/transform"; declare namespace util="http://exist-db.org/xquery/util"; declare namespace xmldb="http://exist-db.org/xquery/xmldb"; import module namespace c="http://exist-db.org/modules/mods-config" at "config.xqm"; (: Removes a document :) declare function b:remove($user, $pass) as element() { let $doc := request:request-parameter("doc", ()), $path := request:request-parameter("collection", ()) return if(empty($doc) or empty($path)) then <p>Required parameter "doc" or "collection" is missing!</p> else ( <p>Removing document {$doc} from collection {$path}.</p>, let $collection := xmldb:collection(concat("xmldb:exist://", $path), $user, $pass) return xmldb:remove-resource($collection, $doc) ) }; (: Get the XPath expression for the specified field :) declare function b:queryField($field as xs:string) as xs:string { if($field eq "au") then "m:name" else if($field eq "ti") then "m:titleInfo" else if($field eq "ab") then "m:abstract" else if($field eq "su") then "m:subject" else if($field eq "ye") then "m:originInfo/m:dateIssued" else "." }; (: Map order parameter to xpath for order by clause :) declare function b:orderExpr($field as xs:string) as xs:string { if ($field = "creator") then "$m/m:name[1]/m:namePart[@type='family'],$m/m:name[1]/m:namePart[@type='given']" else if ($field = "title") then "$m/m:titleInfo[1]/m:title" else "$m/m:originInfo/m:dateIssued[1] descending" }; (: Create an XPath expression for the current field and search terms :) declare function b:createXPath($user as xs:string, $terms as xs:string) as xs:string { let $home := b:getUserHome($user), $field := request:request-parameter("field", "any") return if(empty($terms) or $terms eq "") then concat("collection('", $home, "')//m:mods") else concat("collection('", $home, "')//m:mods[", b:queryField($field), " &= '", $terms, "']") }; declare function b:displayOverview($recs as item()*, $user) as element() { let $count := count($recs), $max := request:request-parameter("howmany", "5") cast as xs:int, $start := request:request-parameter("start", "1") cast as xs:int, $end := if ($start + $max - 1 < $count) then $start + $max - 1 else $count return <items start="{$start}" hits="{$count}" next="{$end + 1}" max="{$max}" chiba="{request:encode-url($c:chiba)}" collection="{b:getUserHome($user)}"> { for $p in $start to $end let $m := item-at($recs, $p) return <item doc="{util:document-name($m)}" chiba="{request:encode-url($c:chiba)}"> { c:displayItem($m) } </item> } </items> }; declare function b:displayDetails($recs as item()*, $user) as element() { let $count := count($recs), $max := xs:int(request:request-parameter("howmany", "5")), $start := xs:int(request:request-parameter("start", "1")), $hit := item-at($recs, $start) return <items hits="{$count}" start="{$start}" next="{$start + 1}" max="{$max}" collection="{b:getUserHome($user)}"> {$hit} </items> }; declare function b:display($recs as item()*, $user) as element() { let $display := request:request-parameter("display", "overview") return if($display eq "details") then xsl:transform(b:displayDetails($recs, $user), $c:detailsXsl, ()) else xsl:transform(b:displayOverview($recs, $user), $c:overviewXsl, ()) }; declare function b:buildQuery($xpath as xs:string, $order as xs:string) as xs:string { let $orderExpr := b:orderExpr($order) return concat("for $m in ", $xpath, " order by ", $orderExpr, " return $m") }; declare function b:reorder($order as xs:string, $user as xs:string) as element()+ { let $xpath := request:get-session-attribute("query"), $recs := util:eval(b:buildQuery($xpath, $order)), $x := request:set-session-attribute("cache", $recs) return b:display($recs, $user) }; declare function b:query($user as xs:string) as element()+ { let $start := request:request-parameter("start", ()), $cached := request:get-session-attribute("cache"), $orderby := request:request-parameter("order", ""), $terms := request:request-parameter("query", ()) return (: if parameter "start" is not set, execute a new query :) if(empty($start) or empty($cached)) then let $xpath := b:createXPath($user, $terms), $recs := util:eval(b:buildQuery($xpath, $orderby)), $x := request:set-session-attribute("query", $xpath), $r := request:set-session-attribute("cache", $recs) return b:display($recs, $user) (: redisplay previous query results :) else if($orderby != "") then b:reorder($orderby, $user) else ( util:log("debug", ("Reading from cache: start = ", $start)), b:display($cached, $user) ) }; declare function b:getUserHome($user as xs:string?) as xs:string? { let $collection := request:get-session-attribute("collection") return if($collection) then $collection else let $home := string(doc("/db/system/users.xml")//user[@name = $user]/@home) return ( request:set-session-attribute("collection", $home), $home ) }; declare function b:main($user as xs:string, $pass as xs:string) as element()+ { let $action := request:request-parameter("action", "") return ( util:log("debug", "checking action"), if($action eq "remove") then b:remove($user, $pass) else util:log("debug", "no action"), b:query($user)) }; <html> <head> <title>Bibliography Overview</title> <link href="{$c:css}" type="text/css" rel="stylesheet"/> </head> <body> <div id="top"><h1>Records Overview</h1></div> { c:sidebar(request:encode-url(request:request-uri())) } <!-- Process action if specified --> { let $user := request:get-session-attribute("user"), $pass := request:get-session-attribute("password"), return b:main($user, $pass) } </body> </html> --- NEW FILE: config.xqm --- module namespace c="http://exist-db.org/modules/mods-config"; declare namespace mods="http://www.loc.gov/mods/v3"; (: the base URI for the chiba servlet :) declare variable $c:chiba { "/chiba/XFormsServlet?form=/forms/mods.xml" }; (: the xsl stylesheet to use for display :) declare variable $c:overviewXsl { "styles/overview.xsl" }; declare variable $c:detailsXsl { "styles/mods-detailed.xsl" }; declare variable $c:css { "styles/default-style.css" }; (: called to select elements from a record for display :) declare function c:displayItem($record as element()) as element()+ { $record/mods:titleInfo, $record/mods:name, $record/mods:abstract, $record/mods:subject, $record/mods:originInfo/mods:dateIssued }; declare function c:sidebar($url as xs:string) { <div id="sidebar"> <div id="navcontainer"> <ul id="navlist"> <li id="active"> <a href="{$url}" id="current">Home</a> </li> <li> <a href="{$c:chiba}&submitsave=store.xq">Add Record</a> </li> <li> <a href="#">Detailed View</a> </li> <li> <a href="#">Process Document</a> </li> </ul> <form action="{$url}" method="GET"> <input class="search-sidebar" name="query" type="text" /> <input type="submit" class="search-button" value="search"/> </form> </div> </div> }; --- NEW FILE: sitemap.xmap --- <?xml version="1.0" encoding="UTF-8"?> <map:sitemap xmlns:map="http://apache.org/cocoon/sitemap/1.0"> <!-- =========================== Components ================================ --> <map:components> <map:generators default="file"> <map:generator name="xquery" logger="sitemap.generator.xquery" src="org.exist.cocoon.XQueryGenerator"> </map:generator> </map:generators> <map:readers default="resource"/> <map:serializers default="html"/> <map:selectors default="browser"/> <map:matchers default="wildcard"/> <map:transformers default="xslt"> </map:transformers> </map:components> <!-- =========================== Pipelines ================================= --> <map:pipelines> <map:pipeline> <map:match pattern="*.xml"> <map:generate src="{1}.xml"/> <map:transform type="xinclude"/> <map:transform src="context://stylesheets/doc2html-2.xsl"/> <map:transform type="encodeURL"/> <map:serialize encoding="UTF-8" type="html"/> </map:match> <map:match pattern="overview.xq"> <map:act src="xmldb:exist:///db" type="xmldb-login"> <map:generate src="overview.xq" type="xquery"/> <map:transform type="xinclude"/> <map:select type="request-parameter"> <map:parameter name="parameter-name" value="display"/> <map:when test="details"> <map:transform src="styles/mods-detailed.xsl"/> </map:when> <map:otherwise> <map:transform src="styles/overview.xsl"/> </map:otherwise> </map:select> <map:transform type="encodeURL"/> <map:serialize encoding="UTF-8" type="html"/> </map:act> <map:generate src="login.xhtml"/> <map:transform type="encodeURL"/> <map:serialize type="html" encoding="UTF-8"/> </map:match> <!--map:match pattern="secure.xq"> <map:act src="xmldb:exist:///db" type="xmldb-login"> <map:generate src="biblio.xq" type="xquery"/> <map:transform type="xinclude"/> <map:transform src="context://stylesheets/doc2html-2.xsl"/> <map:transform type="encodeURL"/> <map:serialize encoding="UTF-8" type="html"/> </map:act> <map:generate src="login.xml"/> <map:transform type="xinclude"/> <map:transform src="context://stylesheets/doc2html-2.xsl"/> <map:transform type="encodeURL"/> <map:serialize type="html"/> </map:match--> <map:match pattern="mods.xq"> <map:generate src="mods.xq" type="xquery"/> <map:transform type="xinclude"/> <map:select type="request-parameter"> <map:parameter name="parameter-name" value="display"/> <map:when test="details"> <map:transform src="stylesheets/mods-detailed.xsl"/> </map:when> <map:otherwise> <map:transform src="stylesheets/mods-overview.xsl"/> </map:otherwise> </map:select> <map:transform type="encodeURL"/> <map:serialize encoding="UTF-8" type="html"/> </map:match> <map:match pattern="*.xq"> <map:generate src="{1}.xq" type="xquery"> <map:parameter name="file" value="{1}.xq"/> </map:generate> <map:serialize encoding="UTF-8" type="html"/> </map:match> <map:match pattern="source/*.xq"> <map:read src="{1}.xq" mime-type="text/text"/> </map:match> <map:match pattern="**.xqm"> <map:read src="{1}.xqm" mime-type="text/text"/> </map:match> </map:pipeline> </map:pipelines> </map:sitemap> |
From: Wolfgang M. M. <wol...@us...> - 2004-07-21 20:43:33
|
Update of /cvsroot/exist/eXist-1.0/webapp/mods/styles In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24834/webapp/mods/styles Log Message: Directory /cvsroot/exist/eXist-1.0/webapp/mods/styles added to the repository |
From: Wolfgang M. M. <wol...@us...> - 2004-07-21 20:43:20
|
Update of /cvsroot/exist/eXist-1.0/webapp/mods In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24834/webapp/mods Log Message: Directory /cvsroot/exist/eXist-1.0/webapp/mods added to the repository |
From: Wolfgang M. M. <wol...@us...> - 2004-07-21 10:48:35
|
Update of /cvsroot/exist/eXist-1.0/src/org/exist/storage In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30235/src/org/exist/storage Modified Files: NativeTextEngine.java Log Message: Code to track term frequency counts in NativeTextEngine had to be rewritten as it slowed down the indexing. Index: NativeTextEngine.java =================================================================== RCS file: /cvsroot/exist/eXist-1.0/src/org/exist/storage/NativeTextEngine.java,v retrieving revision 1.63 retrieving revision 1.64 diff -C2 -d -r1.63 -r1.64 *** NativeTextEngine.java 21 Jul 2004 08:53:55 -0000 1.63 --- NativeTextEngine.java 21 Jul 2004 10:48:27 -0000 1.64 *************** *** 1032,1036 **** os.writeByte(section); os.writeInt(len); ! is.copyTo(os, len); } else { // copy nodes to new list --- 1032,1036 ---- os.writeByte(section); os.writeInt(len); ! is.copyTo(os, termFreq ? len * 2 : len); } else { // copy nodes to new list |
From: Wolfgang M. M. <wol...@us...> - 2004-07-21 08:54:06
|
Update of /cvsroot/exist/eXist-1.0/src/org/exist/storage In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15944/src/org/exist/storage Modified Files: NativeTextEngine.java NativeElementIndex.java Log Message: Code to track term frequency counts in NativeTextEngine had to be rewritten as it slowed down the indexing. Index: NativeElementIndex.java =================================================================== RCS file: /cvsroot/exist/eXist-1.0/src/org/exist/storage/NativeElementIndex.java,v retrieving revision 1.34 retrieving revision 1.35 diff -C2 -d -r1.34 -r1.35 *** NativeElementIndex.java 19 Jul 2004 13:06:24 -0000 1.34 --- NativeElementIndex.java 21 Jul 2004 08:53:56 -0000 1.35 *************** *** 640,646 **** last = gid; address = StorageAddress.read(is); ! if (!containsNode(idList, gid)) newList.add(new NodeProxy(doc, gid, address)); } } --- 640,647 ---- last = gid; address = StorageAddress.read(is); ! if (!containsNode(idList, gid)) { newList.add(new NodeProxy(doc, gid, address)); + } } } *************** *** 668,676 **** StorageAddress.write(p.getInternalAddress(), os); } ! if (val == null) { ! dbElement.put(ref, os.data()); ! } else { ! dbElement.update(val.getAddress(), ref, os.data()); ! } } catch (LockException e) { LOG.error("could not acquire lock on elements", e); --- 669,677 ---- StorageAddress.write(p.getInternalAddress(), os); } ! if (val == null) { ! dbElement.put(ref, os.data()); ! } else { ! dbElement.update(val.getAddress(), ref, os.data()); ! } } catch (LockException e) { LOG.error("could not acquire lock on elements", e); Index: NativeTextEngine.java =================================================================== RCS file: /cvsroot/exist/eXist-1.0/src/org/exist/storage/NativeTextEngine.java,v retrieving revision 1.62 retrieving revision 1.63 diff -C2 -d -r1.62 -r1.63 *** NativeTextEngine.java 19 Jul 2004 08:12:29 -0000 1.62 --- NativeTextEngine.java 21 Jul 2004 08:53:55 -0000 1.63 *************** *** 75,80 **** import org.exist.util.Lock; import org.exist.util.LockException; import org.exist.util.Occurrences; ! import org.exist.util.OrderedLinkedList; import org.exist.util.ProgressIndicator; import org.exist.util.ReadOnlyException; --- 75,81 ---- import org.exist.util.Lock; import org.exist.util.LockException; + import org.exist.util.LongLinkedList; import org.exist.util.Occurrences; ! import org.exist.util.OrderedLongLinkedList; import org.exist.util.ProgressIndicator; import org.exist.util.ReadOnlyException; *************** *** 300,304 **** byte[] data; long gid; - int freq = 1; int docId; int len; --- 301,304 ---- *************** *** 307,310 **** --- 307,311 ---- long last; long delta; + int freq = 1; Collection collection; short collectionId; *************** *** 344,351 **** last = 0; for (int j = 0; j < len; j++) { ! delta = is.readLong(); if(termFreq) freq = is.readInt(); - gid = last + delta; last = gid; count++; --- 345,351 ---- last = 0; for (int j = 0; j < len; j++) { ! gid = last + is.readLong(); if(termFreq) freq = is.readInt(); last = gid; count++; *************** *** 357,366 **** true, -1); if (parent != null) { result.add(parent, sizeHint); ! if (trackMatches != Serializer.TAG_NONE) { ! match = new Match(term, gid); ! match.setFrequency(freq); parent.addMatch(match); - } } } else --- 357,365 ---- true, -1); if (parent != null) { + match = new Match(term, gid); + match.setFrequency(freq); result.add(parent, sizeHint); ! if (trackMatches != Serializer.TAG_NONE) parent.addMatch(match); } } else *************** *** 546,551 **** section = is.readByte(); len = is.readInt(); ! is.skip(termFreq ? len * 2 : len); ! oc.addOccurrences(len); } } catch (EOFException e) { --- 545,552 ---- section = is.readByte(); len = is.readInt(); ! for(int k = 0; k < len; k++) { ! is.skip(1); ! oc.addOccurrences(is.readInt()); ! } } } catch (EOFException e) { *************** *** 738,742 **** invIdx.setDocument(doc); String sal= text.getXMLString().transformToLower().toString() ; ! invIdx.addText(sal, gid); } else { while (null != (token = tokenizer.nextToken())) { --- 739,743 ---- invIdx.setDocument(doc); String sal= text.getXMLString().transformToLower().toString() ; ! invIdx.addText(sal, gid); } else { while (null != (token = tokenizer.nextToken())) { *************** *** 772,776 **** } } ! private final static class WordRef extends Value { --- 773,821 ---- } } ! ! private static class TermFrequencyList extends OrderedLongLinkedList { ! ! protected static class TermFreq extends LongLinkedList.ListItem { ! ! int count = 1; ! ! public TermFreq(long l) { ! super(l); ! } ! ! public void increment() { ! ++count; ! } ! } ! ! /* (non-Javadoc) ! * @see org.exist.util.LongLinkedList#createListItem(long) ! */ ! protected ListItem createListItem(long l) { ! return new TermFreq(l); ! } ! ! public void incLastTerm() { ! if(last != null) ! ((TermFreq)last).increment(); ! } ! ! public void setLastTermFreq(int freq) { ! if(last != null) ! ((TermFreq)last).count = freq; ! } ! ! public TermFreq[] toArray() { ! TermFreq[] data = new TermFreq[count]; ! ListItem next = first; ! int i = 0; ! while( next != null ) { ! data[i++] = (TermFreq)next; ! next = next.next; ! } ! return data; ! } ! } ! private final static class WordRef extends Value { *************** *** 796,800 **** } } - /** * This inner class is responsible for actually storing the list of --- 841,844 ---- *************** *** 804,839 **** */ final class InvertedIndex { ! ! private class TermOccurrence extends OrderedLinkedList.Node implements Comparable { ! long gid; ! int frequency = 1; ! ! public TermOccurrence(long gid) { ! this.gid = gid; ! } ! ! public int compareTo(OrderedLinkedList.Node o) { ! final TermOccurrence other = (TermOccurrence)o; ! if(gid == other.gid) ! return 0; ! else if(gid < other.gid) ! return -1; ! else ! return 1; ! } ! ! public int compareTo(Object o) { ! return compareTo((OrderedLinkedList.Node)o); ! } ! ! public boolean equals(org.exist.util.OrderedLinkedList.Node other) { ! return gid == ((TermOccurrence)other).gid; ! } ! } ! private DocumentImpl doc = null; private Map words[] = new TreeMap[2]; private VariableByteOutputStream os = new VariableByteOutputStream(7); ! public InvertedIndex() { // To distinguish between attribute values and text, we use --- 848,856 ---- */ final class InvertedIndex { ! private DocumentImpl doc = null; private Map words[] = new TreeMap[2]; private VariableByteOutputStream os = new VariableByteOutputStream(7); ! public InvertedIndex() { // To distinguish between attribute values and text, we use *************** *** 845,883 **** public void addText(String word, long gid) { ! OrderedLinkedList buf = (OrderedLinkedList) words[0].get(word); ! TermOccurrence o; if (buf == null) { ! buf = new OrderedLinkedList(); ! o = new TermOccurrence(gid); ! buf.add(o); words[0].put(word, buf); ! } else { ! o = (TermOccurrence)buf.getLast(); ! if(o.gid == gid) { ! o.frequency++; ! } else { ! o = new TermOccurrence(gid); ! buf.add(o); ! } ! } } public void addAttribute(String word, long gid) { ! OrderedLinkedList buf = (OrderedLinkedList) words[1].get(word); ! TermOccurrence o; if (buf == null) { ! buf = new OrderedLinkedList(); ! o = new TermOccurrence(gid); ! buf.add(o); words[1].put(word, buf); ! } else { ! o = (TermOccurrence)buf.getLast(); ! if(o.gid == gid) ! o.frequency++; ! else { ! o = new TermOccurrence(gid); ! buf.add(o); ! } ! } } --- 862,886 ---- public void addText(String word, long gid) { ! TermFrequencyList buf = (TermFrequencyList) words[0].get(word); if (buf == null) { ! buf = new TermFrequencyList(); ! buf.add(gid); words[0].put(word, buf); ! } else if (buf.getLast() == gid) { ! buf.incLastTerm(); ! } else ! buf.add(gid); } public void addAttribute(String word, long gid) { ! TermFrequencyList buf = (TermFrequencyList) words[1].get(word); if (buf == null) { ! buf = new TermFrequencyList(); ! buf.add(gid); words[1].put(word, buf); ! } else if (buf.getLast() == gid) { ! buf.incLastTerm(); ! } else ! buf.add(gid); } *************** *** 890,895 **** Map.Entry entry; String word; ! OrderedLinkedList idList; ! TermOccurrence[] ids; byte[] data; long last, gid; --- 893,898 ---- Map.Entry entry; String word; ! TermFrequencyList idList; ! TermFrequencyList.TermFreq[] ids; byte[] data; long last, gid; *************** *** 898,903 **** NodeProxy p; WordRef ref; ! TermOccurrence t; ! OrderedLinkedList newList; Value val = null; VariableByteArrayInput is; --- 901,906 ---- NodeProxy p; WordRef ref; ! TermFrequencyList newList; ! int freq = 1; Value val = null; VariableByteArrayInput is; *************** *** 907,911 **** entry = (Map.Entry) i.next(); word = (String) entry.getKey(); ! idList = (OrderedLinkedList) entry.getValue(); ref = new WordRef(collectionId, word); try { --- 910,914 ---- entry = (Map.Entry) i.next(); word = (String) entry.getKey(); ! idList = (TermFrequencyList) entry.getValue(); ref = new WordRef(collectionId, word); try { *************** *** 913,917 **** val = dbWords.get(ref); os.clear(); ! newList = new OrderedLinkedList(); if (val != null) { // add old entries to the new list --- 916,920 ---- val = dbWords.get(ref); os.clear(); ! newList = new TermFrequencyList(); if (val != null) { // add old entries to the new list *************** *** 928,938 **** last = 0; for (int j = 0; j < len; j++) { ! delta = is.readLong(); ! last = last + delta; ! t = new TermOccurrence(last); if(termFreq) ! t.frequency = is.readInt(); ! if (!idList.contains(t)) ! newList.add(t); } } else { --- 931,941 ---- last = 0; for (int j = 0; j < len; j++) { ! last = last + is.readLong(); if(termFreq) ! freq = is.readInt(); ! if (!idList.contains(last)) { ! newList.add(last); ! newList.setLastTermFreq(freq); ! } } } else { *************** *** 954,959 **** } } ! ids = new TermOccurrence[newList.size()]; ! newList.toArray(ids); //i.remove(); Arrays.sort(ids); --- 957,961 ---- } } ! ids = newList.toArray(); //i.remove(); Arrays.sort(ids); *************** *** 964,968 **** last = 0; for (int j = 0; j < len; j++) { ! delta = ids[j].gid - last; if (delta < 0) { LOG.debug("neg. delta: " + delta + " for " + word); --- 966,970 ---- last = 0; for (int j = 0; j < len; j++) { ! delta = ids[j].l - last; if (delta < 0) { LOG.debug("neg. delta: " + delta + " for " + word); *************** *** 971,976 **** os.writeLong(delta); if(termFreq) ! os.writeInt(ids[j].frequency); ! last = ids[j].gid; } try { --- 973,978 ---- os.writeLong(delta); if(termFreq) ! os.writeInt(ids[j].count); ! last = ids[j].l; } try { *************** *** 998,1006 **** Map.Entry entry; String word; ! OrderedLinkedList idList; ! TermOccurrence[] ids; ! TermOccurrence t; ! long last, gid; ! long delta; byte section; NodeProxy p; --- 1000,1007 ---- Map.Entry entry; String word; ! TermFrequencyList idList; ! TermFrequencyList.TermFreq[] ids; ! long last, gid, delta; ! int freq = 1; byte section; NodeProxy p; *************** *** 1012,1016 **** entry = (Map.Entry) i.next(); word = (String) entry.getKey(); ! idList = (OrderedLinkedList) entry.getValue(); ref = new WordRef(collectionId, word); try { --- 1013,1017 ---- entry = (Map.Entry) i.next(); word = (String) entry.getKey(); ! idList = (TermFrequencyList) entry.getValue(); ref = new WordRef(collectionId, word); try { *************** *** 1031,1047 **** os.writeByte(section); os.writeInt(len); ! is.copyTo(os, (termFreq ? len * 2 : len)); } else { // copy nodes to new list gid = 0; for (int j = 0; j < len; j++) { ! delta = is.readLong(); ! gid += delta; ! t = new TermOccurrence(gid); if(termFreq) ! t.frequency = is.readInt(); if (node == null ! && oldDoc.getTreeLevel(gid) < oldDoc.reindexRequired()) { ! idList.add(t); } else if (node != null && (!XMLUtil --- 1032,1048 ---- os.writeByte(section); os.writeInt(len); ! is.copyTo(os, len); } else { // copy nodes to new list gid = 0; for (int j = 0; j < len; j++) { ! gid += is.readLong(); if(termFreq) ! freq = is.readInt(); if (node == null ! && oldDoc.getTreeLevel(gid) < oldDoc ! .reindexRequired()) { ! idList.add(gid); ! idList.setLastTermFreq(freq); } else if (node != null && (!XMLUtil *************** *** 1050,1054 **** node.getGID(), gid))) { ! idList.add(t); } } --- 1051,1056 ---- node.getGID(), gid))) { ! idList.add(gid); ! idList.setLastTermFreq(freq); } } *************** *** 1063,1068 **** } } ! ids = new TermOccurrence[idList.size()]; ! idList.toArray(ids); Arrays.sort(ids); len = ids.length; --- 1065,1069 ---- } } ! ids = idList.toArray(); Arrays.sort(ids); len = ids.length; *************** *** 1072,1076 **** last = 0; for (int j = 0; j < len; j++) { ! delta = ids[j].gid - last; if (delta < 0) { LOG.debug("neg. delta: " + delta + " for " + word); --- 1073,1077 ---- last = 0; for (int j = 0; j < len; j++) { ! delta = ids[j].l - last; if (delta < 0) { LOG.debug("neg. delta: " + delta + " for " + word); *************** *** 1079,1084 **** os.writeLong(delta); if(termFreq) ! os.writeInt(ids[j].frequency); ! last = ids[j].gid; } try { --- 1080,1085 ---- os.writeLong(delta); if(termFreq) ! os.writeInt(ids[j].count); ! last = ids[j].l; } try { *************** *** 1117,1133 **** Map.Entry entry; String word; ! OrderedLinkedList idList; ! Comparable[] ids; byte[] data; ! long prevId, id; long delta; - TermOccurrence t; for (int k = 0; k < 2; k++) { for (Iterator i = words[k].entrySet().iterator(); i.hasNext(); count++) { entry = (Map.Entry) i.next(); word = (String) entry.getKey(); ! idList = (OrderedLinkedList) entry.getValue(); os.clear(); ! len = idList.size(); os.writeInt(doc.getDocId()); os.writeByte(k == 0 ? TEXT_SECTION : ATTRIBUTE_SECTION); --- 1118,1134 ---- Map.Entry entry; String word; ! TermFrequencyList idList; ! TermFrequencyList.TermFreq id; ! long[] ids; byte[] data; ! long prevId; long delta; for (int k = 0; k < 2; k++) { for (Iterator i = words[k].entrySet().iterator(); i.hasNext(); count++) { entry = (Map.Entry) i.next(); word = (String) entry.getKey(); ! idList = (TermFrequencyList) entry.getValue(); os.clear(); ! len = idList.getSize(); os.writeInt(doc.getDocId()); os.writeByte(k == 0 ? TEXT_SECTION : ATTRIBUTE_SECTION); *************** *** 1135,1141 **** prevId = 0; for (Iterator j = idList.iterator(); j.hasNext();) { ! t = (TermOccurrence) j.next(); ! id = t.gid; ! delta = id - prevId; if (delta < 0) { LOG.debug("neg. delta: " + delta + " for " + word); --- 1136,1141 ---- prevId = 0; for (Iterator j = idList.iterator(); j.hasNext();) { ! id = ((TermFrequencyList.TermFreq) j.next()); ! delta = id.l - prevId; if (delta < 0) { LOG.debug("neg. delta: " + delta + " for " + word); *************** *** 1143,1151 **** } os.writeLong(delta); ! if(termFreq) { ! // write out term frequencies ! os.writeInt(t.frequency); ! } ! prevId = id; } flushWord(collectionId, word, os.data()); --- 1143,1149 ---- } os.writeLong(delta); ! if(termFreq) ! os.writeInt(id.count); ! prevId = id.l; } flushWord(collectionId, word, os.data()); *************** *** 1266,1270 **** long last = -1; int freq = 1; - long delta; int sizeHint = -1; byte section; --- 1264,1267 ---- *************** *** 1285,1295 **** if (contextSet != null) sizeHint = contextSet.getSizeHint(doc); ! last = -1; for (int j = 0; j < len; j++) { ! delta = is.readLong(); ! gid = (last < 0 ? delta : last + delta); ! last = gid; if(termFreq) freq = is.readInt(); if (contextSet != null) { proxy = (section == TEXT_SECTION --- 1282,1291 ---- if (contextSet != null) sizeHint = contextSet.getSizeHint(doc); ! last = 0; for (int j = 0; j < len; j++) { ! gid = last + is.readLong(); if(termFreq) freq = is.readInt(); + last = gid; if (contextSet != null) { proxy = (section == TEXT_SECTION *************** *** 1302,1310 **** if (parent != null) { result.add(parent, sizeHint); ! if (trackMatches != Serializer.TAG_NONE) { ! match = new Match(word, gid); ! match.setFrequency(freq); parent.addMatch(match); - } } } else --- 1298,1305 ---- if (parent != null) { result.add(parent, sizeHint); ! match = new Match(word, gid); ! match.setFrequency(freq); ! if (trackMatches != Serializer.TAG_NONE) parent.addMatch(match); } } else *************** *** 1351,1353 **** --- 1346,1350 ---- } } + + } |
From: Wolfgang M. M. <wol...@us...> - 2004-07-21 08:54:05
|
Update of /cvsroot/exist/eXist-1.0/src/org/exist/xquery/test In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15944/src/org/exist/xquery/test Modified Files: SAXStorageTest.java Log Message: Code to track term frequency counts in NativeTextEngine had to be rewritten as it slowed down the indexing. Index: SAXStorageTest.java =================================================================== RCS file: /cvsroot/exist/eXist-1.0/src/org/exist/xquery/test/SAXStorageTest.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** SAXStorageTest.java 13 Jul 2004 15:07:37 -0000 1.1 --- SAXStorageTest.java 21 Jul 2004 08:53:56 -0000 1.2 *************** *** 6,10 **** import java.io.File; - import java.io.IOException; import junit.framework.TestCase; --- 6,9 ---- *************** *** 13,25 **** import org.exist.xmldb.LocalCollection; import org.xml.sax.ContentHandler; - import org.xml.sax.DTDHandler; - import org.xml.sax.EntityResolver; - import org.xml.sax.ErrorHandler; - import org.xml.sax.InputSource; import org.xml.sax.SAXException; - import org.xml.sax.SAXNotRecognizedException; - import org.xml.sax.SAXNotSupportedException; import org.xml.sax.XMLReader; - import org.xml.sax.helpers.AttributesImpl; import org.xmldb.api.DatabaseManager; import org.xmldb.api.base.Collection; --- 12,17 ---- |
From: Wolfgang M. M. <wol...@us...> - 2004-07-21 08:54:05
|
Update of /cvsroot/exist/eXist-1.0/src/org/exist/xquery/parser In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15944/src/org/exist/xquery/parser Modified Files: XQuery.g Log Message: Code to track term frequency counts in NativeTextEngine had to be rewritten as it slowed down the indexing. Index: XQuery.g =================================================================== RCS file: /cvsroot/exist/eXist-1.0/src/org/exist/xquery/parser/XQuery.g,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -d -r1.19 -r1.20 *** XQuery.g 17 Jul 2004 10:00:44 -0000 1.19 --- XQuery.g 21 Jul 2004 08:53:56 -0000 1.20 *************** *** 2612,2617 **** protected LPPAREN : '[' ; protected RPPAREN : ']' ; ! protected LPAREN : '(' ; ! protected RPAREN : ')' ; protected SELF : '.' ; protected PARENT : ".." ; --- 2612,2617 ---- protected LPPAREN : '[' ; protected RPPAREN : ']' ; ! protected LPAREN options { paraphrase="'('"; } : '(' ; ! protected RPAREN options { paraphrase="')'"; } : ')' ; protected SELF : '.' ; protected PARENT : ".." ; |
From: Wolfgang M. M. <wol...@us...> - 2004-07-21 08:54:04
|
Update of /cvsroot/exist/eXist-1.0/src/org/exist/util In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15944/src/org/exist/util Modified Files: LongLinkedList.java OrderedLongLinkedList.java OrderedLinkedList.java Log Message: Code to track term frequency counts in NativeTextEngine had to be rewritten as it slowed down the indexing. Index: OrderedLongLinkedList.java =================================================================== RCS file: /cvsroot/exist/eXist-1.0/src/org/exist/util/OrderedLongLinkedList.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** OrderedLongLinkedList.java 18 Dec 2003 15:47:45 -0000 1.3 --- OrderedLongLinkedList.java 21 Jul 2004 08:53:55 -0000 1.4 *************** *** 8,12 **** * @author Wolfgang Meier */ ! public final class OrderedLongLinkedList extends LongLinkedList { --- 8,12 ---- * @author Wolfgang Meier */ ! public class OrderedLongLinkedList extends LongLinkedList { *************** *** 23,31 **** public void add(long l) { if (first == null) { ! first = new ListItem(l); last = first; count = 1; } else { ! ListItem newItem = new ListItem(l); ListItem prev = last; while (prev != null) { --- 23,31 ---- public void add(long l) { if (first == null) { ! first = createListItem(l); last = first; count = 1; } else { ! ListItem newItem = createListItem(l); ListItem prev = last; while (prev != null) { Index: OrderedLinkedList.java =================================================================== RCS file: /cvsroot/exist/eXist-1.0/src/org/exist/util/OrderedLinkedList.java,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** OrderedLinkedList.java 16 Jul 2004 17:39:41 -0000 1.4 --- OrderedLinkedList.java 21 Jul 2004 08:53:55 -0000 1.5 *************** *** 23,28 **** --- 23,32 ---- import java.util.Iterator; + import org.apache.log4j.Logger; + public class OrderedLinkedList { + private final static Logger LOG = Logger.getLogger(OrderedLinkedList.class); + public abstract static class Node { Node next = null; Index: LongLinkedList.java =================================================================== RCS file: /cvsroot/exist/eXist-1.0/src/org/exist/util/LongLinkedList.java,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** LongLinkedList.java 17 Nov 2003 09:27:31 -0000 1.6 --- LongLinkedList.java 21 Jul 2004 08:53:55 -0000 1.7 *************** *** 5,13 **** public class LongLinkedList { ! public final static class ListItem implements Comparable { public long l; ! ListItem next = null; ! ListItem prev = null; public ListItem( long l ) { --- 5,14 ---- public class LongLinkedList { ! public static class ListItem implements Comparable { public long l; ! ! public ListItem next = null; ! public ListItem prev = null; public ListItem( long l ) { *************** *** 47,54 **** public void add( long l ) { if(first == null) { ! first = new ListItem( l ); last = first; } else { ! ListItem next = new ListItem( l ); last.next = next; next.prev = last; --- 48,55 ---- public void add( long l ) { if(first == null) { ! first = createListItem( l ); last = first; } else { ! ListItem next = createListItem( l ); last.next = next; next.prev = last; *************** *** 106,109 **** --- 107,114 ---- } + protected ListItem createListItem(long l) { + return new ListItem(l); + } + private final class LongLinkedListIterator implements Iterator { |
From: Jean-Marc V. <jm...@us...> - 2004-07-21 05:49:22
|
Update of /cvsroot/exist/eXist-1.0/src/org/exist/xmldb/test In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20467/src/org/exist/xmldb/test Added Files: RemoteCollectionTest.java Log Message: implement reindexCollection (not yet tested) --- NEW FILE: RemoteCollectionTest.java --- /* * Created on 20 juil. 2004 $Id: RemoteCollectionTest.java,v 1.1 2004/07/21 05:49:13 jmvanel Exp $ */ package org.exist.xmldb.test; import junit.framework.TestCase; import org.exist.Server; /** WORK IN PROGRESS !!! * @author jmv */ public class RemoteCollectionTest extends TestCase { protected final static String URI = "http://localhost:8080/exist/xmlrpc"; /** ? @see junit.framework.TestCase#setUp() */ protected void setUp() throws Exception { String[] args = {"standalone"}; Server.main(args); // Thread ?? } /** ? @see junit.framework.TestCase#tearDown() */ protected void tearDown() throws Exception { // TODO } public void testIndexQueryService() { // TODO ............. } /** * @param name */ public RemoteCollectionTest(String name) { super(name); } } |
From: Jean-Marc V. <jm...@us...> - 2004-07-21 05:46:33
|
Update of /cvsroot/exist/eXist-1.0/src/org/exist/xmldb In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20126/src/org/exist/xmldb Modified Files: RemoteIndexQueryService.java Log Message: implement reindexCollection (not yet tested) Index: RemoteIndexQueryService.java =================================================================== RCS file: /cvsroot/exist/eXist-1.0/src/org/exist/xmldb/RemoteIndexQueryService.java,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** RemoteIndexQueryService.java 2 Jun 2004 11:28:42 -0000 1.6 --- RemoteIndexQueryService.java 21 Jul 2004 05:46:22 -0000 1.7 *************** *** 44,60 **** ! /* (non-Javadoc) ! * @see org.exist.xmldb.IndexQueryService#reindexCollection() ! */ public void reindexCollection() throws XMLDBException { ! throw new XMLDBException(ErrorCodes.NOT_IMPLEMENTED); } ! /* (non-Javadoc) ! * @see org.exist.xmldb.IndexQueryService#reindexCollection(java.lang.String) ! */ public void reindexCollection(String collectionPath) throws XMLDBException { ! throw new XMLDBException(ErrorCodes.NOT_IMPLEMENTED); } --- 44,70 ---- ! /** @see org.exist.xmldb.IndexQueryService#reindexCollection() */ public void reindexCollection() throws XMLDBException { ! reindexCollection( parent.getPath() ); } ! /** @see org.exist.xmldb.IndexQueryService#reindexCollection(java.lang.String) */ public void reindexCollection(String collectionPath) throws XMLDBException { ! String path = (collectionPath.startsWith("/db") ? collectionPath : ! parent.getPath() + '/' + collectionPath); ! Vector params = new Vector(); ! params.addElement(path); ! try { ! Vector result = (Vector) rpcClient.execute("reindexCollection", params); ! } catch (XmlRpcException e) { ! throw new XMLDBException( ! ErrorCodes.UNKNOWN_ERROR, ! "xmlrpc error while doing reindexCollection: ", e); ! } catch (IOException e) { ! throw new XMLDBException( ! ErrorCodes.UNKNOWN_ERROR, ! "xmlrpc error while doing reindexCollection: ", e); ! } } |
From: Wolfgang M. M. <wol...@us...> - 2004-07-19 13:08:05
|
Update of /cvsroot/exist/eXist-1.0 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26120 Modified Files: conf.xml Log Message: Added new parameter to enable consistency checks for debugging purposes. Index: conf.xml =================================================================== RCS file: /cvsroot/exist/eXist-1.0/conf.xml,v retrieving revision 1.56 retrieving revision 1.57 diff -C2 -d -r1.56 -r1.57 *** conf.xml 16 Jul 2004 17:45:30 -0000 1.56 --- conf.xml 19 Jul 2004 13:07:56 -0000 1.57 *************** *** 89,94 **** Increase the setting to have less reindex runs. However, you have to be aware that leaving spare ids also limits the maximum size of a ! document that can be indexed. --> ! <xupdate growth-factor="20" allowed-fragmentation="20"/> <!-- --- 89,103 ---- Increase the setting to have less reindex runs. However, you have to be aware that leaving spare ids also limits the maximum size of a ! document that can be indexed. ! ! "enable-consistency-checks" is for debugging only. If the parameter ! is set to "yes", a consistency check will be run on every modified ! document after every XUpdate request. It checks if the ! persistent DOM is complete and all pointers in the structural ! index point to valid storage addresses containing valid nodes. ! --> ! ! <xupdate growth-factor="20" allowed-fragmentation="20" ! enable-consistency-checks="yes"/> <!-- |
From: Wolfgang M. M. <wol...@us...> - 2004-07-19 13:06:34
|
Update of /cvsroot/exist/eXist-1.0/src/org/exist/storage/store In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25772/src/org/exist/storage/store Modified Files: DOMFile.java Log Message: Fixed another locking issue which led to dirty reads if one thread tried to read index data from elements.dbx while another thread had been updating exactly the same data pages. Index: DOMFile.java =================================================================== RCS file: /cvsroot/exist/eXist-1.0/src/org/exist/storage/store/DOMFile.java,v retrieving revision 1.40 retrieving revision 1.41 diff -C2 -d -r1.40 -r1.41 *** DOMFile.java 12 Jul 2004 17:19:53 -0000 1.40 --- DOMFile.java 19 Jul 2004 13:06:25 -0000 1.41 *************** *** 48,52 **** import org.exist.storage.cache.Cacheable; import org.exist.storage.cache.ClockCache; - import org.exist.storage.cache.LRDCache; import org.exist.util.ByteConversion; import org.exist.util.Lock; --- 48,51 ---- *************** *** 791,794 **** --- 790,794 ---- } } while (parentPointer == KEY_NOT_FOUND); + final long firstChildId = XMLUtil.getFirstChildId(doc, id); final Iterator iter = new NodeIterator(lock, this, node.doc, *************** *** 1218,1223 **** public String debugPages(DocumentImpl doc) { StringBuffer buf = new StringBuffer(); ! buf.append("Pages used by ").append(doc.getFileName()); ! buf.append(':'); long pnum = StorageAddress.pageFromPointer(((NodeImpl)doc.getFirstChild()).getInternalAddress()); while(-1 < pnum) { --- 1218,1223 ---- public String debugPages(DocumentImpl doc) { StringBuffer buf = new StringBuffer(); ! buf.append("Pages used by ").append(doc.getName()); ! buf.append("; docId ").append(doc.getDocId()).append(':'); long pnum = StorageAddress.pageFromPointer(((NodeImpl)doc.getFirstChild()).getInternalAddress()); while(-1 < pnum) { *************** *** 1490,1501 **** return null; } ! // LOG.debug( ! // owner.toString() ! // + ": tid " ! // + targetId ! // + " not found on " ! // + page.page.getPageInfo() ! // + ". Loading " ! // + pageNr + "; contents: " + debugPageContents(page)); } return null; --- 1490,1501 ---- return null; } ! LOG.debug( ! owner.toString() ! + ": tid " ! + targetId ! + " not found on " ! + page.page.getPageInfo() ! + ". Loading " ! + pageNr + "; contents: " + debugPageContents(page)); } return null; |
From: Wolfgang M. M. <wol...@us...> - 2004-07-19 13:06:34
|
Update of /cvsroot/exist/eXist-1.0/src/org/exist/util In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25772/src/org/exist/util Modified Files: Configuration.java Log Message: Fixed another locking issue which led to dirty reads if one thread tried to read index data from elements.dbx while another thread had been updating exactly the same data pages. Index: Configuration.java =================================================================== RCS file: /cvsroot/exist/eXist-1.0/src/org/exist/util/Configuration.java,v retrieving revision 1.20 retrieving revision 1.21 diff -C2 -d -r1.20 -r1.21 *** Configuration.java 14 Jul 2004 19:03:25 -0000 1.20 --- Configuration.java 19 Jul 2004 13:06:26 -0000 1.21 *************** *** 422,425 **** --- 422,429 ---- if(fragmentation != null) config.put("xupdate.fragmentation", new Integer(fragmentation)); + + String consistencyCheck = xupdate.getAttribute("enable-consistency-checks"); + if(consistencyCheck != null) + config.put("xupdate.consistency-checks", Boolean.valueOf(consistencyCheck.equals("yes"))); } } catch (SAXException e) { |
From: Wolfgang M. M. <wol...@us...> - 2004-07-19 13:06:34
|
Update of /cvsroot/exist/eXist-1.0/src/org/exist/storage In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25772/src/org/exist/storage Modified Files: NativeElementIndex.java ElementIndex.java DBBroker.java NativeBroker.java Log Message: Fixed another locking issue which led to dirty reads if one thread tried to read index data from elements.dbx while another thread had been updating exactly the same data pages. Index: NativeBroker.java =================================================================== RCS file: /cvsroot/exist/eXist-1.0/src/org/exist/storage/NativeBroker.java,v retrieving revision 1.88 retrieving revision 1.89 diff -C2 -d -r1.88 -r1.89 *** NativeBroker.java 12 Jul 2004 17:17:43 -0000 1.88 --- NativeBroker.java 19 Jul 2004 13:06:25 -0000 1.89 *************** *** 1335,1338 **** --- 1335,1346 ---- } + public void consistencyCheck(DocumentImpl doc) throws EXistException { + if(xupdateConsistencyChecks) { + LOG.debug("Checking document " + doc.getFileName()); + checkTree(doc); + elementIndex.consistencyCheck(doc); + } + } + public void checkTree(final DocumentImpl doc) { LOG.debug("Checking DOM tree for document " + doc.getFileName()); *************** *** 1587,1595 **** Value val = domDb.get(p.getInternalAddress()); if (val == null) { ! LOG.debug("Node " + p.gid + " not found in document " + ! p.doc.getCollection().getName() + '/' + p.doc.getFileName()); LOG.debug(domDb.debugPages(p.doc)); Thread.dumpStack(); ! return objectWith(p.doc, p.gid); } NodeImpl node = --- 1595,1604 ---- Value val = domDb.get(p.getInternalAddress()); if (val == null) { ! LOG.debug("Node " + p.gid + " not found in document " + p.doc.getName() + ! "; docId = " + p.doc.getDocId()); LOG.debug(domDb.debugPages(p.doc)); Thread.dumpStack(); ! return null; ! // return objectWith(p.doc, p.gid); // retry? } NodeImpl node = Index: NativeElementIndex.java =================================================================== RCS file: /cvsroot/exist/eXist-1.0/src/org/exist/storage/NativeElementIndex.java,v retrieving revision 1.33 retrieving revision 1.34 diff -C2 -d -r1.33 -r1.34 *** NativeElementIndex.java 30 Jun 2004 15:56:59 -0000 1.33 --- NativeElementIndex.java 19 Jul 2004 13:06:24 -0000 1.34 *************** *** 34,37 **** --- 34,38 ---- import org.dbxml.core.filer.BTreeException; import org.dbxml.core.indexer.IndexQuery; + import org.exist.EXistException; import org.exist.collections.Collection; import org.exist.dom.DocumentImpl; *************** *** 110,114 **** public NodeSet findElementsByTagName(byte type, DocumentSet docs, QName qname, NodeSelector selector) { ! // final long start = System.currentTimeMillis(); final ExtArrayNodeSet result = new ExtArrayNodeSet(docs.getLength(), 256); --- 111,115 ---- public NodeSet findElementsByTagName(byte type, DocumentSet docs, QName qname, NodeSelector selector) { ! // final long start = System.currentTimeMillis(); final ExtArrayNodeSet result = new ExtArrayNodeSet(docs.getLength(), 256); *************** *** 127,130 **** --- 128,133 ---- : Node.ELEMENT_NODE); final Lock lock = dbElement.getLock(); + // StringBuffer debug = new StringBuffer(); + // debug.append(qname.toString()).append(": "); for (Iterator i = docs.getCollectionIterator(); i.hasNext();) { collection = (Collection) i.next(); *************** *** 138,151 **** ref = new ElementValue((byte) type, collectionId, sym, nsSym); } - boolean exceptionOcurred = false; try { ! lock.acquire(Lock.READ_LOCK); ! is = dbElement.getAsStream(ref); } catch (LockException e) { LOG.warn( "findElementsByTagName(byte, DocumentSet, QName, NodeSelector) - " + "failed to acquire lock", e); - // jmv: dis = null; - exceptionOcurred = true; } catch (IOException e) { LOG.warn( --- 141,182 ---- ref = new ElementValue((byte) type, collectionId, sym, nsSym); } try { ! lock.acquire(Lock.READ_LOCK); ! is = dbElement.getAsStream(ref); ! ! if (is == null) continue; ! while (is.available() > 0) { ! docId = is.readInt(); ! len = is.readInt(); ! if ((doc = docs.getDoc(docId)) == null) { ! is.skip(len * 4); ! continue; ! } ! gid = 0; ! for (int k = 0; k < len; k++) { ! gid = gid + is.readLong(); ! if(selector == null) ! p = new NodeProxy(doc, gid, nodeType, StorageAddress.read(is)); ! else { ! p = selector.match(doc, gid); ! if(p != null) { ! p.setInternalAddress(StorageAddress.read(is)); ! p.setNodeType(nodeType); ! } else ! is.skip(3); ! } ! if(p != null) { ! // debug.append(StorageAddress.toString(p.getInternalAddress())).append(':'); ! // debug.append(gid).append(' '); ! result.add(p, len); ! } ! } ! } ! } catch (EOFException e) { ! //EOFExceptions are expected here } catch (LockException e) { LOG.warn( "findElementsByTagName(byte, DocumentSet, QName, NodeSelector) - " + "failed to acquire lock", e); } catch (IOException e) { LOG.warn( *************** *** 153,206 **** + "io exception while reading elements for " + qname, e); - // jmv: dis = null; - exceptionOcurred = true; } finally { lock.release(); } - // jmv: if (dis == null) - // wolf: dis == null if no matching element has been found in the - // index - if (is == null || exceptionOcurred) continue; - try { - while (is.available() > 0) { - docId = is.readInt(); - len = is.readInt(); - if ((doc = docs.getDoc(docId)) == null) { - is.skip(len * 4); - continue; - } - gid = 0; - for (int k = 0; k < len; k++) { - gid = gid + is.readLong(); - if(selector == null) - p = new NodeProxy(doc, gid, nodeType, StorageAddress.read(is)); - else { - p = selector.match(doc, gid); - if(p != null) { - p.setInternalAddress(StorageAddress.read(is)); - p.setNodeType(nodeType); - } else - is.skip(3); - } - if(p != null) - result.add(p, len); - } - } - } catch (EOFException e) { - } catch (IOException e) { - LOG.warn( - "findElementsByTagName(byte, DocumentSet, QName, NodeSelector) - " - + "unexpected io error", e); - } } // result.sort(); ! // LOG.debug( ! // "found " ! // + qname ! // + ": " ! // + result.getLength() ! // + " in " ! // + (System.currentTimeMillis() - start) ! // + "ms."); return result; } --- 184,201 ---- + "io exception while reading elements for " + qname, e); } finally { lock.release(); } } + // LOG.debug(debug.toString()); // result.sort(); ! // LOG.debug( ! // "found " ! // + qname ! // + ": " ! // + result.getLength() ! // + " in " ! // + (System.currentTimeMillis() - start) ! // + "ms."); return result; } *************** *** 300,303 **** --- 295,386 ---- } + public void consistencyCheck(DocumentImpl doc) throws EXistException { + short collectionId = doc.getCollection().getId(); + Value ref = new ElementValue(collectionId); + IndexQuery query = new IndexQuery(IndexQuery.TRUNC_RIGHT, ref); + Lock lock = dbElement.getLock(); + try { + lock.acquire(Lock.WRITE_LOCK); + ArrayList elements = dbElement.findKeys(query); + + Value key; + Value value; + byte[] data; + // byte[] ndata; + VariableByteArrayInput is; + int len; + int docId; + long delta; + long address; + long gid; + long last = 0; + Node node; + short symbol; + String nodeName; + StringBuffer msg = new StringBuffer(); + for (int i = 0; i < elements.size(); i++) { + key = (Value) elements.get(i); + value = dbElement.get(key); + data = value.getData(); + symbol = ByteConversion.byteToShort(key.data(), key.start() + 3); + nodeName = broker.getSymbols().getName(symbol); + msg.setLength(0); + msg.append("Checking ").append(nodeName).append(": "); + + is = new VariableByteArrayInput(data); + try { + while (is.available() > 0) { + docId = is.readInt(); + len = is.readInt(); + if (docId == doc.getDocId()) { + for (int j = 0; j < len; j++) { + delta = is.readLong(); + gid = last + delta; + last = gid; + address = StorageAddress.read(is); + node = broker.objectWith(new NodeProxy(doc, gid, address)); + if(node == null) { + throw new EXistException("Node " + gid + " in document " + doc.getFileName() + " not found."); + } + if(node.getNodeType() != Node.ELEMENT_NODE && node.getNodeType() != Node.ATTRIBUTE_NODE) { + LOG.warn("Node " + gid + " in document " + + doc.getFileName() + " is not an element or attribute node."); + LOG.debug("Type = " + node.getNodeType() + "; name = " + node.getNodeName() + + "; value = " + node.getNodeValue()); + throw new EXistException("Node " + gid + " in document " + + doc.getFileName() + " is not an element or attribute node."); + } + if(!node.getLocalName().equals(nodeName)) { + LOG.warn("Node name does not correspond to index entry. Expected " + nodeName + + "; found " + node.getLocalName()); + } + msg.append(StorageAddress.toString(address)).append(' '); + } + } else + is.skip(len * 4); + } + } catch (EOFException e) { + if (LOG.isDebugEnabled()) { + LOG.debug("removeDocument(String) - eof", e); + } + } catch (IOException e) { + LOG.warn("removeDocument(String) " + e.getMessage(), e); + } + LOG.debug(msg.toString()); + } + } catch (LockException e) { + LOG.warn("removeDocument(String) - " + + "could not acquire lock on elements", e); + } catch (TerminatedException e) { + LOG.warn("method terminated", e); + } catch (BTreeException e) { + LOG.warn(e.getMessage(), e); + } catch (IOException e) { + LOG.warn(e.getMessage(), e); + } finally { + lock.release(); + } + } + public void dropIndex(DocumentImpl doc) throws ReadOnlyException { // drop element-index Index: ElementIndex.java =================================================================== RCS file: /cvsroot/exist/eXist-1.0/src/org/exist/storage/ElementIndex.java,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** ElementIndex.java 8 Jun 2004 08:16:11 -0000 1.7 --- ElementIndex.java 19 Jul 2004 13:06:24 -0000 1.8 *************** *** 22,26 **** import java.util.TreeMap; - import org.apache.log4j.Category; import org.exist.collections.Collection; import org.exist.dom.DocumentImpl; --- 22,25 ---- *************** *** 41,45 **** protected DocumentImpl doc; protected Configuration config; - private static Category LOG = Category.getInstance(ElementIndex.class.getName()); public ElementIndex(DBBroker broker, Configuration config) { --- 40,43 ---- Index: DBBroker.java =================================================================== RCS file: /cvsroot/exist/eXist-1.0/src/org/exist/storage/DBBroker.java,v retrieving revision 1.37 retrieving revision 1.38 diff -C2 -d -r1.37 -r1.38 *** DBBroker.java 5 Jul 2004 20:02:46 -0000 1.37 --- DBBroker.java 19 Jul 2004 13:06:24 -0000 1.38 *************** *** 94,97 **** --- 94,99 ---- protected int docFragmentationLimit = 25; + protected boolean xupdateConsistencyChecks = false; + protected String id; *************** *** 173,176 **** --- 175,181 ---- if ((docFragmentationLimit = config.getInteger("xupdate.fragmentation")) < 0) docFragmentationLimit = 50; + if ((temp = (Boolean) config.getProperty("xupdate.consistency-checks")) != null) + xupdateConsistencyChecks = temp.booleanValue(); + LOG.debug("fragmentation = " + docFragmentationLimit); this.pool = pool; *************** *** 520,523 **** --- 525,530 ---- public abstract void checkTree(DocumentImpl doc); + public abstract void consistencyCheck(DocumentImpl doc) throws EXistException; + public void sync() { /* *************** *** 605,608 **** --- 612,619 ---- } + public boolean consistencyChecksEnabled() { + return xupdateConsistencyChecks; + } + public abstract int getPageSize(); |
From: Wolfgang M. M. <wol...@us...> - 2004-07-19 13:06:34
|
Update of /cvsroot/exist/eXist-1.0/src/org/exist/xupdate In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25772/src/org/exist/xupdate Modified Files: Modification.java Log Message: Fixed another locking issue which led to dirty reads if one thread tried to read index data from elements.dbx while another thread had been updating exactly the same data pages. Index: Modification.java =================================================================== RCS file: /cvsroot/exist/eXist-1.0/src/org/exist/xupdate/Modification.java,v retrieving revision 1.29 retrieving revision 1.30 diff -C2 -d -r1.29 -r1.30 *** Modification.java 23 Jun 2004 12:43:05 -0000 1.29 --- Modification.java 19 Jul 2004 13:06:25 -0000 1.30 *************** *** 208,216 **** * @param docs */ ! protected void checkFragmentation(DocumentSet docs) { for(Iterator i = docs.iterator(); i.hasNext(); ) { DocumentImpl next = (DocumentImpl) i.next(); if(next.getSplitCount() > broker.getFragmentationLimit()) broker.defrag(next); } } --- 208,217 ---- * @param docs */ ! protected void checkFragmentation(DocumentSet docs) throws EXistException { for(Iterator i = docs.iterator(); i.hasNext(); ) { DocumentImpl next = (DocumentImpl) i.next(); if(next.getSplitCount() > broker.getFragmentationLimit()) broker.defrag(next); + broker.consistencyCheck(next); } } |
From: Wolfgang M. M. <wol...@us...> - 2004-07-19 13:06:33
|
Update of /cvsroot/exist/eXist-1.0/src/org/exist/dom In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25772/src/org/exist/dom Modified Files: DocumentImpl.java Log Message: Fixed another locking issue which led to dirty reads if one thread tried to read index data from elements.dbx while another thread had been updating exactly the same data pages. Index: DocumentImpl.java =================================================================== RCS file: /cvsroot/exist/eXist-1.0/src/org/exist/dom/DocumentImpl.java,v retrieving revision 1.49 retrieving revision 1.50 diff -C2 -d -r1.49 -r1.50 *** DocumentImpl.java 12 Jul 2004 17:17:40 -0000 1.49 --- DocumentImpl.java 19 Jul 2004 13:06:25 -0000 1.50 *************** *** 442,445 **** --- 442,449 ---- } + public String getName() { + return collection.getName() + '/' + fileName; + } + private void checkAvail() { if (!complete) |
From: Wolfgang M. M. <wol...@us...> - 2004-07-19 13:06:32
|
Update of /cvsroot/exist/eXist-1.0/src/org/exist/xquery In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25772/src/org/exist/xquery Modified Files: Function.java Log Message: Fixed another locking issue which led to dirty reads if one thread tried to read index data from elements.dbx while another thread had been updating exactly the same data pages. Index: Function.java =================================================================== RCS file: /cvsroot/exist/eXist-1.0/src/org/exist/xquery/Function.java,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** Function.java 28 May 2004 10:54:12 -0000 1.4 --- Function.java 19 Jul 2004 13:06:24 -0000 1.5 *************** *** 98,101 **** --- 98,103 ---- */ public int returnsType() { + if(mySignature == null) + return Type.ITEM; // Type is not known yet if(mySignature.getReturnType() == null) throw new IllegalArgumentException("Return type for function " + mySignature.getName() + |
From: Wolfgang M. M. <wol...@us...> - 2004-07-19 08:12:43
|
Update of /cvsroot/exist/eXist-1.0/src/org/exist/storage In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14522/src/org/exist/storage Modified Files: NativeTextEngine.java Log Message: Changed NativeTextEngine.getNodesRegexp to work again (forgot term frequency counts). Index: NativeTextEngine.java =================================================================== RCS file: /cvsroot/exist/eXist-1.0/src/org/exist/storage/NativeTextEngine.java,v retrieving revision 1.61 retrieving revision 1.62 diff -C2 -d -r1.61 -r1.62 *** NativeTextEngine.java 16 Jul 2004 17:39:41 -0000 1.61 --- NativeTextEngine.java 19 Jul 2004 08:12:29 -0000 1.62 *************** *** 1265,1268 **** --- 1265,1269 ---- long gid; long last = -1; + int freq = 1; long delta; int sizeHint = -1; *************** *** 1270,1273 **** --- 1271,1275 ---- DocumentImpl doc; NodeProxy parent, proxy; + Match match; try { while (is.available() > 0) { *************** *** 1278,1282 **** len = is.readInt(); if ((doc = docs.getDoc(docId)) == null) { ! is.skip(len); continue; } --- 1280,1284 ---- len = is.readInt(); if ((doc = docs.getDoc(docId)) == null) { ! is.skip(termFreq ? len * 2 : len); continue; } *************** *** 1288,1291 **** --- 1290,1295 ---- gid = (last < 0 ? delta : last + delta); last = gid; + if(termFreq) + freq = is.readInt(); if (contextSet != null) { proxy = (section == TEXT_SECTION *************** *** 1298,1303 **** if (parent != null) { result.add(parent, sizeHint); ! if (trackMatches != Serializer.TAG_NONE) ! parent.addMatch(new Match(word, gid)); } } else --- 1302,1310 ---- if (parent != null) { result.add(parent, sizeHint); ! if (trackMatches != Serializer.TAG_NONE) { ! match = new Match(word, gid); ! match.setFrequency(freq); ! parent.addMatch(match); ! } } } else |
From: Jean-Marc V. <jm...@us...> - 2004-07-18 18:01:57
|
Update of /cvsroot/exist/eXist-1.0/webapp/xquery In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29412 Modified Files: biblio.xq Log Message: Bug: rdf namespace was not declared Index: biblio.xq =================================================================== RCS file: /cvsroot/exist/eXist-1.0/webapp/xquery/biblio.xq,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** biblio.xq 17 May 2004 09:59:45 -0000 1.5 --- biblio.xq 18 Jul 2004 18:01:49 -0000 1.6 *************** *** 4,7 **** --- 4,9 ---- declare namespace dc="http://purl.org/dc/elements/1.1/"; declare namespace fn="http://exist-db.org/local-functions"; + declare namespace rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"; + declare namespace x="http://exist.sourceforge.net/dc-ext"; (: Map query field parameter to xpath selection :) |
From: Wolfgang M. M. <wol...@us...> - 2004-07-17 10:01:08
|
Update of /cvsroot/exist/eXist-1.0/src/org/exist/xquery In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6205/src/org/exist/xquery Modified Files: ModuleContext.java XQueryContext.java Log Message: Exception thrown when resolving global module variables. Index: XQueryContext.java =================================================================== RCS file: /cvsroot/exist/eXist-1.0/src/org/exist/xquery/XQueryContext.java,v retrieving revision 1.20 retrieving revision 1.21 diff -C2 -d -r1.20 -r1.21 *** XQueryContext.java 16 Jul 2004 12:39:04 -0000 1.20 --- XQueryContext.java 17 Jul 2004 10:00:44 -0000 1.21 *************** *** 117,121 **** private DocumentSet staticDocuments = null; ! private DBBroker broker; private String baseURI = ""; --- 117,121 ---- private DocumentSet staticDocuments = null; ! protected DBBroker broker; private String baseURI = ""; *************** *** 157,168 **** private boolean exclusive = false; ! public XQueryContext(DBBroker broker) { ! this.broker = broker; this.watchdog = new XQueryWatchDog(this); - loadDefaults(); builder = new MemTreeBuilder(this); builder.startDocument(); } /** * Called from the XQuery compiler to set the root expression --- 157,172 ---- private boolean exclusive = false; ! protected XQueryContext() { this.watchdog = new XQueryWatchDog(this); builder = new MemTreeBuilder(this); builder.startDocument(); } + public XQueryContext(DBBroker broker) { + this(); + this.broker = broker; + loadDefaults(); + } + /** * Called from the XQuery compiler to set the root expression *************** *** 403,407 **** */ public Module loadBuiltInModule(String namespaceURI, String moduleClass) { ! Module module = (Module)modules.get(namespaceURI); if (module != null) { LOG.debug("module " + namespaceURI + " is already present"); --- 407,411 ---- */ public Module loadBuiltInModule(String namespaceURI, String moduleClass) { ! Module module = getModule(namespaceURI); if (module != null) { LOG.debug("module " + namespaceURI + " is already present"); *************** *** 542,546 **** Variable var; // first, check if the variable is declared in a module ! Module module = (Module) modules.get(qname.getNamespaceURI()); if(module != null) { var = module.resolveVariable(qname); --- 546,550 ---- Variable var; // first, check if the variable is declared in a module ! Module module = getModule(qname.getNamespaceURI()); if(module != null) { var = module.resolveVariable(qname); *************** *** 770,774 **** public void importModule(String namespaceURI, String prefix, String location) throws XPathException { ! Module module = (Module)modules.get(namespaceURI); if(module != null) { LOG.debug("Module " + namespaceURI + " already present."); --- 774,778 ---- public void importModule(String namespaceURI, String prefix, String location) throws XPathException { ! Module module = getModule(namespaceURI); if(module != null) { LOG.debug("Module " + namespaceURI + " already present."); *************** *** 889,893 **** * internal functions. */ ! private void loadDefaults() { SymbolTable syms = broker.getSymbols(); String[] pfx = syms.defaultPrefixList(); --- 893,897 ---- * internal functions. */ ! protected void loadDefaults() { SymbolTable syms = broker.getSymbols(); String[] pfx = syms.defaultPrefixList(); Index: ModuleContext.java =================================================================== RCS file: /cvsroot/exist/eXist-1.0/src/org/exist/xquery/ModuleContext.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** ModuleContext.java 15 Jul 2004 19:43:23 -0000 1.1 --- ModuleContext.java 17 Jul 2004 10:00:44 -0000 1.2 *************** *** 10,13 **** --- 10,14 ---- import org.exist.dom.DocumentSet; + import org.exist.memtree.MemTreeBuilder; *************** *** 26,31 **** */ public ModuleContext(XQueryContext parentContext) { ! super(parentContext.getBroker()); this.parentContext = parentContext; } --- 27,34 ---- */ public ModuleContext(XQueryContext parentContext) { ! super(); this.parentContext = parentContext; + this.broker = parentContext.getBroker(); + loadDefaults(); } |
From: Wolfgang M. M. <wol...@us...> - 2004-07-17 10:01:08
|
Update of /cvsroot/exist/eXist-1.0/src/org/exist/xquery/parser In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6205/src/org/exist/xquery/parser Modified Files: XQuery.g Log Message: Exception thrown when resolving global module variables. Index: XQuery.g =================================================================== RCS file: /cvsroot/exist/eXist-1.0/src/org/exist/xquery/parser/XQuery.g,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -d -r1.18 -r1.19 *** XQuery.g 6 Jul 2004 19:48:56 -0000 1.18 --- XQuery.g 17 Jul 2004 10:00:44 -0000 1.19 *************** *** 1197,1201 **** VariableDeclaration decl= new VariableDeclaration(context, qname.getText(), enclosed); decl.setSequenceType(type); ! decl.setASTNode(e); path.add(decl); if(myModule != null) { --- 1197,1201 ---- VariableDeclaration decl= new VariableDeclaration(context, qname.getText(), enclosed); decl.setSequenceType(type); ! decl.setASTNode(e); path.add(decl); if(myModule != null) { |
From: Wolfgang M. M. <wol...@us...> - 2004-07-16 17:45:43
|
Update of /cvsroot/exist/eXist-1.0 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29961 Modified Files: build.properties conf.xml Log Message: Fixed text:match-count function. Index: conf.xml =================================================================== RCS file: /cvsroot/exist/eXist-1.0/conf.xml,v retrieving revision 1.55 retrieving revision 1.56 diff -C2 -d -r1.55 -r1.56 *** conf.xml 14 Jul 2004 19:04:00 -0000 1.55 --- conf.xml 16 Jul 2004 17:45:30 -0000 1.56 *************** *** 121,126 **** <indexer stemming="no" caseSensitive="no" suppress-whitespace="both" index-depth="1" tokenizer="org.exist.storage.analysis.SimpleTokenizer" ! track-term-freq="no" ! validation="no"> <!-- where's the file containing a list of stopwords to be ignored --- 121,125 ---- <indexer stemming="no" caseSensitive="no" suppress-whitespace="both" index-depth="1" tokenizer="org.exist.storage.analysis.SimpleTokenizer" ! track-term-freq="yes" validation="no"> <!-- where's the file containing a list of stopwords to be ignored Index: build.properties =================================================================== RCS file: /cvsroot/exist/eXist-1.0/build.properties,v retrieving revision 1.22 retrieving revision 1.23 diff -C2 -d -r1.22 -r1.23 *** build.properties 28 May 2004 10:54:12 -0000 1.22 --- build.properties 16 Jul 2004 17:45:30 -0000 1.23 *************** *** 27,29 **** # sources of the XML:DB API. Needed for javadoc ! xmldb.src = /home/wolf/Java/xmldb/xapi/src/api --- 27,29 ---- # sources of the XML:DB API. Needed for javadoc ! xmldb.src = /home/wolf/Devel/eXist/xapi/src/api |