Changeset 18316 for greenstone3/trunk


Ignore:
Timestamp:
2009-01-06T14:26:10+13:00 (15 years ago)
Author:
kjdon
Message:

indented the xml nicely.

Location:
greenstone3/trunk/web/interfaces/default/transform
Files:
18 edited

Legend:

Unmodified
Added
Removed
  • greenstone3/trunk/web/interfaces/default/transform/about.xsl

    r17017 r18316  
    1212  <xsl:output method="html"/> 
    1313 
    14     <!-- the main page layout template is here -->
     14  <!-- the main page layout template is here -->
    1515  <xsl:template match="page">
    16         <html>
    17     <head>
    18       <title>
    19     <!-- put a space in the title in case the actual value is missing - mozilla will not display a page with no title-->
    20     <xsl:call-template name="pageTitle"/><xsl:text> </xsl:text>
    21       </title>
    22       <xsl:call-template name="globalStyle"/>
    23       <xsl:call-template name="pageStyle"/>
    24     </head>
    25           <body>
    26            <div id="globalwrapper">
    27           <xsl:call-template name="response" />
    28           <xsl:call-template name="greenstoneFooter"/>
    29        </div>
    30           </body>
    31         </html>
     16    <html>
     17      <head>
     18    <title>
     19      <!-- put a space in the title in case the actual value is missing - mozilla will not display a page with no title-->
     20      <xsl:call-template name="pageTitle"/><xsl:text> </xsl:text>
     21    </title>
     22    <xsl:call-template name="globalStyle"/>
     23    <xsl:call-template name="pageStyle"/>
     24      </head>
     25      <body>
     26    <div id="globalwrapper">
     27      <xsl:call-template name="response" />
     28      <xsl:call-template name="greenstoneFooter"/>
     29    </div>
     30      </body>
     31    </html>
    3232  </xsl:template>
    3333
     
    4040
    4141  <xsl:template match="pageResponse">
    42      <xsl:variable name="collName" select="/page/pageRequest/paramList/param[@name='c']/@value"/>
     42    <xsl:variable name="collName" select="/page/pageRequest/paramList/param[@name='c']/@value"/>
    4343    <xsl:apply-templates select="collection|serviceCluster"><xsl:with-param name="collName" select="$collName"/></xsl:apply-templates>
    44    </xsl:template>
     44  </xsl:template>
    4545 
    4646  <xsl:template match="collection|serviceCluster">
     
    5353    </xsl:call-template>     
    5454    <div id="content">
    55         <xsl:value-of select="displayItem[@name='description']" disable-output-escaping="yes"/>
    56         <xsl:apply-templates select="serviceList">
    57           <xsl:with-param name="collName" select="$collName"/>
    58         </xsl:apply-templates>
     55      <xsl:value-of select="displayItem[@name='description']" disable-output-escaping="yes"/>
     56      <xsl:apply-templates select="serviceList">
     57    <xsl:with-param name="collName" select="$collName"/>
     58      </xsl:apply-templates>
    5959    </div>
    6060  </xsl:template>
     
    7474   
    7575    <xsl:if test="service">
    76      <ul id="servicelist">     
    77       <xsl:for-each select="service">
    78         <xsl:variable name="action"><xsl:choose>
     76      <ul id="servicelist">     
     77    <xsl:for-each select="service">
     78      <xsl:variable name="action"><xsl:choose>
    7979          <xsl:when test="@type='query'">q</xsl:when>
    8080          <xsl:when test="@type='browse'">b</xsl:when>
     
    8383          <xsl:otherwise>DO_NOT_DISPLAY</xsl:otherwise>
    8484        </xsl:choose></xsl:variable>
    85        <xsl:if test="$action !='DO_NOT_DISPLAY'">
    86            <li><a href="{$library_name}?a={$action}&amp;rt=d&amp;s={@name}&amp;c={$collName}"><xsl:value-of select="displayItem[@name='name']"/></a><xsl:value-of select="displayItem[@name='description']"/></li>
     85      <xsl:if test="$action !='DO_NOT_DISPLAY'">
     86        <li><a href="{$library_name}?a={$action}&amp;rt=d&amp;s={@name}&amp;c={$collName}"><xsl:value-of select="displayItem[@name='name']"/></a><xsl:value-of select="displayItem[@name='description']"/></li>
    8787      </xsl:if>
    8888    </xsl:for-each>
    8989      </ul>
    90      </xsl:if>
     90    </xsl:if>
    9191  </xsl:template>
    9292
  • greenstone3/trunk/web/interfaces/default/transform/applet.xsl

    r17017 r18316  
    1212  <xsl:output method="html"/> 
    1313 
    14     <!-- the main page layout template is here -->
     14  <!-- the main page layout template is here -->
    1515  <xsl:template match="page">
    16         <html>
    17     <head>
    18       <title>
    19     <!-- put a space in the title in case the actual value is missing - mozilla will not display a page with no title-->
    20     <xsl:call-template name="pageTitle"/><xsl:text> </xsl:text>
    21       </title>
    22       <xsl:call-template name="globalStyle"/>
    23       <xsl:call-template name="pageStyle"/>
    24     </head>
    25           <body>
    26            <div id="globalwrapper">
    27           <xsl:call-template name="response" />
    28           <xsl:call-template name="greenstoneFooter"/>
    29        </div>
    30           </body>
    31         </html>
     16    <html>
     17      <head>
     18    <title>
     19      <!-- put a space in the title in case the actual value is missing - mozilla will not display a page with no title-->
     20      <xsl:call-template name="pageTitle"/><xsl:text> </xsl:text>
     21    </title>
     22    <xsl:call-template name="globalStyle"/>
     23    <xsl:call-template name="pageStyle"/>
     24      </head>
     25      <body>
     26    <div id="globalwrapper">
     27      <xsl:call-template name="response" />
     28      <xsl:call-template name="greenstoneFooter"/>
     29    </div>
     30      </body>
     31    </html>
    3232  </xsl:template>
    3333
     
    4141  <xsl:template match="pageResponse">
    4242    <xsl:variable name="collName"><xsl:value-of select="../pageRequest/paramList/param[@name='c']/@value"/></xsl:variable>
    43      <xsl:call-template name="standardPageBanner">
    44     <xsl:with-param name="collName" select="$collName"/>
    45       </xsl:call-template>
     43    <xsl:call-template name="standardPageBanner">
     44      <xsl:with-param name="collName" select="$collName"/>
     45    </xsl:call-template>
    4646   
    4747    <xsl:call-template name="navigationBar">
     
    5151      <xsl:copy-of select="service/applet"/>
    5252    </div>
    53     </xsl:template>
     53  </xsl:template>
    5454</xsl:stylesheet> 
    5555
  • greenstone3/trunk/web/interfaces/default/transform/authen.xsl

    r17017 r18316  
    1515  <!-- the main page layout template is here -->
    1616  <xsl:template match="page">
    17         <html>
    18     <head>
    19       <title>
    20     <!-- put a space in the title in case the actual value is missing - mozilla will not display a page with no title-->
    21     <xsl:call-template name="pageTitle"/><xsl:text> </xsl:text>
    22       </title>
    23       <xsl:call-template name="globalStyle"/>
    24       <xsl:call-template name="pageStyle"/>
    25     </head>
    26           <body>
    27            <div id="globalwrapper">
    28           <xsl:call-template name="response" />
    29           <xsl:call-template name="greenstoneFooter"/>
    30        </div>
    31           </body>
    32         </html>
     17    <html>
     18      <head>
     19    <title>
     20      <!-- put a space in the title in case the actual value is missing - mozilla will not display a page with no title-->
     21      <xsl:call-template name="pageTitle"/><xsl:text> </xsl:text>
     22    </title>
     23    <xsl:call-template name="globalStyle"/>
     24    <xsl:call-template name="pageStyle"/>
     25      </head>
     26      <body>
     27    <div id="globalwrapper">
     28      <xsl:call-template name="response" />
     29      <xsl:call-template name="greenstoneFooter"/>
     30    </div>
     31      </body>
     32    </html>
    3333  </xsl:template> 
    3434
     
    6666        <td><xsl:if test="$un_s!=''">
    6767            <xsl:if test="$asn!='' and $asn!='0'">
    68             <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'authen.username')"/>  :  <xsl:value-of select="$un_s"/>
     68              <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'authen.username')"/>  :  <xsl:value-of select="$un_s"/>
    6969            </xsl:if>
    7070          </xsl:if></td>
     
    8383          <xsl:when test="$asn!='' and $asn!='0' and $un_s!=''">
    8484            <a href="{$library_name}?a=g&amp;rt=r&amp;sa=authen&amp;s=Authentication&amp;s1.aup=ListUsers&amp;s1.asn={$asn}&amp;s1.uan=1&amp;s1.un={$un_s}&amp;s1.pw="><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'authen.list_users')"/></a>
    85         </xsl:when>
    86           <xsl:otherwise>
    87         <a href="{$library_name}?a=g&amp;rt=r&amp;sa=authen&amp;s=Authentication&amp;s1.asn=&amp;s1.aup=Login"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'authen.list_users')"/></a>
    88           </xsl:otherwise>
    89         </xsl:choose></li>
     85          </xsl:when>
     86          <xsl:otherwise>
     87            <a href="{$library_name}?a=g&amp;rt=r&amp;sa=authen&amp;s=Authentication&amp;s1.asn=&amp;s1.aup=Login"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'authen.list_users')"/></a>
     88          </xsl:otherwise>
     89        </xsl:choose></li>
    9090         
    9191          <!--add a new user-->
     
    100100        </xsl:choose>
    101101          </li>
    102          
     102          
    103103          <!-- change password-->
    104104          <li>
     
    138138              <xsl:otherwise>
    139139
    140               <p align="left">
    141                 <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'authen.login_descibe_line_3')"/><br/></p>
    142               <xsl:if test="$err='un-pw-err'">
    143                 <p align="left"><font color='red'><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'authen.wrong_password_warning')"/></font></p>
    144               </xsl:if>
    145               <xsl:if test="$err='no-permission' and $info='Login'">
    146                 <p align="left"><font color='red'><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'authen.no_permission')"/></font></p>
    147               </xsl:if>
    148              <xsl:if test="$err='as-false'">
    149                 <p align="left"><font color='red'><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'authen.account_status_false')"/></font></p>
    150               </xsl:if>
    151               <xsl:call-template name="login">
    152                 <xsl:with-param name="sub_action" select="$sub_action"/>
    153                 <xsl:with-param name="authen_service" select="$authen_service"/>
    154                 <xsl:with-param name="pro_action" select="$pro_action"/>   
    155               </xsl:call-template>
     140            <p align="left">
     141              <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'authen.login_descibe_line_3')"/><br/></p>
     142            <xsl:if test="$err='un-pw-err'">
     143              <p align="left"><font color='red'><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'authen.wrong_password_warning')"/></font></p>
     144            </xsl:if>
     145            <xsl:if test="$err='no-permission' and $info='Login'">
     146              <p align="left"><font color='red'><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'authen.no_permission')"/></font></p>
     147            </xsl:if>
     148            <xsl:if test="$err='as-false'">
     149              <p align="left"><font color='red'><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'authen.account_status_false')"/></font></p>
     150            </xsl:if>
     151            <xsl:call-template name="login">
     152              <xsl:with-param name="sub_action" select="$sub_action"/>
     153              <xsl:with-param name="authen_service" select="$authen_service"/>
     154              <xsl:with-param name="pro_action" select="$pro_action"/> 
     155            </xsl:call-template>
    156156
    157157              </xsl:otherwise>
    158            </xsl:choose>
     158            </xsl:choose>
    159159          </xsl:if>
    160160
     
    179179          <xsl:if test="$pro_action='AddUser'">
    180180            <xsl:if test="$err!='' and $err!='no-permission' and $err!='un-exist' and $err!='un-err' and $err!='pw-err'">
    181             <p align="left"><font color='red'><xsl:value-of select="$err" /></font></p>
     181              <p align="left"><font color='red'><xsl:value-of select="$err" /></font></p>
    182182            </xsl:if>
    183183
     
    185185              <p align="left">
    186186            <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'authen.login_descibe_line_2')"/><br/>
    187         </p>
     187              </p>
    188188              <xsl:if test="$err='no-permission'">
    189189            <p align="left"><font color='red'><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'authen.no_permission')"/></font></p>
     
    204204            <p align="left"><font color="red"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'authen.unsername_err')"/></font></p>
    205205              </xsl:if>
    206             <xsl:if test="$err='un-exist'">
     206              <xsl:if test="$err='un-exist'">
    207207            <p align="left"><font color='red'><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'authen.user_has_existed')"/></font></p>
    208208              </xsl:if>
     
    306306            <p align="left"><font color="red"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'authen.password_initial')"/></font></p>
    307307              </xsl:if>
    308                <xsl:if test="$err='un-exist'">
     308              <xsl:if test="$err='un-exist'">
    309309            <p align="left"><font color='red'><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'authen.user_has_existed')"/></font></p>
    310310              </xsl:if>
     
    344344  </xsl:template>
    345345 
    346  <!--template name="login"-->
     346  <!--template name="login"-->
    347347  <xsl:template name="login">
    348348    <xsl:param name="sub_action"/>
     
    374374          <input type="submit" value="submit"></input></td>
    375375      </tr>
    376       </table>
     376    </table>
    377377      </form>
    378378    </div>
    379379  </xsl:template>
    380380
    381  <!--template name="listusers"-->
     381  <!--template name="listusers"-->
    382382  <xsl:template name="listusers" >
    383    <h2 align="left"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'authen.list_of_current_users_title')"/></h2>
     383    <h2 align="left"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'authen.list_of_current_users_title')"/></h2>
    384384
    385385    <table id='mainTable' align="left" border="0" cellspacing="1" cellpadding="3" width="100%" >
     
    392392      </tr>
    393393      <xsl:for-each select="/page/pageResponse/authenticationNode/service/userNodeList/userNode">
    394       <tr>
    395     <td bgcolor="#eeeeee"><xsl:value-of select="@umun"/></td>
    396     <td id="status" bgcolor="#eeeeee">
     394    <tr>
     395      <td bgcolor="#eeeeee"><xsl:value-of select="@umun"/></td>
     396      <td id="status" bgcolor="#eeeeee">
    397397        <script type="text/javascript">
    398398          <xsl:text disable-output-escaping="yes">
    399399        var status="</xsl:text><xsl:value-of select="@umas"/><xsl:text disable-output-escaping="yes">";
    400400        if (status=="true"){
    401            document.getElementById("status").innerHTML="enabled";
     401          document.getElementById("status").innerHTML="enabled";
    402402        }
    403403        if (status=="false"){
    404            document.getElementById("status").innerHTML="disabled";
     404          document.getElementById("status").innerHTML="disabled";
    405405        }
    406406          </xsl:text>       
    407407        </script>
    408408      </td>
    409     <td id="group" bgcolor="#eeeeee">
    410          <script type="text/javascript">
     409      <td id="group" bgcolor="#eeeeee">
     410        <script type="text/javascript">
    411411          <xsl:text disable-output-escaping="yes">
    412412        var groups="</xsl:text><xsl:value-of select="@umgp"/><xsl:text disable-output-escaping="yes">";
     
    414414        var new_groups="";
    415415        for (j=0; j &lt; split_groups.length ; j++){
    416                    new_groups+=split_groups[j]+" &lt;br /&gt; ";
    417            }
    418           document.getElementById('group').innerHTML=new_groups;
     416          new_groups+=split_groups[j]+" &lt;br /&gt; ";
     417        }
     418        document.getElementById('group').innerHTML=new_groups;
    419419          </xsl:text>       
    420420        </script>
    421421      </td>
    422     <td bgcolor="#eeeeee"><xsl:value-of select="@umc"/></td>
    423     <td bgcolor="#eeeeee">
     422      <td bgcolor="#eeeeee"><xsl:value-of select="@umc"/></td>
     423      <td bgcolor="#eeeeee">
    424424        <form name="ListUsersForm" method="get" action="{$library_name}">
    425425          <input type='hidden' name='a' value='g'/>
     
    437437          <input type="submit"><xsl:attribute name="name">s1.aup</xsl:attribute><xsl:attribute name="value">DeleteUser</xsl:attribute></input>
    438438        </form>
    439     </td>
     439      </td>
    440440    </tr>
    441        </xsl:for-each>
     441      </xsl:for-each>
    442442    </table>
    443443  </xsl:template>
    444444
    445  <!--template name="modifypassword"-->
    446  <xsl:template name="modifypassword" >
     445  <!--template name="modifypassword"-->
     446  <xsl:template name="modifypassword" >
    447447    <xsl:param name="sub_action"/>
    448448    <xsl:param name="authen_service"/>
     
    464464   
    465465    <table align="center"><tr><td align="right">
    466     <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'authen.old_password')"/></td><td><input type="password" name="s1.umpw" size="10" value=""/></td></tr>
     466          <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'authen.old_password')"/></td><td><input type="password" name="s1.umpw" size="10" value=""/></td></tr>
    467467      <tr><td align="right">
    468     <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'authen.new_password')"/></td><td><input type="password" name="s1.umpw1" size="10" value=""/></td></tr>
     468          <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'authen.new_password')"/></td><td><input type="password" name="s1.umpw1" size="10" value=""/></td></tr>
    469469      <tr><td align="right">
    470     <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'authen.retype_new_password')"/></td><td><input type="password" name="s1.umpw2" size="10" value=""/></td></tr>
     470          <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'authen.retype_new_password')"/></td><td><input type="password" name="s1.umpw2" size="10" value=""/></td></tr>
    471471      <tr><td></td><td>
    472     <input type="submit" value="submit"></input></td>
    473         </tr>
    474       </table>
    475     </form>
    476       </div>
    477   </xsl:template>
    478 
    479 <!--template name="deleteuser"-->
     472          <input type="submit" value="submit"></input></td>
     473      </tr>
     474    </table>
     475      </form>
     476    </div>
     477  </xsl:template>
     478
     479  <!--template name="deleteuser"-->
    480480  <xsl:template name="deleteuser">
    481481    <xsl:param name="sub_action"/>
     
    502502  </xsl:template>
    503503 
    504 <!--template name="edituser"-->
     504  <!--template name="edituser"-->
    505505  <xsl:template name="edituser" >
    506506    <xsl:param name="sub_action"/>
     
    554554        <td  align="right"> <select id="groups" size="0">
    555555        <script type="text/javascript">
    556             <xsl:text disable-output-escaping="yes">
     556          <xsl:text disable-output-escaping="yes">
    557557            var group_arr=Array("administrator","all-collections-editor","personal-collections-editor");
    558558            var group_string=document.getElementById("group").value;
     
    560560            var find=0;
    561561            for (i=0; i &lt; group_arr.length; i++){
    562                  find=0;
    563                  for (j=0; j &lt; group_arr.length; j++){
    564                     if (split_group_string[j]==group_arr[i]){
    565                        find=1;
    566                             }
    567                  }
    568                      if (find==0){
    569                      op = document.createElement('option');
    570                      op.innerHTML = group_arr[i];
    571                      op.setAttribute("value", group_arr[i]);
    572                      document.getElementById("groups").appendChild(op);
    573                          }
     562              find=0;
     563              for (j=0; j &lt; group_arr.length; j++){
     564                if (split_group_string[j]==group_arr[i]){
     565                  find=1;
     566                }
     567              }
     568              if (find==0){
     569                op = document.createElement('option');
     570                op.innerHTML = group_arr[i];
     571                op.setAttribute("value", group_arr[i]);
     572                document.getElementById("groups").appendChild(op);
     573              }
    574574                }
    575            
     575            
    576576          </xsl:text>       
    577577        </script>
     
    590590              var find=0;
    591591              for (i=0; i &lt; split_group_string.length; i++){
    592                   if (split_group_string[i]==group){
    593                       find=1;
    594                   }
     592                if (split_group_string[i]==group){
     593                  find=1;
     594                }
    595595              }
    596596              if (find==0){
    597                   op = document.createElement('option');
    598                   op.innerHTML = group;
    599                   op.setAttribute("value", group);
    600                   document.getElementById("collects").appendChild(op);
     597                op = document.createElement('option');
     598                op.innerHTML = group;
     599                op.setAttribute("value", group);
     600                document.getElementById("collects").appendChild(op);
    601601              }
    602602            </xsl:text>     
    603603          </script>
    604          </xsl:for-each>
     604        </xsl:for-each>
    605605          </select>
    606606        </td>
     
    610610          <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'authen.comment')"/></td><td colspan="2"><div><textarea cols="40" rows="5" name="s1.umc"><xsl:value-of select="$umc_s"/>
    611611
    612 </textarea></div></td></tr>
     612        </textarea></div></td></tr>
    613613      <tr>
    614614
    615 <td></td><td>
     615        <td></td><td>
    616616          <input type="submit" value="submit"><xsl:attribute name="name">s1.cm</xsl:attribute></input>
    617            <xsl:if test="$pro_action!='AddUser'">
    618           <input type="submit" value="cancel"><xsl:attribute name="name">s1.cm</xsl:attribute></input>
    619         </xsl:if>
     617          <xsl:if test="$pro_action!='AddUser'">
     618        <input type="submit" value="cancel"><xsl:attribute name="name">s1.cm</xsl:attribute></input>
     619          </xsl:if>
    620620        </td><td></td></tr>
    621621    </table>
     
    625625  </xsl:template>
    626626
    627 <!-- addGroup() javascript -->
     627  <!-- addGroup() javascript -->
    628628  <xsl:template name="addGroup">
    629629    <script type="text/javascript">
    630630      <xsl:text disable-output-escaping="yes">
    631631    function addGroup(g){
    632         var itemSelected;
    633         var splitGroup;
    634         var groupExit;
    635 
    636     if (document.getElementById("editForm")!=null){
     632      var itemSelected;
     633      var splitGroup;
     634      var groupExit;
     635
     636      if (document.getElementById("editForm")!=null){
    637637        //itemSelected=document.getElementById("editForm").groups.options.selectedIndex;
    638638        itemSelected=document.getElementById(g).options.selectedIndex;
    639639        if (document.getElementById(g).options[itemSelected].text!=""){
    640            if (document.getElementById("group").value==""){
    641                document.getElementById("group").value=document.getElementById("group").value+document.getElementById(g).options[itemSelected].text;
    642            }else{
    643                splitGroup=document.getElementById("group").value.split(",");
    644                for (var i=0; i &lt; splitGroup.length; i++){
    645                   if (splitGroup[i]==document.getElementById(g).options[itemSelected].text){
    646                       alert(document.getElementById(g).options[itemSelected].text + " has been added.");
    647                       groupExit=1;
    648                       break;
    649                   }
    650                }
    651                if (groupExit!=1) {
    652                   document.getElementById("group").value=document.getElementById("group").value+","+document.getElementById(g).options[itemSelected].text;
    653                }
    654            }
    655            document.getElementById(g).options[itemSelected]=new Option("",itemSelected);
    656        }
    657     }
     640          if (document.getElementById("group").value==""){
     641            document.getElementById("group").value=document.getElementById("group").value+document.getElementById(g).options[itemSelected].text;
     642          }else{
     643            splitGroup=document.getElementById("group").value.split(",");
     644            for (var i=0; i &lt; splitGroup.length; i++){
     645              if (splitGroup[i]==document.getElementById(g).options[itemSelected].text){
     646                alert(document.getElementById(g).options[itemSelected].text + " has been added.");
     647                groupExit=1;
     648                break;
     649              }
     650            }
     651            if (groupExit!=1) {
     652              document.getElementById("group").value=document.getElementById("group").value+","+document.getElementById(g).options[itemSelected].text;
     653            }
     654          }
     655          document.getElementById(g).options[itemSelected]=new Option("",itemSelected);
     656        }
     657      }
    658658    }
    659659      </xsl:text>
  • greenstone3/trunk/web/interfaces/default/transform/classifier.xsl

    r17017 r18316  
    1616  <!-- the main page layout template is here -->
    1717  <xsl:template match="page">
    18         <html>
    19     <head>
    20       <title>
    21     <!-- put a space in the title in case the actual value is missing - mozilla will not display a page with no title-->
    22     <xsl:call-template name="pageTitle"/><xsl:text> </xsl:text>
    23       </title>
    24       <xsl:call-template name="globalStyle"/>
    25       <xsl:call-template name="pageStyle"/>
    26     </head>
    27           <body>
    28            <div id="globalwrapper">
    29           <xsl:call-template name="response" />
    30           <xsl:call-template name="greenstoneFooter"/>
    31        </div>
    32           </body>
    33         </html>
     18    <html>
     19      <head>
     20    <title>
     21      <!-- put a space in the title in case the actual value is missing - mozilla will not display a page with no title-->
     22      <xsl:call-template name="pageTitle"/><xsl:text> </xsl:text>
     23    </title>
     24    <xsl:call-template name="globalStyle"/>
     25    <xsl:call-template name="pageStyle"/>
     26      </head>
     27      <body>
     28    <div id="globalwrapper">
     29      <xsl:call-template name="response" />
     30      <xsl:call-template name="greenstoneFooter"/>
     31    </div>
     32      </body>
     33    </html>
    3434  </xsl:template>
    3535 
     
    4242  <!-- page specific style goes here -->
    4343  <xsl:template name="pageStyle">
    44     <!--<xsl:if test="$berryBaskets = 'true'">-->
    4544    <xsl:if test="$berrybasketswitch = 'on'">
    4645      <xsl:call-template name="berryStyleSheet"/> 
     
    6059      <xsl:with-param name="collName" select="$collName"/>
    6160    </xsl:call-template>     
    62  
     61    
    6362    <div id="content">
    6463      <xsl:apply-templates select="service/classifierList">
     
    6766      </xsl:apply-templates>
    6867     
    69     <!--<xsl:if test="$berryBaskets = 'true'">-->
    70     <xsl:if test="$berrybasketswitch = 'on'">
    71       <xsl:call-template name="berrybasket" />
    72     </xsl:if> 
    73     <xsl:apply-templates select="classifier">
    74       <xsl:with-param name="collName" select="$collName"/>
    75       <xsl:with-param name="serviceName" select="$serviceName"/>
    76     </xsl:apply-templates>
     68      <xsl:if test="$berrybasketswitch = 'on'">
     69    <xsl:call-template name="berrybasket" />
     70      </xsl:if> 
     71      <xsl:apply-templates select="classifier">
     72    <xsl:with-param name="collName" select="$collName"/>
     73    <xsl:with-param name="serviceName" select="$serviceName"/>
     74      </xsl:apply-templates>
    7775    </div>
    7876  </xsl:template>
     
    8280    <xsl:param name="serviceName"/>
    8381    <xsl:variable name="selected" select="/page/pageResponse/classifier/@name"/>
    84    <ul id="classifierlist">
    85     <xsl:for-each select="classifier">
    86       <xsl:choose>
    87         <xsl:when test="@name=$selected">
    88              <li id="activeclassifier"><xsl:value-of select="displayItem[@name='name']"/></li>
    89         </xsl:when>
    90         <xsl:otherwise>
    91           <li><a href="{$library_name}?a=b&amp;rt=r&amp;s={$serviceName}&amp;c={$collName}&amp;cl={@name}"><xsl:value-of select="displayItem[@name='name']"/></a></li></xsl:otherwise></xsl:choose>
    92          
    93     </xsl:for-each>
     82    <ul id="classifierlist">
     83      <xsl:for-each select="classifier">
     84    <xsl:choose>
     85      <xsl:when test="@name=$selected">
     86        <li id="activeclassifier"><xsl:value-of select="displayItem[@name='name']"/></li>
     87      </xsl:when>
     88      <xsl:otherwise>
     89        <li><a href="{$library_name}?a=b&amp;rt=r&amp;s={$serviceName}&amp;c={$collName}&amp;cl={@name}"><xsl:value-of select="displayItem[@name='name']"/></a></li></xsl:otherwise></xsl:choose>
     90   
     91      </xsl:for-each>
    9492    </ul>
    95    </xsl:template>
     93  </xsl:template>
    9694
    9795</xsl:stylesheet>
  • greenstone3/trunk/web/interfaces/default/transform/classifiertools.xsl

    r13547 r18316  
    66  extension-element-prefixes="java util"
    77  exclude-result-prefixes="java util">
    8  
     8  
    99  <xsl:template match="classifier">
    1010    <xsl:param name="collName"/>
    1111    <xsl:param name="serviceName"/>
    1212    <div id="classifiers">
    13     <xsl:variable name="cl_name"><xsl:value-of select="@name"/></xsl:variable>
    14     <xsl:choose>
    15       <xsl:when test="/page/pageResponse/service/classifierList/classifier[@name=$cl_name]/@horizontalAtTop">
    16     <xsl:apply-templates select="." mode="horizontal-at-top">
    17       <xsl:with-param name="collName" select="$collName"/>
    18       <xsl:with-param name="serviceName" select="$serviceName"/>
    19     </xsl:apply-templates>
    20       </xsl:when>
    21       <xsl:otherwise>
    22     <xsl:apply-templates select="." mode="default">
    23       <xsl:with-param name="collName" select="$collName"/>
    24       <xsl:with-param name="serviceName" select="$serviceName"/>
    25     </xsl:apply-templates>
    26       </xsl:otherwise>
    27     </xsl:choose>
    28    </div>
     13      <xsl:variable name="cl_name"><xsl:value-of select="@name"/></xsl:variable>
     14      <xsl:choose>
     15    <xsl:when test="/page/pageResponse/service/classifierList/classifier[@name=$cl_name]/@horizontalAtTop">
     16      <xsl:apply-templates select="." mode="horizontal-at-top">
     17        <xsl:with-param name="collName" select="$collName"/>
     18        <xsl:with-param name="serviceName" select="$serviceName"/>
     19      </xsl:apply-templates>
     20    </xsl:when>
     21    <xsl:otherwise>
     22      <xsl:apply-templates select="." mode="default">
     23        <xsl:with-param name="collName" select="$collName"/>
     24        <xsl:with-param name="serviceName" select="$serviceName"/>
     25      </xsl:apply-templates>
     26    </xsl:otherwise>
     27      </xsl:choose>
     28    </div>
    2929  </xsl:template>
    3030 
     
    3535    <xsl:choose>
    3636      <xsl:when test="classifierNode">
    37       <ul id="classifiernodelist-horizontal">
    38     <xsl:for-each select='classifierNode'>
    39       <xsl:apply-templates select='.' mode="horizontal"><xsl:with-param name='collName' select='$collName'/><xsl:with-param name='serviceName' select='$serviceName'/></xsl:apply-templates>
    40     </xsl:for-each>
     37    <ul id="classifiernodelist-horizontal">
     38      <xsl:for-each select='classifierNode'>
     39        <xsl:apply-templates select='.' mode="horizontal"><xsl:with-param name='collName' select='$collName'/><xsl:with-param name='serviceName' select='$serviceName'/></xsl:apply-templates>
     40      </xsl:for-each>
    4141    </ul>
    4242    <ul id="childrenlist">
    4343      <li>
    4444            <table><tr>
    45         <xsl:for-each select='classifierNode'>
    46           <xsl:apply-templates select='.' mode='process-all-children'><xsl:with-param name='collName' select='$collName'/><xsl:with-param name='serviceName' select='$serviceName'/></xsl:apply-templates>
    47         </xsl:for-each>
    48              </tr></table>
     45        <xsl:for-each select='classifierNode'>
     46          <xsl:apply-templates select='.' mode='process-all-children'><xsl:with-param name='collName' select='$collName'/><xsl:with-param name='serviceName' select='$serviceName'/></xsl:apply-templates>
     47        </xsl:for-each>
     48          </tr></table>
    4949      </li>
    5050    </ul>
    51     </xsl:when>
     51      </xsl:when>
    5252      <xsl:otherwise>
    5353    <!-- there were no classifier nodes -->
     
    5555          <xsl:for-each select='documentNode'>
    5656        <li><table><tr><xsl:call-template name="documentNodeWrapper">
    57         <xsl:with-param name='collName' select='$collName'/>
    58         <xsl:with-param name='serviceName' select='$serviceName'/>
    59           </xsl:call-template></tr></table></li>
     57            <xsl:with-param name='collName' select='$collName'/>
     58            <xsl:with-param name='serviceName' select='$serviceName'/>
     59          </xsl:call-template></tr></table></li>
    6060      </xsl:for-each>
    6161    </ul>
     
    104104    <xsl:param name="collName"/>
    105105    <xsl:param name="serviceName"/>
    106       <a><xsl:attribute name='href'><xsl:value-of select='$library_name'/>?a=b&amp;rt=r&amp;s=<xsl:value-of select='$serviceName'/>&amp;c=<xsl:value-of select='$collName'/>&amp;cl=<xsl:value-of select='@nodeID'/><xsl:if test="classifierNode|documentNode">.pr</xsl:if></xsl:attribute><xsl:call-template name="bookshelfimg"/></a><xsl:value-of disable-output-escaping="yes" select="metadataList/metadata[@name='Title']"/>
     106    <a><xsl:attribute name='href'><xsl:value-of select='$library_name'/>?a=b&amp;rt=r&amp;s=<xsl:value-of select='$serviceName'/>&amp;c=<xsl:value-of select='$collName'/>&amp;cl=<xsl:value-of select='@nodeID'/><xsl:if test="classifierNode|documentNode">.pr</xsl:if></xsl:attribute><xsl:call-template name="bookshelfimg"/></a><xsl:value-of disable-output-escaping="yes" select="metadataList/metadata[@name='Title']"/>
    107107  </xsl:template>
    108108 
     
    112112    <xsl:param name="serviceName"/>
    113113    <li><xsl:choose>
    114       <xsl:when test="classifierNode|documentNode"><b><xsl:value-of disable-output-escaping="yes" select="metadataList/metadata[@name='Title']"/><xsl:text> </xsl:text></b></xsl:when>
    115       <xsl:otherwise>
    116 <a><xsl:attribute name='href'><xsl:value-of select='$library_name'/>?a=b&amp;rt=r&amp;s=<xsl:value-of select='$serviceName'/>&amp;c=<xsl:value-of select='$collName'/>&amp;cl=<xsl:value-of select='@nodeID'/></xsl:attribute><xsl:value-of disable-output-escaping="yes" select="metadataList/metadata[@name='Title']"/></a><xsl:text> </xsl:text></xsl:otherwise>
    117     </xsl:choose>
     114    <xsl:when test="classifierNode|documentNode"><b><xsl:value-of disable-output-escaping="yes" select="metadataList/metadata[@name='Title']"/><xsl:text> </xsl:text></b></xsl:when>
     115    <xsl:otherwise>
     116      <a><xsl:attribute name='href'><xsl:value-of select='$library_name'/>?a=b&amp;rt=r&amp;s=<xsl:value-of select='$serviceName'/>&amp;c=<xsl:value-of select='$collName'/>&amp;cl=<xsl:value-of select='@nodeID'/></xsl:attribute><xsl:value-of disable-output-escaping="yes" select="metadataList/metadata[@name='Title']"/></a><xsl:text> </xsl:text></xsl:otherwise>
     117      </xsl:choose>
    118118    </li>
    119119  </xsl:template>
     
    124124    <xsl:param name="collName"/>
    125125    <xsl:param name="serviceName"/>
    126       <xsl:call-template name="processNodeChildren">
    127       <xsl:with-param name='collName' select='$collName'/>
    128       <xsl:with-param name='serviceName' select='$serviceName'/>
    129       </xsl:call-template>
    130    </xsl:template>
     126    <xsl:call-template name="processNodeChildren">
     127      <xsl:with-param name='collName' select='$collName'/>
     128      <xsl:with-param name='serviceName' select='$serviceName'/>
     129    </xsl:call-template>
     130  </xsl:template>
    131131 
    132132  <xsl:template name="processNodeChildren">
     
    135135    <xsl:for-each select='classifierNode|documentNode'>
    136136      <xsl:choose><xsl:when test="name()='documentNode'">
    137      <li><table><tr>
    138         <xsl:call-template name="documentNodeWrapper">
    139           <xsl:with-param name='collName' select='$collName'/>
    140           <xsl:with-param name='serviceName' select='$serviceName'/>
    141         </xsl:call-template>
    142              </tr></table>
     137      <li><table><tr>
     138        <xsl:call-template name="documentNodeWrapper">
     139          <xsl:with-param name='collName' select='$collName'/>
     140          <xsl:with-param name='serviceName' select='$serviceName'/>
     141        </xsl:call-template>
     142          </tr></table>
    143143      </li>
    144144    </xsl:when>
    145145    <xsl:otherwise>
    146146      <li><table><tr>
    147         <xsl:apply-templates select='.'>
    148           <xsl:with-param name='collName' select='$collName'/>
    149           <xsl:with-param name='serviceName' select='$serviceName'/>
    150         </xsl:apply-templates>
    151              </tr></table>
     147        <xsl:apply-templates select='.'>
     148          <xsl:with-param name='collName' select='$collName'/>
     149          <xsl:with-param name='serviceName' select='$serviceName'/>
     150        </xsl:apply-templates>
     151          </tr></table>
    152152      </li>
    153153      <xsl:if test="child::classifierNode or child::documentNode">
    154154        <!--recurse into the children-->
    155155        <li><ul class="childrenlist">
    156           <xsl:apply-templates select='.' mode='process-all-children'>
    157         <xsl:with-param name='collName' select='$collName'/>
    158         <xsl:with-param name='serviceName' select='$serviceName'/>
    159           </xsl:apply-templates>
    160                 </ul>
     156        <xsl:apply-templates select='.' mode='process-all-children'>
     157          <xsl:with-param name='collName' select='$collName'/>
     158          <xsl:with-param name='serviceName' select='$serviceName'/>
     159        </xsl:apply-templates>
     160          </ul>
    161161        </li>
    162162      </xsl:if>
  • greenstone3/trunk/web/interfaces/default/transform/config_format.xsl

    r16703 r18316  
    3939    <xslt:variable name="bookswitch"><xslt:value-of select="/page/pageRequest/paramList/param[@name='book']/@value"/></xslt:variable>
    4040    <xslt:choose>
    41             <xslt:when test="$bookswitch = 'on' or $bookswitch = 'flashxml'">
    42                 <a><xslt:attribute name="href"><xslt:value-of select='$library_name'/>?a=d&amp;ed=1&amp;book=on&amp;c=<xslt:value-of select='$collName'/>&amp;d=<xslt:value-of select='@nodeID'/>&amp;dt=<xslt:value-of select='@docType'/><xslt:if test="@nodeType='leaf'">&amp;sib=1</xslt:if>&amp;p.a=<xslt:value-of select="/page/pageRequest/@action"/>&amp;p.sa=<xsl:value-of select="/page/pageRequest/@subaction"/>&amp;p.s=<xslt:value-of select="$serviceName"/></xslt:attribute><xsl:apply-templates/></a>
    43         </xslt:when>
    44         <xslt:otherwise>
    45                <a><xslt:attribute name="href"><xslt:value-of select='$library_name'/>?a=d&amp;book=off&amp;c=<xslt:value-of select='$collName'/>&amp;d=<xslt:value-of select='@nodeID'/>&amp;dt=<xslt:value-of select='@docType'/><xslt:if test="@nodeType='leaf'">&amp;sib=1</xslt:if>&amp;p.a=<xslt:value-of select="/page/pageRequest/@action"/>&amp;p.sa=<xsl:value-of select="/page/pageRequest/@subaction"/>&amp;p.s=<xslt:value-of select="$serviceName"/></xslt:attribute><xsl:apply-templates/></a>
    46         </xslt:otherwise>
     41      <xslt:when test="$bookswitch = 'on' or $bookswitch = 'flashxml'">
     42        <a><xslt:attribute name="href"><xslt:value-of select='$library_name'/>?a=d&amp;ed=1&amp;book=on&amp;c=<xslt:value-of select='$collName'/>&amp;d=<xslt:value-of select='@nodeID'/>&amp;dt=<xslt:value-of select='@docType'/><xslt:if test="@nodeType='leaf'">&amp;sib=1</xslt:if>&amp;p.a=<xslt:value-of select="/page/pageRequest/@action"/>&amp;p.sa=<xsl:value-of select="/page/pageRequest/@subaction"/>&amp;p.s=<xslt:value-of select="$serviceName"/></xslt:attribute><xsl:apply-templates/></a>
     43      </xslt:when>
     44      <xslt:otherwise>
     45        <a><xslt:attribute name="href"><xslt:value-of select='$library_name'/>?a=d&amp;book=off&amp;c=<xslt:value-of select='$collName'/>&amp;d=<xslt:value-of select='@nodeID'/>&amp;dt=<xslt:value-of select='@docType'/><xslt:if test="@nodeType='leaf'">&amp;sib=1</xslt:if>&amp;p.a=<xslt:value-of select="/page/pageRequest/@action"/>&amp;p.sa=<xsl:value-of select="/page/pageRequest/@subaction"/>&amp;p.s=<xslt:value-of select="$serviceName"/></xslt:attribute><xsl:apply-templates/></a>
     46      </xslt:otherwise>
    4747    </xslt:choose>
    4848      </xsl:otherwise>
  • greenstone3/trunk/web/interfaces/default/transform/document.xsl

    r18306 r18316  
    2222    <xsl:choose>
    2323      <xsl:when test="$bookswitch = 'flashxml' and $a = 'd'">
    24          <html>
    25           <xsl:call-template name="response" />
     24    <html>
     25      <xsl:call-template name="response" />
    2626        </html>
    2727      </xsl:when>
     
    2929      <xsl:otherwise>   
    3030        <html>
    31     <head>
    32       <title>
    33     <!-- put a space in the title in case the actual value is missing - mozilla will not display a page with no title-->
    34     <xsl:call-template name="pageTitle"/><xsl:text> </xsl:text>
    35       </title>
    36       <xsl:call-template name="globalStyle"/>
    37       <xsl:call-template name="pageStyle"/>
    38     </head>
     31      <head>
     32        <title>
     33          <!-- put a space in the title in case the actual value is missing - mozilla will not display a page with no title-->
     34          <xsl:call-template name="pageTitle"/><xsl:text> </xsl:text>
     35        </title>
     36        <xsl:call-template name="globalStyle"/>
     37        <xsl:call-template name="pageStyle"/>
     38      </head>
    3939          <body>
    40            <div id="globalwrapper">
    41           <xsl:call-template name="response" />
    42           <xsl:call-template name="greenstoneFooter"/>
    43        </div>
     40        <div id="globalwrapper">
     41          <xsl:call-template name="response" />
     42          <xsl:call-template name="greenstoneFooter"/>
     43        </div>
    4444          </body>
    4545        </html>
     
    4949 
    5050 
    51    <xsl:variable name="berrybasketswitch"><xsl:value-of select="/page/pageRequest/paramList/param[@name='berrybasket']/@value"/></xsl:variable>
    52    <xsl:variable name="bookswitch"><xsl:value-of select="/page/pageRequest/paramList/param[@name='book']/@value"/></xsl:variable>
     51  <xsl:variable name="berrybasketswitch"><xsl:value-of select="/page/pageRequest/paramList/param[@name='berrybasket']/@value"/></xsl:variable>
     52  <xsl:variable name="bookswitch"><xsl:value-of select="/page/pageRequest/paramList/param[@name='book']/@value"/></xsl:variable>
    5353 
    5454  <xsl:template name="pageTitle">
     
    6868      </xsl:text>
    6969    </style>
    70      <!--TODO: add berry basket switch-->
    71  <!--<xsl:if test="$berryBaskets = 'true'">-->
     70    <!--TODO: add berry basket switch-->
     71    <!--<xsl:if test="$berryBaskets = 'true'">-->
    7272    <xsl:if test="$berrybasketswitch = 'on'">
    73      <xsl:call-template name="berryStyleSheet"/> 
    74      <xsl:call-template name="js-library"/>
     73      <xsl:call-template name="berryStyleSheet"/> 
     74      <xsl:call-template name="js-library"/>
    7575    </xsl:if>
    7676  </xsl:template>
     
    8181      <xsl:when test="$bookswitch = 'on' or $bookswitch = 'off'">
    8282        <xsl:call-template name="standardPageBanner">
    83            <xsl:with-param name="collName" select="$collName"/>
     83      <xsl:with-param name="collName" select="$collName"/>
    8484        </xsl:call-template>
    8585        <xsl:call-template name="navigationBar">
    86            <xsl:with-param name="collName" select="$collName"/>
     86      <xsl:with-param name="collName" select="$collName"/>
    8787        </xsl:call-template>
    88  
     88   
    8989        <!--<xsl:if test="$berryBaskets = 'true'">-->
    9090        <xsl:if test="$berrybasketswitch = 'on'">
    9191          <xsl:call-template name="documentBerryBasket">
    92              <xsl:with-param name="collName" select="$collName"/>
    93              <xsl:with-param name="selectedNode" select="/page/pageResponse/document/@selectedNode"/>
    94              <xsl:with-param name="rootNode" select="/page/pageResponse/document/documentNode[@nodeType='root']/@nodeID"/>
    95              <xsl:with-param name="docType" select="/page/pageResponse/document/@docType"/>
     92        <xsl:with-param name="collName" select="$collName"/>
     93        <xsl:with-param name="selectedNode" select="/page/pageResponse/document/@selectedNode"/>
     94        <xsl:with-param name="rootNode" select="/page/pageResponse/document/documentNode[@nodeType='root']/@nodeID"/>
     95        <xsl:with-param name="docType" select="/page/pageResponse/document/@docType"/>
    9696          </xsl:call-template>
    9797        </xsl:if>
    9898      </xsl:when>
    99    </xsl:choose>   
    100 
    101   <!-- display the document -->
     99    </xsl:choose>   
     100
     101    <!-- display the document -->
    102102    <xsl:if test="$bookswitch != 'flashxml'">
    103        <xsl:text disable-output-escaping="yes">&lt;div id="content"&gt;</xsl:text>
     103      <xsl:text disable-output-escaping="yes">&lt;div id="content"&gt;</xsl:text>
    104104    </xsl:if>
    105105    <xsl:apply-templates select="document">
     
    107107    </xsl:apply-templates>
    108108    <xsl:if test="$bookswitch != 'flashxml'">
    109     <xsl:text disable-output-escaping="yes">&lt;/div&gt;</xsl:text>
    110     </xsl:if>
    111   </xsl:template>
    112    
     109      <xsl:text disable-output-escaping="yes">&lt;/div&gt;</xsl:text>
     110    </xsl:if>
     111  </xsl:template>
     112 
    113113  <xsl:template match="document">
    114    <xsl:param name="collName"/>
    115    <xsl:variable name="external"><xsl:value-of select="/page/pageResponse/document/@external"/></xsl:variable>
     114    <xsl:param name="collName"/>
     115    <xsl:variable name="external"><xsl:value-of select="/page/pageResponse/document/@external"/></xsl:variable>
    116116    <xsl:choose>
    117117      <xsl:when test="$external != ''">
    118       <xsl:call-template name="externalPage">
    119     <xsl:with-param name="external" select="$external"/>
    120       </xsl:call-template>
     118    <xsl:call-template name="externalPage">
     119      <xsl:with-param name="external" select="$external"/>
     120    </xsl:call-template>
    121121      </xsl:when>
    122122      <xsl:otherwise>
    123123
    124    <xsl:if test="$bookswitch = 'flashxml'">
    125             <xsl:call-template name="xmldocumentContentPeeling">
    126                 <xsl:with-param name="collName" select="$collName"/>
    127             </xsl:call-template>
    128         </xsl:if>
    129    
    130    <xsl:if test="$bookswitch = 'off'">
    131     <xsl:call-template name="documentHeading">
    132       <xsl:with-param name="collName" select="$collName"/>
    133     </xsl:call-template>
    134  
    135     <xsl:call-template name="documentArrows">
    136       <xsl:with-param name="collName" select="$collName"/>
    137     </xsl:call-template>         
    138     <xsl:call-template name="documentContent">
    139       <xsl:with-param name="collName" select="$collName"/>
    140     </xsl:call-template>
    141     <xsl:call-template name="documentArrows">
    142       <xsl:with-param name="collName" select="$collName"/>
    143     </xsl:call-template>   
    144    </xsl:if>
    145    <xsl:if test="$bookswitch = 'on'">
    146             <xsl:call-template name="documentHeading">
    147                 <xsl:with-param name="collName" select="$collName"/>
    148             </xsl:call-template>
    149             <div id="bookdiv"></div>
    150             <script type="text/javascript">
    151                 <xsl:text disable-output-escaping="yes">
    152                     var doc_url = document.URL;
    153                     doc_url = doc_url.replace(/(&amp;|\?)book=[a-z]+/gi,'');
    154                     doc_url += '&amp;book=flashxml';
    155 
    156                     // var src_image = "http://kia.cs.waikato.ac.nz:8080/greenstone3/sites/localsite/collect/gs2mgdemo/index/assoc/HASH49aa.dir/cover.jpg"
    157                     //var doc_url = "/greenstone3/library?a=d&amp;c=gs2mgdemo&amp;d=HASH49aab56062938fbe2ff7f1&amp;dt=hierarchy&amp;p.a=b&amp;p.s=ClassifierBrowse&amp;ed=1";
    158 
    159                     var flash_plug_html = ""
    160                     flash_plug_html += '&lt;OBJECT align="middle" classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" \n';
    161                     flash_plug_html += '  codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" \n';
    162                     flash_plug_html += '  height="100%" id="Book" swLiveConnect="true" \n';
    163                     flash_plug_html += '  width="100%"&gt;\n';
    164                     flash_plug_html += '    &lt;PARAM name="allowScriptAccess" value="always" /&gt;\n';
    165                     flash_plug_html += '    &lt;PARAM name="movie" value="Book.swf';
    166                     flash_plug_html += '?src_image=' + escape(img_cover);
    167                     flash_plug_html += '&amp;doc_url=' + escape(doc_url)
    168                     flash_plug_html += '" /&gt;\n';
    169                     flash_plug_html += '    &lt;PARAM name="quality" value="high" /&gt;\n';
    170                     flash_plug_html += '    &lt;PARAM name="bgcolor" value="#FFFFFF" /&gt;\n';
    171                     flash_plug_html += '    &lt;EMBED align="middle" \n';
    172                     flash_plug_html += '      allowScriptAccess="always" swLiveConnect="true" \n';
    173                     flash_plug_html += '      bgcolor="#FFFFFF" height="100%" name="Book" \n';
    174                     flash_plug_html += '      pluginspage="http://www.macromedia.com/go/getflashplayer" \n';
    175                     flash_plug_html += '      quality="high" \n';
    176                     flash_plug_html += '      src="Book.swf';
    177                     flash_plug_html += '?src_image=' + escape(img_cover);
    178                     flash_plug_html += '&amp;doc_url=' + escape(doc_url);
    179                     flash_plug_html += '"\n';
    180                     flash_plug_html += '      type="application/x-shockwave-flash" width="100%" /&gt;\n';
    181                     flash_plug_html += '&lt;/OBJECT&gt;\n';
    182                     var flash_div = document.getElementById("bookdiv");
    183                     flash_div.innerHTML = flash_plug_html;
    184                 </xsl:text>
    185             </script>
    186         </xsl:if> 
    187        </xsl:otherwise>
     124    <xsl:if test="$bookswitch = 'flashxml'">
     125      <xsl:call-template name="xmldocumentContentPeeling">
     126        <xsl:with-param name="collName" select="$collName"/>
     127      </xsl:call-template>
     128    </xsl:if>
     129   
     130    <xsl:if test="$bookswitch = 'off'">
     131      <xsl:call-template name="documentHeading">
     132        <xsl:with-param name="collName" select="$collName"/>
     133      </xsl:call-template>
     134     
     135      <xsl:call-template name="documentArrows">
     136        <xsl:with-param name="collName" select="$collName"/>
     137      </xsl:call-template>         
     138      <xsl:call-template name="documentContent">
     139        <xsl:with-param name="collName" select="$collName"/>
     140      </xsl:call-template>
     141      <xsl:call-template name="documentArrows">
     142        <xsl:with-param name="collName" select="$collName"/>
     143      </xsl:call-template>   
     144    </xsl:if>
     145    <xsl:if test="$bookswitch = 'on'">
     146      <xsl:call-template name="documentHeading">
     147        <xsl:with-param name="collName" select="$collName"/>
     148      </xsl:call-template>
     149      <div id="bookdiv"></div>
     150      <script type="text/javascript">
     151        <xsl:text disable-output-escaping="yes">
     152          var doc_url = document.URL;
     153          doc_url = doc_url.replace(/(&amp;|\?)book=[a-z]+/gi,'');
     154          doc_url += '&amp;book=flashxml';
     155
     156          var flash_plug_html = ""
     157          flash_plug_html += '&lt;OBJECT align="middle" classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" \n';
     158          flash_plug_html += '  codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" \n';
     159          flash_plug_html += '  height="100%" id="Book" swLiveConnect="true" \n';
     160          flash_plug_html += '  width="100%"&gt;\n';
     161          flash_plug_html += '    &lt;PARAM name="allowScriptAccess" value="always" /&gt;\n';
     162          flash_plug_html += '    &lt;PARAM name="movie" value="Book.swf';
     163          flash_plug_html += '?src_image=' + escape(img_cover);
     164          flash_plug_html += '&amp;doc_url=' + escape(doc_url)
     165          flash_plug_html += '" /&gt;\n';
     166          flash_plug_html += '    &lt;PARAM name="quality" value="high" /&gt;\n';
     167          flash_plug_html += '    &lt;PARAM name="bgcolor" value="#FFFFFF" /&gt;\n';
     168          flash_plug_html += '    &lt;EMBED align="middle" \n';
     169          flash_plug_html += '      allowScriptAccess="always" swLiveConnect="true" \n';
     170          flash_plug_html += '      bgcolor="#FFFFFF" height="100%" name="Book" \n';
     171          flash_plug_html += '      pluginspage="http://www.macromedia.com/go/getflashplayer" \n';
     172          flash_plug_html += '      quality="high" \n';
     173          flash_plug_html += '      src="Book.swf';
     174          flash_plug_html += '?src_image=' + escape(img_cover);
     175          flash_plug_html += '&amp;doc_url=' + escape(doc_url);
     176          flash_plug_html += '"\n';
     177          flash_plug_html += '      type="application/x-shockwave-flash" width="100%" /&gt;\n';
     178          flash_plug_html += '&lt;/OBJECT&gt;\n';
     179          var flash_div = document.getElementById("bookdiv");
     180          flash_div.innerHTML = flash_plug_html;
     181        </xsl:text>
     182      </script>
     183    </xsl:if> 
     184      </xsl:otherwise>
    188185    </xsl:choose>
    189  </xsl:template>
     186  </xsl:template>
    190187
    191188  <xsl:template name="documentHeading">
     
    197194    <xsl:variable name="p.s" select="/page/pageRequest/paramList/param[@name='p.s']/@value"/>
    198195    <xsl:variable name="p.c"><xsl:choose><xsl:when test="/page/pageRequest/paramList/param[@name='p.c']"><xsl:value-of select="/page/pageRequest/paramList/param[@name='p.c']/@value"/></xsl:when><xsl:otherwise><xsl:value-of select="$collName"/></xsl:otherwise></xsl:choose></xsl:variable>
    199    <div id="documentheading">
    200       <a href="{$library_name}?a={$p.a}&amp;sa={$p.sa}&amp;s={$p.s}&amp;c={$p.c}&amp;rt=rd"><xsl:call-template name="openbookimg"><xsl:with-param name="title"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'close_book')"/></xsl:with-param>
    201       </xsl:call-template></a>
    202          <xsl:choose><xsl:when test="@docType='simple'"><xsl:value-of select="metadataList/metadata[@name='Title']" disable-output-escaping="yes"/></xsl:when><xsl:otherwise><xsl:value-of select="documentNode/metadataList/metadata[@name='Title']" disable-output-escaping="yes"/></xsl:otherwise></xsl:choose>
    203   </div>
    204  
    205  <div id="docheadwrapper">
    206   <div id="documentinfo">
     196    <div id="documentheading">
     197      <a href="{$library_name}?a={$p.a}&amp;sa={$p.sa}&amp;s={$p.s}&amp;c={$p.c}&amp;rt=rd"><xsl:call-template name="openbookimg"><xsl:with-param name="title"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'close_book')"/></xsl:with-param>
     198    </xsl:call-template></a>
     199      <xsl:choose><xsl:when test="@docType='simple'"><xsl:value-of select="metadataList/metadata[@name='Title']" disable-output-escaping="yes"/></xsl:when><xsl:otherwise><xsl:value-of select="documentNode/metadataList/metadata[@name='Title']" disable-output-escaping="yes"/></xsl:otherwise></xsl:choose>
     200    </div>
    207201   
    208   <xsl:choose>
    209     <xsl:when test="$bookswitch = 'on'">
    210         <xsl:if test="string($doCoverImage) != 'false' and (@docType='paged' or @docType='hierarchy')">
    211          <div id="headingimage">
    212           <xsl:call-template name="coverImage"/>
    213          </div>
    214         </xsl:if>
    215     </xsl:when>
    216     <xsl:otherwise>
    217         <xsl:if test="string($doCoverImage) != 'false' and (@docType='paged' or @docType='hierarchy')">
    218           <div id="headingimage">
    219              <xsl:call-template name="coverImage"/>
    220           </div>
    221         </xsl:if>
    222      
    223         <ul id="docbuttons" >
    224          <xsl:call-template name="documentButtons">
    225        <xsl:with-param name="collName" select="$collName"/>
    226          </xsl:call-template>
    227        </ul>
    228      </xsl:otherwise>
    229   </xsl:choose>     
    230   </div>
    231     <!--<div><xsl:call-template name="enrichServices">
    232        <xsl:with-param name="collName" select="$collName"/>
    233       </xsl:call-template></div>-->
    234    <xsl:if test="$bookswitch = 'off'">
    235     <xsl:if test="string($doTOC) != 'false'">
    236        <div id="toc">
    237      <xsl:call-template name="TOC">
    238        <xsl:with-param name="collName" select="$collName"/>
    239      </xsl:call-template>
     202    <div id="docheadwrapper">
     203      <div id="documentinfo">
     204   
     205    <xsl:choose>
     206      <xsl:when test="$bookswitch = 'on'">
     207        <xsl:if test="string($doCoverImage) != 'false' and (@docType='paged' or @docType='hierarchy')">
     208          <div id="headingimage">
     209        <xsl:call-template name="coverImage"/>
     210          </div>
     211        </xsl:if>
     212      </xsl:when>
     213      <xsl:otherwise>
     214        <xsl:if test="string($doCoverImage) != 'false' and (@docType='paged' or @docType='hierarchy')">
     215          <div id="headingimage">
     216        <xsl:call-template name="coverImage"/>
     217          </div>
     218        </xsl:if>
     219       
     220        <ul id="docbuttons" >
     221          <xsl:call-template name="documentButtons">
     222        <xsl:with-param name="collName" select="$collName"/>
     223          </xsl:call-template>
     224        </ul>
     225      </xsl:otherwise>
     226    </xsl:choose>     
    240227      </div>
    241     </xsl:if>
    242   </xsl:if> 
    243  </div>
    244  </xsl:template>
     228      <!--<div><xsl:call-template name="enrichServices">
     229      <xsl:with-param name="collName" select="$collName"/>
     230    </xsl:call-template></div>-->
     231      <xsl:if test="$bookswitch = 'off'">
     232    <xsl:if test="string($doTOC) != 'false'">
     233      <div id="toc">
     234        <xsl:call-template name="TOC">
     235          <xsl:with-param name="collName" select="$collName"/>
     236        </xsl:call-template>
     237      </div>
     238    </xsl:if>
     239      </xsl:if> 
     240    </div>
     241  </xsl:template>
    245242
    246243  <xsl:template name="coverImage">
    247   <xsl:choose>
    248             <xsl:when test="$bookswitch = 'on'">
    249                 <script type="text/javascript">
    250                     <xsl:text disable-output-escaping="yes">var img_cover = '</xsl:text><xsl:value-of select="/page/pageResponse/collection/metadataList/metadata[@name='httpPath']"/>/index/assoc/<xsl:value-of select="metadataList/metadata[@name='archivedir']"/>/cover.jpg<xsl:text disable-output-escaping="yes">';</xsl:text>
    251                 </script>
    252             </xsl:when>
    253             <xsl:otherwise>
    254                     <img><xsl:attribute name='src'><xsl:value-of select="/page/pageResponse/collection/metadataList/metadata[@name='httpPath']"/>/index/assoc/<xsl:value-of select="metadataList/metadata[@name='archivedir']"/>/cover.jpg</xsl:attribute></img>
    255             </xsl:otherwise>
    256         </xsl:choose>
     244    <xsl:choose>
     245      <xsl:when test="$bookswitch = 'on'">
     246    <script type="text/javascript">
     247      <xsl:text disable-output-escaping="yes">var img_cover = '</xsl:text><xsl:value-of select="/page/pageResponse/collection/metadataList/metadata[@name='httpPath']"/>/index/assoc/<xsl:value-of select="metadataList/metadata[@name='archivedir']"/>/cover.jpg<xsl:text disable-output-escaping="yes">';</xsl:text>
     248    </script>
     249      </xsl:when>
     250      <xsl:otherwise>
     251    <img><xsl:attribute name='src'><xsl:value-of select="/page/pageResponse/collection/metadataList/metadata[@name='httpPath']"/>/index/assoc/<xsl:value-of select="metadataList/metadata[@name='archivedir']"/>/cover.jpg</xsl:attribute></img>
     252      </xsl:otherwise>
     253    </xsl:choose>
    257254  </xsl:template>
    258255
     
    264261    <xsl:variable name="ed" select="/page/pageRequest/paramList/param[@name='ed']/@value"/>
    265262   
    266    
    267       <!-- expand document -->
    268    <xsl:if test="@docType = 'hierarchy' or @docType = 'paged'">
    269      <li>
     263    
     264    <!-- expand document -->
     265    <xsl:if test="@docType = 'hierarchy' or @docType = 'paged'">
     266      <li>
    270267        <xsl:choose><xsl:when test="string($ed)='1'">
    271           <a href="{$library_name}?a=d&amp;d={$docID}&amp;c={$collName}&amp;sib={$sib}&amp;ed=0"><xsl:attribute name="title"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'doc.contract_doc_tip')"/></xsl:attribute>
    272           <xsl:value-of disable-output-escaping='yes' select="util:getInterfaceText($interface_name, /page/@lang, 'doc.contract_doc_b')"/>
    273           </a>
    274         </xsl:when>
    275         <xsl:otherwise>
    276       <a href="{$library_name}?a=d&amp;d={$docID}&amp;c={$collName}&amp;sib={$sib}&amp;ed=1"><xsl:attribute name="title"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'doc.expand_doc_tip')"/></xsl:attribute>
    277          <xsl:value-of disable-output-escaping='yes' select="util:getInterfaceText($interface_name, /page/@lang, 'doc.expand_doc_b')"/>
    278       </a>
    279         </xsl:otherwise>
    280       </xsl:choose>
    281         </li>
    282       </xsl:if>
    283      
    284       <!-- expand contents -->
    285       <xsl:if test="@docType = 'hierarchy' and string(/page/pageResponse/format/gsf:option[@name='documentTOC']/@value) != 'false'">
     268        <a href="{$library_name}?a=d&amp;d={$docID}&amp;c={$collName}&amp;sib={$sib}&amp;ed=0"><xsl:attribute name="title"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'doc.contract_doc_tip')"/></xsl:attribute>
     269          <xsl:value-of disable-output-escaping='yes' select="util:getInterfaceText($interface_name, /page/@lang, 'doc.contract_doc_b')"/>
     270        </a>
     271      </xsl:when>
     272      <xsl:otherwise>
     273        <a href="{$library_name}?a=d&amp;d={$docID}&amp;c={$collName}&amp;sib={$sib}&amp;ed=1"><xsl:attribute name="title"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'doc.expand_doc_tip')"/></xsl:attribute>
     274          <xsl:value-of disable-output-escaping='yes' select="util:getInterfaceText($interface_name, /page/@lang, 'doc.expand_doc_b')"/>
     275        </a>
     276      </xsl:otherwise>
     277    </xsl:choose>
     278      </li>
     279    </xsl:if>
     280   
     281    <!-- expand contents -->
     282    <xsl:if test="@docType = 'hierarchy' and string(/page/pageResponse/format/gsf:option[@name='documentTOC']/@value) != 'false'">
    286283      <li>
    287           <xsl:choose><xsl:when test="string($ec)='1'">
    288           <a href="{$library_name}?a=d&amp;d={$docID}&amp;c={$collName}&amp;sib={$sib}&amp;ec=0"><xsl:attribute name="title"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'doc.contract_contents_tip')"/></xsl:attribute>
    289         <xsl:value-of disable-output-escaping='yes' select="util:getInterfaceText($interface_name, /page/@lang, 'doc.contract_contents_b')"/></a>
    290         </xsl:when>
    291         <xsl:otherwise>
    292           <a  href="{$library_name}?a=d&amp;d={$docID}&amp;c={$collName}&amp;sib={$sib}&amp;ec=1"><xsl:attribute name="title"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'doc.expand_contents_tip')"/></xsl:attribute>
    293         <xsl:value-of disable-output-escaping='yes' select="util:getInterfaceText($interface_name, /page/@lang, 'doc.expand_contents_b')"/>
    294           </a>
    295         </xsl:otherwise>
    296       </xsl:choose>
    297     </li>
    298       </xsl:if>
    299 
    300       <!-- detach page -->
    301       <xsl:variable name="paramList" select="/page/pageRequest/paramList"/>
    302        <li>
    303       <a target="_blank"><xsl:attribute name="href"><xsl:value-of select="$library_name"/>?a=d&amp;d=<xsl:value-of select="$docID"/>&amp;c=<xsl:value-of select="$collName"/>&amp;sib=<xsl:value-of select="$sib"/>&amp;dt=<xsl:value-of select="$paramList/param[@name='dt']/@value"/>&amp;ec=<xsl:value-of select="$paramList/param[@name='ec']/@value"/>&amp;et=<xsl:value-of select="$paramList/param[@name='et']/@value"/>&amp;p.a=<xsl:value-of select="$paramList/param[@name='p.a']/@value"/>&amp;p.s=<xsl:value-of select="$paramList/param[@name='p.s']/@value"/>&amp;p.sa=<xsl:value-of select="$paramList/param[@name='p.sa']/@value"/></xsl:attribute><xsl:attribute name="title"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'doc.detach_page_tip')"/></xsl:attribute>
    304         <xsl:value-of disable-output-escaping='yes' select="util:getInterfaceText($interface_name, /page/@lang, 'doc.detach_page_b')"/>
    305       </a></li>
    306       </xsl:template>
     284    <xsl:choose><xsl:when test="string($ec)='1'">
     285        <a href="{$library_name}?a=d&amp;d={$docID}&amp;c={$collName}&amp;sib={$sib}&amp;ec=0"><xsl:attribute name="title"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'doc.contract_contents_tip')"/></xsl:attribute>
     286          <xsl:value-of disable-output-escaping='yes' select="util:getInterfaceText($interface_name, /page/@lang, 'doc.contract_contents_b')"/></a>
     287      </xsl:when>
     288      <xsl:otherwise>
     289        <a  href="{$library_name}?a=d&amp;d={$docID}&amp;c={$collName}&amp;sib={$sib}&amp;ec=1"><xsl:attribute name="title"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'doc.expand_contents_tip')"/></xsl:attribute>
     290          <xsl:value-of disable-output-escaping='yes' select="util:getInterfaceText($interface_name, /page/@lang, 'doc.expand_contents_b')"/>
     291        </a>
     292      </xsl:otherwise>
     293    </xsl:choose>
     294      </li>
     295    </xsl:if>
     296
     297    <!-- detach page -->
     298    <xsl:variable name="paramList" select="/page/pageRequest/paramList"/>
     299    <li>
     300      <a target="_blank"><xsl:attribute name="href"><xsl:value-of select="$library_name"/>?a=d&amp;d=<xsl:value-of select="$docID"/>&amp;c=<xsl:value-of select="$collName"/>&amp;sib=<xsl:value-of select="$sib"/>&amp;dt=<xsl:value-of select="$paramList/param[@name='dt']/@value"/>&amp;ec=<xsl:value-of select="$paramList/param[@name='ec']/@value"/>&amp;et=<xsl:value-of select="$paramList/param[@name='et']/@value"/>&amp;p.a=<xsl:value-of select="$paramList/param[@name='p.a']/@value"/>&amp;p.s=<xsl:value-of select="$paramList/param[@name='p.s']/@value"/>&amp;p.sa=<xsl:value-of select="$paramList/param[@name='p.sa']/@value"/></xsl:attribute><xsl:attribute name="title"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'doc.detach_page_tip')"/></xsl:attribute>
     301    <xsl:value-of disable-output-escaping='yes' select="util:getInterfaceText($interface_name, /page/@lang, 'doc.detach_page_b')"/>
     302      </a></li>
     303  </xsl:template>
    307304
    308305  <xsl:template name="TOC">
     
    321318    </xsl:choose>
    322319  </xsl:template>
    323    
     320 
    324321  <xsl:template name="hierarchicalContents">
    325322    <xsl:param name="collName"/>
     
    335332      <ul id="tocnodes">
    336333    <li>
    337         <xsl:choose><xsl:when test="string($oc)='0'">
    338         <a href="{$library_name}?a=d&amp;c={$collName}&amp;d={$d}&amp;sib={$sib}&amp;oc=1&amp;p.s={$p.s}&amp;p.sa={$p.sa}&amp;p.a={$p.a}&amp;p.c={$p.c}"><xsl:call-template name="closedfolderimg"><xsl:with-param name="title"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'doc.open_toc')"/></xsl:with-param></xsl:call-template></a>
    339           </xsl:when>
    340           <xsl:otherwise><a href="{$library_name}?a=d&amp;c={$collName}&amp;d={$d}&amp;sib={$sib}&amp;oc=0&amp;p.s={$p.s}&amp;p.sa={$p.sa}&amp;p.a={$p.a}&amp;p.c={$p.c}"><xsl:call-template name="openfolderimg"><xsl:with-param name="title"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'doc.close_toc')"/></xsl:with-param></xsl:call-template></a></xsl:otherwise></xsl:choose><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'doc.table_of_contents')"/>
    341     <xsl:if test="string($oc)!='0'">
    342            <ul class="tocnode">
    343         <xsl:for-each select="documentNode/documentNode[@nodeID]">
    344           <xsl:apply-templates select='.'><xsl:with-param name="collName" select="$collName"/><xsl:with-param name="ec" select="$ec"/><xsl:with-param name="p.a" select="$p.a"/><xsl:with-param name="p.s" select="$p.s"/><xsl:with-param name="p.sa" select="$p.sa"/><xsl:with-param name="p.c" select="$p.c"/></xsl:apply-templates>
    345         </xsl:for-each>
     334      <xsl:choose><xsl:when test="string($oc)='0'">
     335          <a href="{$library_name}?a=d&amp;c={$collName}&amp;d={$d}&amp;sib={$sib}&amp;oc=1&amp;p.s={$p.s}&amp;p.sa={$p.sa}&amp;p.a={$p.a}&amp;p.c={$p.c}"><xsl:call-template name="closedfolderimg"><xsl:with-param name="title"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'doc.open_toc')"/></xsl:with-param></xsl:call-template></a>
     336        </xsl:when>
     337        <xsl:otherwise><a href="{$library_name}?a=d&amp;c={$collName}&amp;d={$d}&amp;sib={$sib}&amp;oc=0&amp;p.s={$p.s}&amp;p.sa={$p.sa}&amp;p.a={$p.a}&amp;p.c={$p.c}"><xsl:call-template name="openfolderimg"><xsl:with-param name="title"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'doc.close_toc')"/></xsl:with-param></xsl:call-template></a></xsl:otherwise></xsl:choose><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'doc.table_of_contents')"/>
     338      <xsl:if test="string($oc)!='0'">
     339        <ul class="tocnode">
     340          <xsl:for-each select="documentNode/documentNode[@nodeID]">
     341        <xsl:apply-templates select='.'><xsl:with-param name="collName" select="$collName"/><xsl:with-param name="ec" select="$ec"/><xsl:with-param name="p.a" select="$p.a"/><xsl:with-param name="p.s" select="$p.s"/><xsl:with-param name="p.sa" select="$p.sa"/><xsl:with-param name="p.c" select="$p.c"/></xsl:apply-templates>
     342          </xsl:for-each>
    346343            </ul>
    347        </xsl:if>
     344      </xsl:if>
    348345        </li>
    349346      </ul>
     
    360357    <xsl:param name="p.c"/>
    361358    <!-- Display the appropriate image, depending on the node type -->
    362      <li>
    363     <a><xsl:attribute name="href"><xsl:value-of select='$library_name'/>?a=d&amp;c=<xsl:value-of select='$collName'/>&amp;d=<xsl:value-of select='@nodeID'/><xsl:if test="documentNode">.pr</xsl:if>&amp;sib=1<xsl:if test="string($ec) = '1'">&amp;ec=1</xsl:if>&amp;p.a=<xsl:value-of select="$p.a"/>&amp;p.sa=<xsl:value-of select="$p.sa"/>&amp;p.s=<xsl:value-of select="$p.s"/>&amp;p.c=<xsl:value-of select="$p.c"/></xsl:attribute>
    364       <xsl:apply-templates select="." mode="displayNodeIcon"/>
    365     </a>
     359    <li>
     360      <a><xsl:attribute name="href"><xsl:value-of select='$library_name'/>?a=d&amp;c=<xsl:value-of select='$collName'/>&amp;d=<xsl:value-of select='@nodeID'/><xsl:if test="documentNode">.pr</xsl:if>&amp;sib=1<xsl:if test="string($ec) = '1'">&amp;ec=1</xsl:if>&amp;p.a=<xsl:value-of select="$p.a"/>&amp;p.sa=<xsl:value-of select="$p.sa"/>&amp;p.s=<xsl:value-of select="$p.s"/>&amp;p.c=<xsl:value-of select="$p.c"/></xsl:attribute>
     361    <xsl:apply-templates select="." mode="displayNodeIcon"/>
     362      </a>
    366363     
    367364      <!-- Display associated title, bolded if the node has content -->
    368     <xsl:choose>
    369           <xsl:when test="nodeContent">
    370         <span class="bold"><xsl:value-of disable-output-escaping="yes" select="metadataList/metadata[@name='Title']"/></span>
    371       </xsl:when>
    372       <xsl:otherwise>
    373         <xsl:value-of disable-output-escaping="yes" select="metadataList/metadata[@name='Title']"/>
    374       </xsl:otherwise>
    375     </xsl:choose>
    376     <!-- Apply recursively to the children of this node -->
    377     <xsl:if test="documentNode[@nodeID]">
    378        <ul class="tocnode"> <xsl:apply-templates select="documentNode[@nodeID]">
    379           <xsl:with-param name="collName" select="$collName"/>
    380           <xsl:with-param name="ec" select="$ec"/>
    381           <xsl:with-param name="p.a" select="$p.a"/><xsl:with-param name="p.s" select="$p.s"/><xsl:with-param name="p.sa" select="$p.sa"/><xsl:with-param name="p.c" select="$p.c"/>
    382           <!--<xsl:with-param name="depth" select="$depth + 1"/>-->
    383         </xsl:apply-templates>
    384        </ul>
    385      </xsl:if>
     365      <xsl:choose>
     366    <xsl:when test="nodeContent">
     367      <span class="bold"><xsl:value-of disable-output-escaping="yes" select="metadataList/metadata[@name='Title']"/></span>
     368    </xsl:when>
     369    <xsl:otherwise>
     370      <xsl:value-of disable-output-escaping="yes" select="metadataList/metadata[@name='Title']"/>
     371    </xsl:otherwise>
     372      </xsl:choose>
     373      <!-- Apply recursively to the children of this node -->
     374      <xsl:if test="documentNode[@nodeID]">
     375    <ul class="tocnode"> <xsl:apply-templates select="documentNode[@nodeID]">
     376        <xsl:with-param name="collName" select="$collName"/>
     377        <xsl:with-param name="ec" select="$ec"/>
     378        <xsl:with-param name="p.a" select="$p.a"/><xsl:with-param name="p.s" select="$p.s"/><xsl:with-param name="p.sa" select="$p.sa"/><xsl:with-param name="p.c" select="$p.c"/>
     379        <!--<xsl:with-param name="depth" select="$depth + 1"/>-->
     380      </xsl:apply-templates>
     381    </ul>
     382      </xsl:if>
    386383    </li>
    387384  </xsl:template>
     
    389386  <!-- default content is to print the title and content of any documentNodes that have nodeContent -->
    390387  <xsl:template name="documentContent">
    391    <div class="documenttext">
    392     <xsl:choose>
    393       <xsl:when test="@docType='simple'"><xsl:apply-templates select="nodeContent"/></xsl:when>
    394       <xsl:otherwise>
    395     <xsl:apply-templates select="descendant-or-self::node()/documentNode" mode="content"/>
    396       </xsl:otherwise>
    397     </xsl:choose>
    398   </div>
     388    <div class="documenttext">
     389      <xsl:choose>
     390    <xsl:when test="@docType='simple'"><xsl:apply-templates select="nodeContent"/></xsl:when>
     391    <xsl:otherwise>
     392      <xsl:apply-templates select="descendant-or-self::node()/documentNode" mode="content"/>
     393    </xsl:otherwise>
     394      </xsl:choose>
     395    </div>
    399396  </xsl:template>
    400397 
     
    414411      <xsl:choose>
    415412    <xsl:when test="not(name())">
    416         <xsl:value-of select="." disable-output-escaping="yes"/>
     413      <xsl:value-of select="." disable-output-escaping="yes"/>
    417414    </xsl:when>
    418415    <xsl:otherwise><xsl:apply-templates select="."/></xsl:otherwise>
     
    422419 
    423420  <xsl:template name="xmldocumentContentPeeling">
    424         <xsl:choose>
    425             <xsl:when test="@docType='simple'">
    426                 <xsl:apply-templates select="nodeContent"/>
    427             </xsl:when>
    428             <xsl:otherwise>
    429                 <xsl:call-template name="xmlpeelingContents" />
    430             </xsl:otherwise>
    431         </xsl:choose>
    432     </xsl:template>
    433    
     421    <xsl:choose>
     422      <xsl:when test="@docType='simple'">
     423    <xsl:apply-templates select="nodeContent"/>
     424      </xsl:when>
     425      <xsl:otherwise>
     426    <xsl:call-template name="xmlpeelingContents" />
     427      </xsl:otherwise>
     428    </xsl:choose>
     429  </xsl:template>
     430 
    434431  <xsl:template name="xmlpeelingContents">
    435         <xsl:if test="documentNode">
    436             <xsl:apply-templates select="documentNode" mode="xmlpeeling" />
    437         </xsl:if>
    438     </xsl:template>
    439 
    440     <xsl:template match="documentNode" mode="xmlpeeling">
    441         <!-- get title -->
    442         <xsl:choose>
    443             <xsl:when test="nodeContent">
    444                 <xsl:text disable-output-escaping="yes">
    445                     &lt;Section&gt;
    446                     &lt;Description&gt;
    447                     &lt;Metadata name="Title"&gt;
    448                 </xsl:text>
    449                 <xsl:value-of select="normalize-space(metadataList/metadata[@name='Title'])"/>
    450                 <xsl:text disable-output-escaping="yes">
    451                     &lt;/Metadata&gt;
    452                     &lt;/Description&gt;
    453                 </xsl:text>
    454                 <xsl:value-of select="normalize-space(nodeContent)" disable-output-escaping="yes"/>
    455                 <xsl:text disable-output-escaping="yes">&lt;/Sec&gt;</xsl:text>
    456             </xsl:when>
    457         </xsl:choose>
    458 
    459         <!-- recurse to the children -->
    460         <xsl:if test="documentNode">
    461             <xsl:apply-templates select="documentNode" mode="xmlpeeling" />
    462         </xsl:if>
    463 
    464         <!-- end the section -->
    465         <xsl:text disable-output-escaping="yes">
    466             &lt;/Section&gt;
    467         </xsl:text>
    468     </xsl:template>
     432    <xsl:if test="documentNode">
     433      <xsl:apply-templates select="documentNode" mode="xmlpeeling" />
     434    </xsl:if>
     435  </xsl:template>
     436
     437  <xsl:template match="documentNode" mode="xmlpeeling">
     438    <!-- get title -->
     439    <xsl:choose>
     440      <xsl:when test="nodeContent">
     441    <xsl:text disable-output-escaping="yes">
     442      &lt;Section&gt;
     443      &lt;Description&gt;
     444      &lt;Metadata name="Title"&gt;
     445    </xsl:text>
     446    <xsl:value-of select="normalize-space(metadataList/metadata[@name='Title'])"/>
     447    <xsl:text disable-output-escaping="yes">
     448      &lt;/Metadata&gt;
     449      &lt;/Description&gt;
     450    </xsl:text>
     451    <xsl:value-of select="normalize-space(nodeContent)" disable-output-escaping="yes"/>
     452    <xsl:text disable-output-escaping="yes">&lt;/Sec&gt;</xsl:text>
     453      </xsl:when>
     454    </xsl:choose>
     455
     456    <!-- recurse to the children -->
     457    <xsl:if test="documentNode">
     458      <xsl:apply-templates select="documentNode" mode="xmlpeeling" />
     459    </xsl:if>
     460
     461    <!-- end the section -->
     462    <xsl:text disable-output-escaping="yes">
     463      &lt;/Section&gt;
     464    </xsl:text>
     465  </xsl:template>
    469466 
    470467  <!-- match any file nodes -->
     
    495492    <xsl:variable name="serviceargs">
    496493      <xsl:for-each select="param">&amp;s1.<xsl:value-of select="@name"/>=<xsl:value-of select="@value"/></xsl:for-each>
    497   </xsl:variable>
     494    </xsl:variable>
    498495    <a href="{$library_name}?{$actionargs}&amp;c={$collName}{$serviceargs}"><xsl:value-of disable-output-escaping="yes" select="."/></a>
    499496  </xsl:template>
     
    596593   
    597594    <div class="documentarrows">
    598     <xsl:if test="not(string($ed)='1')">
    599        <xsl:call-template name="documentArrow">
    600         <xsl:with-param name="collName" select="$collName"/>
    601        <xsl:with-param name="direction">back</xsl:with-param>
    602      </xsl:call-template>
    603     <xsl:call-template name="documentArrow">
    604       <xsl:with-param name="collName" select="$collName"/>
    605       <xsl:with-param name="direction">forward</xsl:with-param>
    606     </xsl:call-template>
    607     </xsl:if>
     595      <xsl:if test="not(string($ed)='1')">
     596    <xsl:call-template name="documentArrow">
     597      <xsl:with-param name="collName" select="$collName"/>
     598      <xsl:with-param name="direction">back</xsl:with-param>
     599    </xsl:call-template>
     600    <xsl:call-template name="documentArrow">
     601      <xsl:with-param name="collName" select="$collName"/>
     602      <xsl:with-param name="direction">forward</xsl:with-param>
     603    </xsl:call-template>
     604      </xsl:if>
    608605    </div>
    609606   
     
    615612    <xsl:variable name="request-params" select="/page/pageRequest/paramList"/>
    616613    <xsl:if test='$request-params/param[@name="dt"]/@value != "simple"'> 
    617     <a><xsl:attribute name="href"><xsl:value-of select="$library_name"/>?a=d&amp;c=<xsl:value-of select="$collName"/>&amp;d=<xsl:value-of select="@selectedNode"/><xsl:choose><xsl:when test="$direction='back'">.pp</xsl:when><xsl:otherwise>.np</xsl:otherwise></xsl:choose>&amp;sib=1&amp;p.s=<xsl:value-of select='$request-params/param[@name="p.s"]/@value'/>&amp;p.sa=<xsl:value-of select='$request-params/param[@name="p.sa"]/@value'/>&amp;p.a=<xsl:value-of select='$request-params/param[@name="p.a"]/@value'/></xsl:attribute><xsl:choose><xsl:when test="$direction='back'"><img class="lessarrow" src="interfaces/default/images/less.gif" /></xsl:when><xsl:otherwise><img class="morearrow" src="interfaces/default/images/more.gif"  /></xsl:otherwise></xsl:choose></a>
     614      <a><xsl:attribute name="href"><xsl:value-of select="$library_name"/>?a=d&amp;c=<xsl:value-of select="$collName"/>&amp;d=<xsl:value-of select="@selectedNode"/><xsl:choose><xsl:when test="$direction='back'">.pp</xsl:when><xsl:otherwise>.np</xsl:otherwise></xsl:choose>&amp;sib=1&amp;p.s=<xsl:value-of select='$request-params/param[@name="p.s"]/@value'/>&amp;p.sa=<xsl:value-of select='$request-params/param[@name="p.sa"]/@value'/>&amp;p.a=<xsl:value-of select='$request-params/param[@name="p.a"]/@value'/></xsl:attribute><xsl:choose><xsl:when test="$direction='back'"><img class="lessarrow" src="interfaces/default/images/less.gif" /></xsl:when><xsl:otherwise><img class="morearrow" src="interfaces/default/images/more.gif"  /></xsl:otherwise></xsl:choose></a>
    618615    </xsl:if>
    619616  </xsl:template>
    620617
    621618  <xsl:template name="externalPage">
    622      <xsl:param name="external"/>
    623      <xsl:variable name="go_forward_link"><a><xsl:attribute name="href"><xsl:value-of select="$external"/></xsl:attribute><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'external.go_forward')"/></a></xsl:variable>
     619    <xsl:param name="external"/>
     620    <xsl:variable name="go_forward_link"><a><xsl:attribute name="href"><xsl:value-of select="$external"/></xsl:attribute><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'external.go_forward')"/></a></xsl:variable>
    624621    <h2><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'external.title')"/></h2>
    625622    <p><xsl:value-of select="util:getInterfaceTextWithDOM($interface_name, /page/@lang, 'external.text', $go_forward_link)" disable-output-escaping="yes"/>
  • greenstone3/trunk/web/interfaces/default/transform/gli4gs3.xsl

    r17017 r18316  
    1212  <xsl:output method="html"/> 
    1313 
    14     <!-- the main page layout template is here -->
     14  <!-- the main page layout template is here -->
    1515  <xsl:template match="page">
    16         <html>
    17     <head>
    18       <title>
    19     <!-- put a space in the title in case the actual value is missing - mozilla will not display a page with no title-->
    20     <xsl:call-template name="pageTitle"/><xsl:text> </xsl:text>
    21       </title>
    22       <xsl:call-template name="globalStyle"/>
    23       <xsl:call-template name="pageStyle"/>
    24     </head>
    25           <body>
    26            <div id="globalwrapper">
    27           <xsl:call-template name="response" />
    28           <xsl:call-template name="greenstoneFooter"/>
    29        </div>
    30           </body>
    31         </html>
     16    <html>
     17      <head>
     18    <title>
     19      <!-- put a space in the title in case the actual value is missing - mozilla will not display a page with no title-->
     20      <xsl:call-template name="pageTitle"/><xsl:text> </xsl:text>
     21    </title>
     22    <xsl:call-template name="globalStyle"/>
     23    <xsl:call-template name="pageStyle"/>
     24      </head>
     25      <body>
     26    <div id="globalwrapper">
     27      <xsl:call-template name="response" />
     28      <xsl:call-template name="greenstoneFooter"/>
     29    </div>
     30      </body>
     31    </html>
    3232  </xsl:template>
    3333
     
    4141  <xsl:template match="pageResponse">
    4242    <xsl:variable name="collName"><xsl:value-of select="../pageRequest/paramList/param[@name='c']/@value"/></xsl:variable>
    43      <xsl:call-template name="standardPageBanner">
    44     <xsl:with-param name="collName" select="$collName"/>
    45       </xsl:call-template>
     43    <xsl:call-template name="standardPageBanner">
     44      <xsl:with-param name="collName" select="$collName"/>
     45    </xsl:call-template>
    4646   
    4747    <xsl:call-template name="navigationBar">
  • greenstone3/trunk/web/interfaces/default/transform/help.xsl

    r17017 r18316  
    77  exclude-result-prefixes="java util">
    88 
    9    <!-- style includes global params interface_name, library_name -->
     9  <!-- style includes global params interface_name, library_name -->
    1010  <xsl:include href="style.xsl"/>
    1111
    1212  <xsl:output method="html"/> 
    1313 
    14     <!-- the main page layout template is here -->
     14  <!-- the main page layout template is here -->
    1515  <xsl:template match="page">
    16         <html>
    17     <head>
    18       <title>
    19     <!-- put a space in the title in case the actual value is missing - mozilla will not display a page with no title-->
    20     <xsl:call-template name="pageTitle"/><xsl:text> </xsl:text>
    21       </title>
    22       <xsl:call-template name="globalStyle"/>
    23       <xsl:call-template name="pageStyle"/>
    24     </head>
    25           <body>
    26            <div id="globalwrapper">
    27           <xsl:call-template name="response" />
    28           <xsl:call-template name="greenstoneFooter"/>
    29        </div>
    30           </body>
    31         </html>
     16    <html>
     17      <head>
     18    <title>
     19      <!-- put a space in the title in case the actual value is missing - mozilla will not display a page with no title-->
     20      <xsl:call-template name="pageTitle"/><xsl:text> </xsl:text>
     21    </title>
     22    <xsl:call-template name="globalStyle"/>
     23    <xsl:call-template name="pageStyle"/>
     24      </head>
     25      <body>
     26    <div id="globalwrapper">
     27      <xsl:call-template name="response" />
     28      <xsl:call-template name="greenstoneFooter"/>
     29    </div>
     30      </body>
     31    </html>
    3232  </xsl:template>
    3333 
     
    5252    some help text goes here
    5353  </xsl:template>
    54  
     54  
    5555</xsl:stylesheet>
  • greenstone3/trunk/web/interfaces/default/transform/home.xsl

    r18304 r18316  
    1212  <xsl:output method="html"/> 
    1313 
    14     <!-- the main page layout template is here -->
     14  <!-- the main page layout template is here -->
    1515  <xsl:template match="page">
    16         <html>
    17     <head>
    18       <title>
    19     <!-- put a space in the title in case the actual value is missing - mozilla will not display a page with no title-->
    20     <xsl:call-template name="pageTitle"/><xsl:text> </xsl:text>
    21       </title>
    22       <xsl:call-template name="globalStyle"/>
    23       <xsl:call-template name="pageStyle"/>
    24     </head>
    25           <body>
    26            <div id="globalwrapper">
    27           <xsl:call-template name="response" />
    28           <xsl:call-template name="greenstoneFooter"/>
    29        </div>
    30           </body>
    31         </html>
     16    <html>
     17      <head>
     18    <title>
     19      <!-- put a space in the title in case the actual value is missing - mozilla will not display a page with no title-->
     20      <xsl:call-template name="pageTitle"/><xsl:text> </xsl:text>
     21    </title>
     22    <xsl:call-template name="globalStyle"/>
     23    <xsl:call-template name="pageStyle"/>
     24      </head>
     25      <body>
     26    <div id="globalwrapper">
     27      <xsl:call-template name="response" />
     28      <xsl:call-template name="greenstoneFooter"/>
     29    </div>
     30      </body>
     31    </html>
    3232  </xsl:template>
    3333
     
    4949  <xsl:template name="pageBanner">
    5050    <div id="banner">
    51         <p>
    52             <img src="interfaces/default/images/gsdlhead.gif"><xsl:attribute name="alt"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'gsdl')"/></xsl:attribute>
    53             </img>
    54     </p>
     51      <p>
     52    <img src="interfaces/default/images/gsdlhead.gif"><xsl:attribute name="alt"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'gsdl')"/></xsl:attribute>
     53    </img>
     54      </p>
    5555    </div>
    5656    <div id="content">
    57     <xsl:call-template name="dividerBar">
    58             <xsl:with-param name="text" select="util:getInterfaceText($interface_name, /page/@lang, 'home.select_a_collection')"/>
    59         </xsl:call-template>   
    60       </div>
     57      <xsl:call-template name="dividerBar">
     58    <xsl:with-param name="text" select="util:getInterfaceText($interface_name, /page/@lang, 'home.select_a_collection')"/>
     59      </xsl:call-template> 
     60    </div>
    6161  </xsl:template>
    6262
    6363  <xsl:template match="collectionList">
    64    <ul id="collectionlist">
    65     <xsl:for-each select="collection">
    66       <li>
    67      
    68            <xsl:choose>
    69               <xsl:when test="displayItem[@name='icon']">
     64    <ul id="collectionlist">
     65      <xsl:for-each select="collection">
     66    <li>
     67     
     68      <xsl:choose>
     69        <xsl:when test="displayItem[@name='icon']">
    7070              <a href="{$library_name}?a=p&amp;sa=about&amp;c={@name}">
    7171                <img>
    72                <xsl:attribute name="src">
    73                  <xsl:value-of select="metadataList/metadata[@name='httpPath']"/>/images/<xsl:value-of select="displayItem[@name='icon']"/>
    74                </xsl:attribute>
    75                <xsl:attribute name="alt">
    76                     <xsl:value-of select="displayItem[@name='name']"/>
    77                </xsl:attribute>
    78              </img>
    79                </a> 
    80           </xsl:when>
    81               <xsl:otherwise>
    82                <a class="noimage" href="{$library_name}?a=p&amp;sa=about&amp;c={@name}"> 
    83                  <xsl:value-of select="displayItem[@name='name']"/>
    84                </a>
    85               </xsl:otherwise>
    86            </xsl:choose>         
    87      
    88        </li>
    89     </xsl:for-each>
    90    </ul>
     72          <xsl:attribute name="src">
     73            <xsl:value-of select="metadataList/metadata[@name='httpPath']"/>/images/<xsl:value-of select="displayItem[@name='icon']"/>
     74          </xsl:attribute>
     75          <xsl:attribute name="alt">
     76            <xsl:value-of select="displayItem[@name='name']"/>
     77          </xsl:attribute>
     78        </img>
     79          </a> 
     80        </xsl:when>
     81        <xsl:otherwise>
     82          <a class="noimage" href="{$library_name}?a=p&amp;sa=about&amp;c={@name}"> 
     83        <xsl:value-of select="displayItem[@name='name']"/>
     84          </a>
     85        </xsl:otherwise>
     86      </xsl:choose>         
     87      
     88    </li>
     89      </xsl:for-each>
     90    </ul>
    9191  </xsl:template>
    9292 
     
    113113    <xsl:call-template name="dividerBar"/>
    114114    <ul id="servicelist">
    115     <xsl:for-each select="service[@type='query']">
    116       <li><a href="{$library_name}?a=q&amp;rt=d&amp;s={@name}"><xsl:value-of select="displayItem[@name='name']"/></a><xsl:value-of select="displayItem[@name='description']"/></li>
     115      <xsl:for-each select="service[@type='query']">
     116    <li><a href="{$library_name}?a=q&amp;rt=d&amp;s={@name}"><xsl:value-of select="displayItem[@name='name']"/></a><xsl:value-of select="displayItem[@name='description']"/></li>
    117117      </xsl:for-each>
    118118      <!--uncomment to display an authentication link-->
    119        <!--<xsl:for-each select="service[@type='authen']">
     119      <!--<xsl:for-each select="service[@type='authen']">
    120120      <li><a href="{$library_name}?a=g&amp;rt=r&amp;sa=authen&amp;s={@name}&amp;s1.aup=Login&amp;s1.un=&amp;s1.asn="><xsl:value-of select="displayItem[@name='name']"/></a><xsl:value-of select="displayItem[@name='description']"/></li>      </xsl:for-each>-->
    121121      <!--uncomment to display a library interface link-->
    122122      <!--<li><a href="{$library_name}?a=p&amp;sa=gli4gs3"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'home.librarian_interface')"/></a></li>-->
    123123    </ul>
    124     </xsl:template>
     124  </xsl:template>
    125125</xsl:stylesheet> 
    126126
  • greenstone3/trunk/web/interfaces/default/transform/nav.xsl

    r8660 r18316  
    77  exclude-result-prefixes="java util">
    88 
    9    <!-- style includes global params interface_name, library_name -->
     9  <!-- style includes global params interface_name, library_name -->
    1010  <xsl:include href="style.xsl"/>
    1111
     
    3434    <xsl:variable name="collName" select="/page/pageRequest/paramList/param[@name='c']/@value"/>
    3535    <div align="right">
    36     <xsl:call-template name="top-buttons">
    37       <xsl:with-param name="collName" select="$collName"/>
    38     </xsl:call-template>
    39       </div>
     36      <xsl:call-template name="top-buttons">
     37    <xsl:with-param name="collName" select="$collName"/>
     38      </xsl:call-template>
     39    </div>
    4040    <xsl:call-template name="navigationBar">
    4141      <xsl:with-param name="collName" select="$collName"/>
  • greenstone3/trunk/web/interfaces/default/transform/pref.xsl

    r17017 r18316  
    77  exclude-result-prefixes="java util">
    88 
    9    <!-- style includes global params interface_name, library_name -->
     9  <!-- style includes global params interface_name, library_name -->
    1010  <xsl:include href="style.xsl"/>
    1111
    1212  <xsl:output method="html"/> 
    1313 
    14     <!-- the main page layout template is here -->
     14  <!-- the main page layout template is here -->
    1515  <xsl:template match="page">
    16         <html>
    17     <head>
    18       <title>
    19     <!-- put a space in the title in case the actual value is missing - mozilla will not display a page with no title-->
    20     <xsl:call-template name="pageTitle"/><xsl:text> </xsl:text>
    21       </title>
    22       <xsl:call-template name="globalStyle"/>
    23       <xsl:call-template name="pageStyle"/>
    24     </head>
    25           <body>
    26            <div id="globalwrapper">
    27           <xsl:call-template name="response" />
    28           <xsl:call-template name="greenstoneFooter"/>
    29        </div>
    30           </body>
    31         </html>
     16    <html>
     17      <head>
     18    <title>
     19      <!-- put a space in the title in case the actual value is missing - mozilla will not display a page with no title-->
     20      <xsl:call-template name="pageTitle"/><xsl:text> </xsl:text>
     21    </title>
     22    <xsl:call-template name="globalStyle"/>
     23    <xsl:call-template name="pageStyle"/>
     24      </head>
     25      <body>
     26    <div id="globalwrapper">
     27      <xsl:call-template name="response" />
     28      <xsl:call-template name="greenstoneFooter"/>
     29    </div>
     30      </body>
     31    </html>
    3232  </xsl:template>
    3333 
     
    4343    <xsl:variable name="collName" select="/page/pageRequest/paramList/param[@name='c']/@value"/>
    4444   
    45    <xsl:variable name="tidyoption"><xsl:value-of select="/page/pageResponse/collection/metadataList/metadata[@name='tidyoption']"/></xsl:variable>
    46      
     45    <xsl:variable name="tidyoption"><xsl:value-of select="/page/pageResponse/collection/metadataList/metadata[@name='tidyoption']"/></xsl:variable>
     46   
    4747    <xsl:call-template name="standardPageBanner">
    4848      <xsl:with-param name="collName" select="$collName"/>
     
    5454    </xsl:call-template>     
    5555    <div id="qureyform">
    56     <form name="PrefForm" method="get" action="{$library_name}">
    57       <input type='hidden' name='a' value='p'/>
    58       <input type='hidden' name='sa' value='pref'/>
    59       <input type='hidden' name='c' value="{$collName}"/>
    60       <div class="formheading"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'pref.prespref')"/></div>
    61       <ul id="presprefs"><xsl:call-template name="pres-prefs"/></ul>
    62       <ul id="berrybasketprefs" ><xsl:call-template name="berrybasket-prefs"/></ul>
    63      
    64       <xsl:if test="$tidyoption='tidy'">
    65         <ul id="bookprefs"><xsl:call-template name="book-prefs"/></ul>
    66       </xsl:if>
    67      
    68       <div class="formheading"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'pref.searchpref')"/></div>
    69       <ul id="searchprefs"><xsl:call-template name="search-prefs"/></ul>
    70       <input type='submit'><xsl:attribute name="value"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'pref.set_prefs')"/></xsl:attribute></input>
    71        </form>
    72    </div>
     56      <form name="PrefForm" method="get" action="{$library_name}">
     57    <input type='hidden' name='a' value='p'/>
     58    <input type='hidden' name='sa' value='pref'/>
     59    <input type='hidden' name='c' value="{$collName}"/>
     60    <div class="formheading"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'pref.prespref')"/></div>
     61    <ul id="presprefs"><xsl:call-template name="pres-prefs"/></ul>
     62    <ul id="berrybasketprefs" ><xsl:call-template name="berrybasket-prefs"/></ul>
     63   
     64    <xsl:if test="$tidyoption='tidy'">
     65      <ul id="bookprefs"><xsl:call-template name="book-prefs"/></ul>
     66    </xsl:if>
     67   
     68    <div class="formheading"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'pref.searchpref')"/></div>
     69    <ul id="searchprefs"><xsl:call-template name="search-prefs"/></ul>
     70    <input type='submit'><xsl:attribute name="value"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'pref.set_prefs')"/></xsl:attribute></input>
     71      </form>
     72    </div>
    7373  </xsl:template>
    7474 
    7575  <xsl:template name="pres-prefs">
    76      <li><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'pref.interfacelang')"/> <xsl:call-template name="lang-list"/></li>
    77       <li><span class="rightspace"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'pref.encoding')"/></span>x</li>
    78     </xsl:template>
    79  
     76    <li><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'pref.interfacelang')"/> <xsl:call-template name="lang-list"/></li>
     77    <li><span class="rightspace"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'pref.encoding')"/></span>x</li>
     78  </xsl:template>
     79  
    8080  <xsl:template name="lang-list">
    8181    <xsl:variable name="current" select="/page/@lang"/>
     
    9090    <xsl:variable name="hits"><xsl:choose><xsl:when test="/page/pageRequest/paramList/param[@name='hitsPerPage']"><xsl:value-of select="/page/pageRequest/paramList/param[@name='hitsPerPage']/@value"/></xsl:when><xsl:otherwise>20</xsl:otherwise></xsl:choose></xsl:variable>
    9191    <li><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'pref.hitsperpage')"/>
    92           <select name="hitsPerPage">
    93         <option value="20"><xsl:if test="$hits=20"><xsl:attribute name="selected"></xsl:attribute></xsl:if>20</option>
    94         <option value="50"><xsl:if test="$hits=50"><xsl:attribute name="selected"></xsl:attribute></xsl:if>50</option>
    95         <option value="100"><xsl:if test="$hits=100"><xsl:attribute name="selected"></xsl:attribute></xsl:if>100</option>
    96         <option value="-1"><xsl:if test="$hits=-1"><xsl:attribute name="selected"></xsl:attribute></xsl:if><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'pref.all')"/></option>
    97       </select>
     92      <select name="hitsPerPage">
     93    <option value="20"><xsl:if test="$hits=20"><xsl:attribute name="selected"></xsl:attribute></xsl:if>20</option>
     94    <option value="50"><xsl:if test="$hits=50"><xsl:attribute name="selected"></xsl:attribute></xsl:if>50</option>
     95    <option value="100"><xsl:if test="$hits=100"><xsl:attribute name="selected"></xsl:attribute></xsl:if>100</option>
     96    <option value="-1"><xsl:if test="$hits=-1"><xsl:attribute name="selected"></xsl:attribute></xsl:if><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'pref.all')"/></option>
     97      </select>
    9898    </li>
    9999  </xsl:template>
    100100
    101  <xsl:template name="berrybasket-prefs">
    102       <xsl:variable name="berrybasket"><xsl:choose><xsl:when test="/page/pageRequest/paramList/param[@name='berrybasket']"><xsl:value-of select="/page/pageRequest/paramList/param[@name='berrybasket']/@value"/></xsl:when><xsl:otherwise>off</xsl:otherwise></xsl:choose></xsl:variable>
    103      
     101  <xsl:template name="berrybasket-prefs">
     102    <xsl:variable name="berrybasket"><xsl:choose><xsl:when test="/page/pageRequest/paramList/param[@name='berrybasket']"><xsl:value-of select="/page/pageRequest/paramList/param[@name='berrybasket']/@value"/></xsl:when><xsl:otherwise>off</xsl:otherwise></xsl:choose></xsl:variable>
     103   
    104104    <li><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'pref.berrybasket')"/> <select name="berrybasket">
    105105        <option value="on"><xsl:if test="$berrybasket='on'"><xsl:attribute name="selected"></xsl:attribute></xsl:if><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'pref.berrybasket.on')"/></option>
     
    109109  </xsl:template>
    110110
    111 <xsl:template name="book-prefs">
    112       <xsl:variable name="book"><xsl:choose><xsl:when test="/page/pageRequest/paramList/param[@name='book']"><xsl:value-of select="/page/pageRequest/paramList/param[@name='book']/@value"/></xsl:when><xsl:otherwise>off</xsl:otherwise></xsl:choose></xsl:variable>
    113      
     111  <xsl:template name="book-prefs">
     112    <xsl:variable name="book"><xsl:choose><xsl:when test="/page/pageRequest/paramList/param[@name='book']"><xsl:value-of select="/page/pageRequest/paramList/param[@name='book']/@value"/></xsl:when><xsl:otherwise>off</xsl:otherwise></xsl:choose></xsl:variable>
     113   
    114114    <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'pref.book')"/> <select name="book">
    115         <option value="on"><xsl:if test="$book='on'"><xsl:attribute name="selected"></xsl:attribute></xsl:if><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'pref.berrybasket.on')"/></option>
    116     <option value="off"><xsl:if test="$book='off'"><xsl:attribute name="selected"></xsl:attribute></xsl:if><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'pref.berrybasket.off')"/></option>
    117       </select>
     115      <option value="on"><xsl:if test="$book='on'"><xsl:attribute name="selected"></xsl:attribute></xsl:if><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'pref.berrybasket.on')"/></option>
     116      <option value="off"><xsl:if test="$book='off'"><xsl:attribute name="selected"></xsl:attribute></xsl:if><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'pref.berrybasket.off')"/></option>
     117    </select>
    118118   
    119119  </xsl:template>
  • greenstone3/trunk/web/interfaces/default/transform/process.xsl

    r17017 r18316  
    1313  <xsl:output method="html"/> 
    1414 
    15     <!-- the main page layout template is here -->
     15  <!-- the main page layout template is here -->
    1616  <xsl:template match="page">
    17         <html>
    18     <head>
    19       <title>
    20     <!-- put a space in the title in case the actual value is missing - mozilla will not display a page with no title-->
    21     <xsl:call-template name="pageTitle"/><xsl:text> </xsl:text>
    22       </title>
    23       <xsl:call-template name="globalStyle"/>
    24       <xsl:call-template name="pageStyle"/>
    25     </head>
    26           <body>
    27            <div id="globalwrapper">
    28           <xsl:call-template name="response" />
    29           <xsl:call-template name="greenstoneFooter"/>
    30        </div>
    31           </body>
    32         </html>
     17    <html>
     18      <head>
     19    <title>
     20      <!-- put a space in the title in case the actual value is missing - mozilla will not display a page with no title-->
     21      <xsl:call-template name="pageTitle"/><xsl:text> </xsl:text>
     22    </title>
     23    <xsl:call-template name="globalStyle"/>
     24    <xsl:call-template name="pageStyle"/>
     25      </head>
     26      <body>
     27    <div id="globalwrapper">
     28      <xsl:call-template name="response" />
     29      <xsl:call-template name="greenstoneFooter"/>
     30    </div>
     31      </body>
     32    </html>
    3333  </xsl:template>
    3434
  • greenstone3/trunk/web/interfaces/default/transform/query.xsl

    r17017 r18316  
    1515  <xsl:output method="html"/>
    1616 
    17     <!-- the main page layout template is here -->
     17  <!-- the main page layout template is here -->
    1818  <xsl:template match="page">
    19         <html>
    20     <head>
    21       <title>
    22     <!-- put a space in the title in case the actual value is missing - mozilla will not display a page with no title-->
    23     <xsl:call-template name="pageTitle"/><xsl:text> </xsl:text>
    24       </title>
    25       <xsl:call-template name="globalStyle"/>
    26       <xsl:call-template name="pageStyle"/>
    27     </head>
    28           <body>
    29            <div id="globalwrapper">
    30           <xsl:call-template name="response" />
    31           <xsl:call-template name="greenstoneFooter"/>
    32        </div>
    33           </body>
    34         </html>
     19    <html>
     20      <head>
     21    <title>
     22      <!-- put a space in the title in case the actual value is missing - mozilla will not display a page with no title-->
     23      <xsl:call-template name="pageTitle"/><xsl:text> </xsl:text>
     24    </title>
     25    <xsl:call-template name="globalStyle"/>
     26    <xsl:call-template name="pageStyle"/>
     27      </head>
     28      <body>
     29    <div id="globalwrapper">
     30      <xsl:call-template name="response" />
     31      <xsl:call-template name="greenstoneFooter"/>
     32    </div>
     33      </body>
     34    </html>
    3535  </xsl:template>
    3636
    37    <xsl:variable name="berrybasketswitch"><xsl:value-of select="/page/pageRequest/paramList/param[@name='berrybasket']/@value"/></xsl:variable>
     37  <xsl:variable name="berrybasketswitch"><xsl:value-of select="/page/pageRequest/paramList/param[@name='berrybasket']/@value"/></xsl:variable>
    3838
    3939  <xsl:template name="pageTitle">
     
    4343  <!-- page specific style goes here -->
    4444  <xsl:template name="pageStyle">       
    45     <!--<xsl:if test="$berryBaskets = 'true'">-->
    4645    <xsl:if test="$berrybasketswitch = 'on'">
    4746      <xsl:call-template name="berryStyleSheet"/>
     
    6160    </xsl:call-template>
    6261    <div id="content">
    63     <xsl:apply-templates select="service">
    64       <xsl:with-param name="collName" select="$collName"/>
    65     </xsl:apply-templates>
    66    
    67     <!--<xsl:if test="$berryBaskets = 'true'">-->
    68     <xsl:if test="$berrybasketswitch = 'on'">
    69       <xsl:call-template name="berrybasket"/>
    70     </xsl:if>
     62      <xsl:apply-templates select="service">
     63    <xsl:with-param name="collName" select="$collName"/>
     64      </xsl:apply-templates>
     65     
     66      <xsl:if test="$berrybasketswitch = 'on'">
     67    <xsl:call-template name="berrybasket"/>
     68      </xsl:if>
    7169      <xsl:if test="contains($requesttype, 'r')">
    72       <xsl:call-template name="query-response">
    73     <xsl:with-param name="collName" select="$collName"/>
    74       </xsl:call-template>
     70    <xsl:call-template name="query-response">
     71      <xsl:with-param name="collName" select="$collName"/>
     72    </xsl:call-template>
    7573      </xsl:if>
    7674     
    7775    </div>
    78    </xsl:template>
     76  </xsl:template>
    7977
    8078
     
    9088    <xsl:if test="documentNodeList">
    9189
    92      <!-- next and prev links at top of results-->
    93    
     90      <!-- next and prev links at top of results-->     
    9491      <xsl:call-template name="resultNavigation">
    9592    <xsl:with-param name="collName" select="$collName"/>
    9693      </xsl:call-template>
    97    
    98       <!-- Display the matching documents --> 
    9994     
     95      <!-- Display the matching documents -->       
    10096      <xsl:call-template name="resultList">
    10197    <xsl:with-param name="collName" select="$collName"/>
    10298      </xsl:call-template>
    103    
     99     
    104100      <!-- next and prev links at bottom of page -->
    105101      <xsl:call-template name="resultNavigation">
     
    114110    <xsl:variable name="subaction" select="../pageRequest/@subaction"/>
    115111    <div id="queryform">
    116     <form name="QueryForm" method="get" action="{$library_name}">
    117       <input type="hidden" name="a" value="q"/>
    118       <input type="hidden" name="sa" value="{$subaction}"/>
    119       <input type="hidden" name="rt" value="rd"/>
    120       <input type="hidden" name="s" value="{@name}"/>
    121       <input type="hidden" name="c" value="{$collName}"/>
    122       <xsl:if test="not(paramList/param[@name='startPage'])">
    123     <input type="hidden" name="startPage" value="1"/>
    124       </xsl:if>
    125       <xsl:apply-templates select="paramList"/>
    126       <input type="submit"><xsl:attribute name="value"><xsl:value-of select="displayItem[@name='submit']"/></xsl:attribute></input>
    127     </form>
     112      <form name="QueryForm" method="get" action="{$library_name}">
     113    <input type="hidden" name="a" value="q"/>
     114    <input type="hidden" name="sa" value="{$subaction}"/>
     115    <input type="hidden" name="rt" value="rd"/>
     116    <input type="hidden" name="s" value="{@name}"/>
     117    <input type="hidden" name="c" value="{$collName}"/>
     118    <xsl:if test="not(paramList/param[@name='startPage'])">
     119      <input type="hidden" name="startPage" value="1"/>
     120    </xsl:if>
     121    <xsl:apply-templates select="paramList"/>
     122    <input type="submit"><xsl:attribute name="value"><xsl:value-of select="displayItem[@name='submit']"/></xsl:attribute></input>
     123      </form>
    128124    </div>
    129125  </xsl:template>
    130    
     126 
    131127</xsl:stylesheet> 
    132128
  • greenstone3/trunk/web/interfaces/default/transform/querytools.xsl

    r13505 r18316  
    1010  <xsl:template name="resultNavigation">
    1111    <xsl:param name="collName"/>
    12    <div class="resultnavigation"> 
    13   <!-- hits type -->
    14     <xsl:variable name='ht'>
    15       <xsl:choose>
    16     <xsl:when test="/page/pageResponse/service/paramList/param[@name='hitsPerPage']">s</xsl:when>
    17     <xsl:otherwise>i</xsl:otherwise>
    18       </xsl:choose>
    19     </xsl:variable>
    20    
    21     <xsl:variable name="param-list" select="/page/pageRequest/paramList"/>
    22     <!-- hits per page -->
    23     <xsl:variable name="hpp">
    24       <xsl:choose>
    25     <xsl:when test="$ht='s'"><xsl:value-of select="$param-list/param[@name='s1.hitsPerPage']/@value"/></xsl:when>
    26     <xsl:when test="$param-list/param[@name='hitsPerPage']"><xsl:value-of select="$param-list/param[@name='hitsPerPage']/@value"/></xsl:when>
    27     <xsl:otherwise>20</xsl:otherwise>
    28       </xsl:choose>
    29     </xsl:variable>
    30     <!-- total docs - this may be in numDocsMatched or numDocsReturned metadata -->
    31     <xsl:variable name="td">
    32       <xsl:choose>
    33     <xsl:when test="/page/pageResponse/metadataList/metadata[@name='numDocsReturned']">
    34       <xsl:value-of select="/page/pageResponse/metadataList/metadata[@name='numDocsReturned']"/>
    35     </xsl:when>
    36     <xsl:when test="/page/pageResponse/metadataList/metadata[@name='numDocsMatched']">
    37       <xsl:value-of select="/page/pageResponse/metadataList/metadata[@name='numDocsMatched']"/>
    38     </xsl:when>
    39     <xsl:otherwise> <!-- this is just a fall back - shoudl always have the metadata -->
    40       <xsl:value-of select="count(/page/pageResponse/documentNodeList/documentNode)"/>
    41     </xsl:otherwise>   
    42       </xsl:choose>
    43     </xsl:variable>
    44 
    45     <!-- only continue if hpp != -1 and td > hpp -->
    46     <xsl:if test="not($hpp=-1) and $td &gt; $hpp">
    47       <!-- start page -->
    48       <xsl:variable name="here">
     12    <div class="resultnavigation"> 
     13      <!-- hits type -->
     14      <xsl:variable name='ht'>
    4915    <xsl:choose>
    50       <xsl:when test="$ht='s'"><xsl:value-of select="$param-list/param[@name='s1.startPage']/@value"/></xsl:when>
    51       <xsl:when test="$param-list/param[@name='startPage']"><xsl:value-of select="$param-list/param[@name='startPage']/@value"/></xsl:when>
    52       <xsl:otherwise>1</xsl:otherwise>
     16      <xsl:when test="/page/pageResponse/service/paramList/param[@name='hitsPerPage']">s</xsl:when>
     17      <xsl:otherwise>i</xsl:otherwise>
    5318    </xsl:choose>
    5419      </xsl:variable>
    55       <xsl:variable name="sa" select="/page/pageRequest/@subaction"/>
    56       <xsl:variable name="service" select="$param-list/param[@name='s']/@value"/>
    57       <xsl:variable name="prev" select="$here - 1"/>
    58       <xsl:variable name="next" select="$here + 1"/>
    59       <xsl:variable name="page-param"><xsl:if test="$ht='s'">s1.</xsl:if>startPage</xsl:variable>
    60      
    61       <div>   
     20     
     21      <xsl:variable name="param-list" select="/page/pageRequest/paramList"/>
     22      <!-- hits per page -->
     23      <xsl:variable name="hpp">
     24    <xsl:choose>
     25      <xsl:when test="$ht='s'"><xsl:value-of select="$param-list/param[@name='s1.hitsPerPage']/@value"/></xsl:when>
     26      <xsl:when test="$param-list/param[@name='hitsPerPage']"><xsl:value-of select="$param-list/param[@name='hitsPerPage']/@value"/></xsl:when>
     27      <xsl:otherwise>20</xsl:otherwise>
     28    </xsl:choose>
     29      </xsl:variable>
     30      <!-- total docs - this may be in numDocsMatched or numDocsReturned metadata -->
     31      <xsl:variable name="td">
     32    <xsl:choose>
     33      <xsl:when test="/page/pageResponse/metadataList/metadata[@name='numDocsReturned']">
     34        <xsl:value-of select="/page/pageResponse/metadataList/metadata[@name='numDocsReturned']"/>
     35      </xsl:when>
     36      <xsl:when test="/page/pageResponse/metadataList/metadata[@name='numDocsMatched']">
     37        <xsl:value-of select="/page/pageResponse/metadataList/metadata[@name='numDocsMatched']"/>
     38      </xsl:when>
     39      <xsl:otherwise> <!-- this is just a fall back - should always have the metadata -->
     40        <xsl:value-of select="count(/page/pageResponse/documentNodeList/documentNode)"/>
     41      </xsl:otherwise> 
     42    </xsl:choose>
     43      </xsl:variable>
     44
     45      <!-- only continue if hpp != -1 and td > hpp -->
     46      <xsl:if test="not($hpp=-1) and $td &gt; $hpp">
     47    <!-- start page -->
     48    <xsl:variable name="here">
     49      <xsl:choose>
     50        <xsl:when test="$ht='s'"><xsl:value-of select="$param-list/param[@name='s1.startPage']/@value"/></xsl:when>
     51        <xsl:when test="$param-list/param[@name='startPage']"><xsl:value-of select="$param-list/param[@name='startPage']/@value"/></xsl:when>
     52        <xsl:otherwise>1</xsl:otherwise>
     53      </xsl:choose>
     54    </xsl:variable>
     55    <xsl:variable name="sa" select="/page/pageRequest/@subaction"/>
     56    <xsl:variable name="service" select="$param-list/param[@name='s']/@value"/>
     57    <xsl:variable name="prev" select="$here - 1"/>
     58    <xsl:variable name="next" select="$here + 1"/>
     59    <xsl:variable name="page-param"><xsl:if test="$ht='s'">s1.</xsl:if>startPage</xsl:variable>
     60   
     61    <div>   
    6262      <div>
    63          <xsl:if test="$here &gt; 1"><a href="{$library_name}?a=q&amp;sa={$sa}&amp;c={$collName}&amp;s={$service}&amp;rt=rd&amp;{$page-param}={$prev}"><img src="interfaces/default/images/less.gif" width='30' height='16' border='0' align='top'/><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'query.matches')"/><xsl:text> </xsl:text><xsl:value-of select="number(($prev - 1)*$hpp + 1)"/> - <xsl:value-of select="number(($prev * $hpp))"/></a></xsl:if>
    64        
    65        
    66           <xsl:if test="(($here * $hpp) + 1)  &lt; $td">
    67         <xsl:variable name='m' select="number($next * $hpp)"/>
    68         <xsl:variable name='mm'><xsl:choose><xsl:when test="$m &lt; $td"><xsl:value-of select='$m'/></xsl:when><xsl:otherwise><xsl:value-of select='$td'/></xsl:otherwise></xsl:choose></xsl:variable>
    69         <a href="{$library_name}?a=q&amp;sa={$sa}&amp;c={$collName}&amp;s={$service}&amp;rt=rd&amp;{$page-param}={$next}"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'query.matches')"/><xsl:text> </xsl:text><xsl:value-of select="number(($next - 1)*$hpp + 1)"/> - <xsl:value-of select="$mm"/><img src="interfaces/default/images/more.gif" width='30' height='16' border='0' align='top'/></a></xsl:if></div>
     63        <xsl:if test="$here &gt; 1"><a href="{$library_name}?a=q&amp;sa={$sa}&amp;c={$collName}&amp;s={$service}&amp;rt=rd&amp;{$page-param}={$prev}"><img src="interfaces/default/images/less.gif" width='30' height='16' border='0' align='top'/><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'query.matches')"/><xsl:text> </xsl:text><xsl:value-of select="number(($prev - 1)*$hpp + 1)"/> - <xsl:value-of select="number(($prev * $hpp))"/></a></xsl:if>
     64        
     65        
     66        <xsl:if test="(($here * $hpp) + 1)  &lt; $td">
     67          <xsl:variable name='m' select="number($next * $hpp)"/>
     68          <xsl:variable name='mm'><xsl:choose><xsl:when test="$m &lt; $td"><xsl:value-of select='$m'/></xsl:when><xsl:otherwise><xsl:value-of select='$td'/></xsl:otherwise></xsl:choose></xsl:variable>
     69          <a href="{$library_name}?a=q&amp;sa={$sa}&amp;c={$collName}&amp;s={$service}&amp;rt=rd&amp;{$page-param}={$next}"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'query.matches')"/><xsl:text> </xsl:text><xsl:value-of select="number(($next - 1)*$hpp + 1)"/> - <xsl:value-of select="$mm"/><img src="interfaces/default/images/more.gif" width='30' height='16' border='0' align='top'/></a></xsl:if></div>
    7070    </div>
    71      </xsl:if>
    72    </div>
     71      </xsl:if>
     72    </div>
    7373  </xsl:template>
    74    
     74 
    7575  <xsl:template name="matchDocs">
    7676    <!-- If the number of matching documents is known, display it -->
    7777    <div id="matchdocs">
    78     <xsl:variable name="numDocsMatched" select="metadataList/metadata[@name='numDocsMatched']"/>
    79     <xsl:variable name="numDocsReturned" select="metadataList/metadata[@name='numDocsReturned']"/>
    80     <xsl:choose>
    81       <xsl:when test="$numDocsMatched='0' or $numDocsReturned='0'">
    82     <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'query.nodocsmatch')"/>
    83       </xsl:when>
    84       <xsl:when test="$numDocsMatched='1' or $numDocsReturned='1'">
    85     <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'query.onedocsmatch')"/>
    86       </xsl:when>
    87       <xsl:when test="$numDocsMatched">
    88     <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'query.manydocsmatch', $numDocsMatched)"/>
    89     <xsl:if test="$numDocsReturned"> (<xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'query.docsreturned', $numDocsReturned)"/>)</xsl:if>
    90       </xsl:when>
    91       <xsl:when test="$numDocsReturned">
    92     <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'query.atleastdocsmatch', $numDocsReturned)"/>
    93       </xsl:when>
    94     </xsl:choose>
    95    </div>
     78      <xsl:variable name="numDocsMatched" select="metadataList/metadata[@name='numDocsMatched']"/>
     79      <xsl:variable name="numDocsReturned" select="metadataList/metadata[@name='numDocsReturned']"/>
     80      <xsl:choose>
     81    <xsl:when test="$numDocsMatched='0' or $numDocsReturned='0'">
     82      <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'query.nodocsmatch')"/>
     83    </xsl:when>
     84    <xsl:when test="$numDocsMatched='1' or $numDocsReturned='1'">
     85      <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'query.onedocsmatch')"/>
     86    </xsl:when>
     87    <xsl:when test="$numDocsMatched">
     88      <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'query.manydocsmatch', $numDocsMatched)"/>
     89      <xsl:if test="$numDocsReturned"> (<xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'query.docsreturned', $numDocsReturned)"/>)</xsl:if>
     90    </xsl:when>
     91    <xsl:when test="$numDocsReturned">
     92      <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'query.atleastdocsmatch', $numDocsReturned)"/>
     93    </xsl:when>
     94      </xsl:choose>
     95    </div>
    9696  </xsl:template>
    9797
    9898  <!-- paging is now done by the query action, so here we just print out all the docs that we have -->
    9999  <xsl:template name="resultList">
    100      <xsl:param name="collName"/>
     100    <xsl:param name="collName"/>
    101101    <ul id="resultlist">
    102      <xsl:for-each select="documentNodeList/documentNode">
     102      <xsl:for-each select="documentNodeList/documentNode">
    103103    <li><table>
    104       <xsl:call-template name="documentNodeWrapper">
    105         <xsl:with-param name="collName" select="$collName"/>
    106         <xsl:with-param name="serviceName" select="/page/pageResponse/service/@name"/>
    107       </xsl:call-template>
    108             </table>
     104        <xsl:call-template name="documentNodeWrapper">
     105          <xsl:with-param name="collName" select="$collName"/>
     106          <xsl:with-param name="serviceName" select="/page/pageResponse/service/@name"/>
     107        </xsl:call-template>
     108      </table>
    109109    </li>       
    110110      </xsl:for-each> 
     
    118118    <xsl:variable name="berrybasketswitch"><xsl:value-of select="/page/pageRequest/paramList/param[@name='berrybasket']/@value"/></xsl:variable>
    119119    <!--<xsl:if test="$berryBaskets = 'true'">-->
    120       <xsl:if test="$berrybasketswitch = 'on'">
     120    <xsl:if test="$berrybasketswitch = 'on'">
    121121      <xsl:call-template name="addBerry">
    122122    <xsl:with-param name="collName" select="$collName"/>
     
    135135    <xsl:param name="collName"/>
    136136    <xsl:param name="serviceName"/>
    137      <a><xsl:attribute name="href"><xsl:value-of select='$library_name'/>?a=d&amp;c=<xsl:value-of select='$collName'/>&amp;d=<xsl:value-of select='@nodeID'/><xsl:if test="@nodeType='leaf'">&amp;sib=1</xsl:if>&amp;dt=<xsl:value-of select='@docType'/>&amp;p.a=q&amp;&amp;p.sa=<xsl:value-of select="/page/pageRequest/@subaction"/>&amp;p.s=<xsl:value-of select="$serviceName"/></xsl:attribute>
    138     <xsl:apply-templates select="." mode="displayNodeIcon"/>
    139       </a>
     137    <a><xsl:attribute name="href"><xsl:value-of select='$library_name'/>?a=d&amp;c=<xsl:value-of select='$collName'/>&amp;d=<xsl:value-of select='@nodeID'/><xsl:if test="@nodeType='leaf'">&amp;sib=1</xsl:if>&amp;dt=<xsl:value-of select='@docType'/>&amp;p.a=q&amp;&amp;p.sa=<xsl:value-of select="/page/pageRequest/@subaction"/>&amp;p.s=<xsl:value-of select="$serviceName"/></xsl:attribute>
     138      <xsl:apply-templates select="." mode="displayNodeIcon"/>
     139    </a>
    140140    <span><xsl:value-of disable-output-escaping="yes" select="metadataList/metadata[@name='Title']"/></span>
    141141  </xsl:template>
    142142
    143143  <xsl:template name="termInfo">
    144    <div class="terminfo">
    145     <xsl:if test="count(termList/term) > 0">
    146      <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'query.wordcount')"/>
     144    <div class="terminfo">
     145      <xsl:if test="count(termList/term) > 0">
     146    <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'query.wordcount')"/>
    147147    <xsl:for-each select="termList/term">
    148148      <xsl:if test="position() > 1">, </xsl:if>
    149149      <xsl:value-of select="@name"/>: <xsl:value-of select="@freq"/>
    150150    </xsl:for-each>
    151     </xsl:if>
    152   </div>
     151      </xsl:if>
     152    </div>
    153153  </xsl:template>
    154154
  • greenstone3/trunk/web/interfaces/default/transform/service-params.xsl

    r13505 r18316  
    55  extension-element-prefixes="java">
    66
    7 <!-- handling of the different types of params on a service form
     7  <!-- handling of the different types of params on a service form
    88  - these now only output the selection box/text box etc, not the name -->
    99
     
    1919      <xsl:otherwise>
    2020        <xsl:variable name="pvalue"><xsl:apply-templates select="." mode="calculate-default"><xsl:with-param name="ns" select="$ns"/></xsl:apply-templates></xsl:variable>
    21           <li><xsl:value-of select="displayItem[@name='name']"/><xsl:apply-templates select="."><xsl:with-param name="default" select="$pvalue"/><xsl:with-param name="ns" select="$ns"/></xsl:apply-templates></li>
     21        <li><xsl:value-of select="displayItem[@name='name']"/><xsl:apply-templates select="."><xsl:with-param name="default" select="$pvalue"/><xsl:with-param name="ns" select="$ns"/></xsl:apply-templates></li>
    2222      </xsl:otherwise>
    2323    </xsl:choose>
     
    2525    </ul>
    2626  </xsl:template>
    27  
     27  
    2828  <!-- puts all the params into a=p&p=h type form - need to change this if use
    2929  multi params  -->
     
    111111    </select>
    112112  </xsl:template>
    113  
     113  
    114114  <!-- string params -->
    115115  <xsl:template match="param[@type='string']">
     
    131131    <xsl:variable name="parent" select="@name"/>
    132132    <table>
    133         <tr class="queryfieldheading"><xsl:value-of select="displayItem[@name='name']"/>
     133      <tr class="queryfieldheading"><xsl:value-of select="displayItem[@name='name']"/>
    134134        <xsl:for-each select="param">
    135         <td class="queryfieldname"><xsl:value-of select="displayItem[@name='name']"/></td>
     135      <td class="queryfieldname"><xsl:value-of select="displayItem[@name='name']"/></td>
    136136    </xsl:for-each>
    137         </tr>
     137      </tr>
    138138     
    139         <xsl:apply-templates select="." mode="contents"><xsl:with-param name="occurs" select="@occurs"/><xsl:with-param name="ns" select="$ns"/></xsl:apply-templates>
     139      <xsl:apply-templates select="." mode="contents"><xsl:with-param name="occurs" select="@occurs"/><xsl:with-param name="ns" select="$ns"/></xsl:apply-templates>
    140140    </table>
    141141  </xsl:template>
     
    170170  <!--
    171171  <xsl:template match="paramList">
    172   <p/><table width="537">
    173   <xsl:choose>
    174   <xsl:when test='count(param)>4'>
    175   <xsl:for-each select="param[position() mod 2 = 1]">
    176   <tr><xsl:apply-templates select="."/>
    177   <xsl:if test="following-sibling::param[1]"><xsl:apply-templates select='following-sibling::param[1]'/></xsl:if></tr>
    178 </xsl:for-each>
    179 </xsl:when>
    180   <xsl:otherwise>
    181   <xsl:for-each select="param">
    182   <tr><xsl:apply-templates select='.'/></tr>
    183 </xsl:for-each>
    184 </xsl:otherwise>
    185 </xsl:choose>
    186 </table>
    187 </xsl:template>
     172    <p/><table width="537">
     173      <xsl:choose>
     174        <xsl:when test='count(param)>4'>
     175          <xsl:for-each select="param[position() mod 2 = 1]">
     176            <tr><xsl:apply-templates select="."/>
     177              <xsl:if test="following-sibling::param[1]"><xsl:apply-templates select='following-sibling::param[1]'/></xsl:if></tr>
     178          </xsl:for-each>
     179        </xsl:when>
     180    <xsl:otherwise>
     181      <xsl:for-each select="param">
     182        <tr><xsl:apply-templates select='.'/></tr>
     183      </xsl:for-each>
     184    </xsl:otherwise>
     185      </xsl:choose>
     186    </table>
     187  </xsl:template>
    188188  -->
  • greenstone3/trunk/web/interfaces/default/transform/style.xsl

    r18305 r18316  
    1010  <xsl:param name="interface_name"/>
    1111  <xsl:param name="library_name"/>
    12    <!-- global style info goes here  -->
     12  <!-- global style info goes here  -->
    1313  <xsl:template name="globalStyle">
    1414    <link rel="stylesheet" href="interfaces/default/style/core.css" type="text/css"/>
    1515  </xsl:template>
    1616 
    17 
    18 
    19  <xsl:template name="response">
    20       <xsl:apply-templates select="pageResponse"/>
    21           <xsl:if test="descendant::error">
    22             <script language="Javascript">
    23               <xsl:text disable-output-escaping="yes">
    24             function removeAllChildren(node) {
    25              while (node.hasChildNodes()) {
    26               node.removeChild(node.firstChild);
    27              }
    28             }
    29 
    30               function toggleHideError(obj) {
    31               if (obj.style.display == "none") {
    32             obj.style.display = "";
    33             hide_link = document.getElementById("hide");
    34             removeAllChildren(hide_link);
    35             hide_link.appendChild(document.createTextNode("Hide Error"));
    36               } else {
    37             obj.style.display = "none";
    38             hide_link = document.getElementById("hide");
    39             removeAllChildren(hide_link);
    40             hide_link.appendChild(document.createTextNode("Show Error"));
    41            
    42             }
    43               }
    44               </xsl:text>
    45             </script>
    46             <p align='right'><a id="hide" href="javascript:toggleHideError(error);">Show Error</a></p>
    47             <div id="error" style="display: none;">
    48               <xsl:apply-templates select="descendant::error"/>
    49             </div>
    50           </xsl:if>
    51  </xsl:template>
     17  <xsl:template name="response">
     18    <xsl:apply-templates select="pageResponse"/>
     19    <xsl:if test="descendant::error">
     20      <script language="Javascript">
     21    <xsl:text disable-output-escaping="yes">
     22      function removeAllChildren(node) {
     23        while (node.hasChildNodes()) {
     24          node.removeChild(node.firstChild);
     25        }
     26      }
     27
     28      function toggleHideError(obj) {
     29        if (obj.style.display == "none") {
     30          obj.style.display = "";
     31          hide_link = document.getElementById("hide");
     32          removeAllChildren(hide_link);
     33          hide_link.appendChild(document.createTextNode("Hide Error"));
     34        } else {
     35          obj.style.display = "none";
     36          hide_link = document.getElementById("hide");
     37          removeAllChildren(hide_link);
     38          hide_link.appendChild(document.createTextNode("Show Error"));
     39        }
     40      }
     41    </xsl:text>
     42      </script>
     43      <p align='right'><a id="hide" href="javascript:toggleHideError(error);">Show Error</a></p>
     44      <div id="error" style="display: none;">
     45    <xsl:apply-templates select="descendant::error"/>
     46      </div>
     47    </xsl:if>
     48  </xsl:template>
    5249
    5350  <xsl:template name="greenstoneFooter">
    54       <div id="footer">
    55          <xsl:call-template name="dividerBar">
    56             <xsl:with-param name="text" select="util:getInterfaceText($interface_name, /page/@lang, 'gs3power')"/>
    57         </xsl:call-template>
    58       </div>
     51    <div id="footer">
     52      <xsl:call-template name="dividerBar">
     53    <xsl:with-param name="text" select="util:getInterfaceText($interface_name, /page/@lang, 'gs3power')"/>
     54      </xsl:call-template>
     55    </div>
    5956  </xsl:template>
    6057 
     
    6865    <xsl:variable name="this-element" select="/page/pageResponse/collection|/page/pageResponse/serviceCluster"/>
    6966    <div  id="banner">   
    70      <p>
    71       <a href="{$library_name}?a=p&amp;sa=about&amp;c={$collName}">
    72         <xsl:choose>
    73           <xsl:when test="$this-element/displayItem[@name='icon']">
    74         <img border="0">
    75           <xsl:attribute name="src">
    76             <xsl:value-of select="$this-element/metadataList/metadata[@name='httpPath']"/>/images/<xsl:value-of select="$this-element/displayItem[@name='icon']"/>
    77           </xsl:attribute> 
    78           <xsl:attribute name="alt">
    79             <xsl:value-of select="$this-element/displayItem[@name='name']"/>
    80           </xsl:attribute>
    81           <xsl:attribute name="title">
    82             <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'aboutpage')"/>
    83           </xsl:attribute>
    84         </img>
    85           </xsl:when>
    86           <xsl:otherwise>
    87         <xsl:value-of select="$this-element/displayItem[@name='name']"/>
    88           </xsl:otherwise>
    89         </xsl:choose>
    90       </a>
    91     </p>
    92         <ul id="bannerlist">
    93       <xsl:call-template name="top-buttons">
    94         <xsl:with-param name="collName" select="$collName"/>
    95         <xsl:with-param name="pageType" select="$pageType"/>
    96       </xsl:call-template>
    97        </ul>
     67      <p>
     68    <a href="{$library_name}?a=p&amp;sa=about&amp;c={$collName}">
     69      <xsl:choose>
     70        <xsl:when test="$this-element/displayItem[@name='icon']">
     71          <img border="0">
     72        <xsl:attribute name="src">
     73          <xsl:value-of select="$this-element/metadataList/metadata[@name='httpPath']"/>/images/<xsl:value-of select="$this-element/displayItem[@name='icon']"/>
     74        </xsl:attribute>   
     75        <xsl:attribute name="alt">
     76          <xsl:value-of select="$this-element/displayItem[@name='name']"/>
     77        </xsl:attribute>
     78        <xsl:attribute name="title">
     79          <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'aboutpage')"/>
     80        </xsl:attribute>
     81          </img>
     82        </xsl:when>
     83        <xsl:otherwise>
     84          <xsl:value-of select="$this-element/displayItem[@name='name']"/>
     85        </xsl:otherwise>
     86      </xsl:choose>
     87    </a>
     88      </p>
     89      <ul id="bannerlist">
     90    <xsl:call-template name="top-buttons">
     91      <xsl:with-param name="collName" select="$collName"/>
     92      <xsl:with-param name="pageType" select="$pageType"/>
     93    </xsl:call-template>
     94      </ul>
    9895    </div>
    99    </xsl:template>
     96  </xsl:template>
    10097 
    10198  <xsl:template name="top-buttons">
    10299    <xsl:param name="collName"/>
    103100    <xsl:param name="pageType"/>
    104          <li><a  href="{$library_name}?a=p&amp;sa=home"><xsl:attribute name="title"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'home_tip')"/></xsl:attribute>
    105         <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'home_b')"/>
     101    <li><a  href="{$library_name}?a=p&amp;sa=home"><xsl:attribute name="title"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'home_tip')"/></xsl:attribute>
     102    <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'home_b')"/>
     103      </a></li>
     104    <xsl:choose>
     105      <xsl:when test="$pageType='help'">
     106    <li><a><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'help_b')"/></a></li>
     107      </xsl:when>
     108      <xsl:otherwise>
     109    <li><a href="{$library_name}?a=p&amp;sa=help&amp;c={$collName}"><xsl:attribute name="title"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'help_tip')"/></xsl:attribute>
     110        <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'help_b')"/>
    106111      </a></li>
    107     <xsl:choose>
    108       <xsl:when test="$pageType='help'">
    109           <li><a><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'help_b')"/></a></li>
    110       </xsl:when>
    111       <xsl:otherwise>
    112         <li><a href="{$library_name}?a=p&amp;sa=help&amp;c={$collName}"><xsl:attribute name="title"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'help_tip')"/></xsl:attribute>
    113         <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'help_b')"/>
    114           </a></li>
    115         </xsl:otherwise>
    116     </xsl:choose>
    117     <xsl:choose>
    118       <xsl:when test="$pageType='pref'">
    119          <li><a><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'pref_b')"/></a></li>
    120        </xsl:when>
    121       <xsl:otherwise>
    122         <li><a href="{$library_name}?a=p&amp;sa=pref&amp;c={$collName}"><xsl:attribute name="title"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'pref_tip')"/></xsl:attribute>
    123         <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'pref_b')"/>
    124           </a></li>
    125         </xsl:otherwise>
    126     </xsl:choose>
     112      </xsl:otherwise>
     113    </xsl:choose>
     114    <xsl:choose>
     115      <xsl:when test="$pageType='pref'">
     116    <li><a><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'pref_b')"/></a></li>
     117      </xsl:when>
     118      <xsl:otherwise>
     119    <li><a href="{$library_name}?a=p&amp;sa=pref&amp;c={$collName}"><xsl:attribute name="title"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'pref_tip')"/></xsl:attribute>
     120        <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'pref_b')"/>
     121      </a></li>
     122      </xsl:otherwise>
     123    </xsl:choose>
    127124  </xsl:template>
    128125
     
    132129    <xsl:variable name="this-service" select="/page/pageResponse/service/@name"/>
    133130    <xsl:choose>
    134     <xsl:when test="$this-element/serviceList/service">
    135     <div id="navbar">
    136         <ul id="navbarlist">
     131      <xsl:when test="$this-element/serviceList/service">
     132    <div id="navbar">
     133      <ul id="navbarlist">
    137134        <xsl:for-each select="$this-element/serviceList/service">
    138135          <xsl:variable name="action"><xsl:choose>
     
    153150          </xsl:choose>
    154151        </xsl:for-each>
    155            </ul>
    156      </div>
     152      </ul>
     153    </div>
    157154      </xsl:when>
    158155      <xsl:otherwise>
    159156        <xsl:call-template name="dividerBar">
    160             <xsl:with-param name="text" select="'&#160;'"/>
     157      <xsl:with-param name="text" select="'&#160;'"/>
    161158        </xsl:call-template>           
    162159      </xsl:otherwise>
     
    166163 
    167164  <xsl:template name="dividerBar">
    168    <xsl:param name='text'/>
    169       <xsl:choose>
     165    <xsl:param name='text'/>
     166    <xsl:choose>
    170167      <xsl:when test="$text">
    171      <div class="divbar"><xsl:value-of select="$text"/></div>
    172       </xsl:when>
    173       <xsl:otherwise>
    174      <div class="divbar"><xsl:text disable-output-escaping="yes">&amp;nbsp;</xsl:text></div>
     168    <div class="divbar"><xsl:value-of select="$text"/></div>
     169      </xsl:when>
     170      <xsl:otherwise>
     171    <div class="divbar"><xsl:text disable-output-escaping="yes">&amp;nbsp;</xsl:text></div>
    175172      </xsl:otherwise>
    176173    </xsl:choose>
     
    179176  <!-- Display the appropriate image, depending on the node type -->
    180177  <xsl:template match="documentNode" mode="displayNodeIcon">
    181      
     178   
    182179    <!-- Root node: book icon (open or closed) -->
    183180    <xsl:choose>
  • greenstone3/trunk/web/interfaces/default/transform/system.xsl

    r17017 r18316  
    1010  <!-- the main page layout template is here -->
    1111  <xsl:template match="page">
    12         <html>
    13     <head>
    14       <title>
    15     <!-- put a space in the title in case the actual value is missing - mozilla will not display a page with no title-->
    16     <xsl:call-template name="pageTitle"/><xsl:text> </xsl:text>
    17       </title>
    18       <xsl:call-template name="globalStyle"/>
    19       <xsl:call-template name="pageStyle"/>
    20     </head>
    21           <body>
    22            <div id="globalwrapper">
    23           <xsl:call-template name="response" />
    24           <xsl:call-template name="greenstoneFooter"/>
    25        </div>
    26           </body>
    27         </html>
     12    <html>
     13      <head>
     14    <title>
     15      <!-- put a space in the title in case the actual value is missing - mozilla will not display a page with no title-->
     16      <xsl:call-template name="pageTitle"/><xsl:text> </xsl:text>
     17    </title>
     18    <xsl:call-template name="globalStyle"/>
     19    <xsl:call-template name="pageStyle"/>
     20      </head>
     21      <body>
     22    <div id="globalwrapper">
     23      <xsl:call-template name="response" />
     24      <xsl:call-template name="greenstoneFooter"/>
     25    </div>
     26      </body>
     27    </html>
    2828  </xsl:template>
    2929 
    30     <xsl:template name="pageTitle">
     30  <xsl:template name="pageTitle">
    3131    <xsl:value-of select="java:org.greenstone.gsdl3.util.XSLTUtil.getInterfaceText($interface_name, /page/@lang, 'gsdl')"/>
    3232  </xsl:template>
    33 
     33 
    3434  <!-- page specific style goes here -->
    3535  <xsl:template name="pageStyle"/>
    36 
     36 
    3737  <xsl:template match="pageResponse">
    3838    <xsl:value-of select="status"/>
Note: See TracChangeset for help on using the changeset viewer.