Various changes to display
authorAdam Dickmeiss <adam@indexdata.dk>
Thu, 17 Jul 2014 12:07:02 +0000 (14:07 +0200)
committerAdam Dickmeiss <adam@indexdata.dk>
Thu, 17 Jul 2014 12:07:02 +0000 (14:07 +0200)
In the displays:
• (brief) Eliminate “Next Record Position” line at top.
• Include a “Next” link at the top and bottom of the page, which would get the next N (same number of) records.
• Where it says “Record: x : bibframe : xml”
· Shorten to just “Record x” (don’t need bibframe : xml)
· Bold it and slightly larger font.
• (brief) Change “Author” to “Creator”
• (brief) for Creator, Work Title, and Date/Place: add colon and bold.
• Links to “Full Record x” and “Raw Record x” on same line rather than separate lines.
• Horizontal line <hr/> between hits.

bibframe/xsl/briefDisplay.xsl
bibframe/xsl/fullDisplay.xsl

index 1521af1..aa1dac3 100644 (file)
@@ -19,7 +19,7 @@
        <xsl:variable
            name="resource" select="./@rdf:resource"/>
        <tr>
-         <td>Author</td>
+         <td><b>Creator:</b></td>
          <td>
            <xsl:value-of select="//*[@rdf:about=$resource]/bf:label"/>
          </td>
@@ -29,7 +29,7 @@
        <xsl:variable
            name="resource" select="./@rdf:resource"/>
        <tr>
-         <td>Work Title</td>
+         <td><b>Work Title:</b></td>
          <td>
            <xsl:value-of select="//*[@rdf:about=$resource]/bf:titleValue"/>
          </td>
@@ -37,7 +37,7 @@
       </xsl:for-each>
       <xsl:for-each select="bf:Instance/bf:providerStatement">
        <tr>
-         <td>Date/Place</td>
+         <td><b>Date/Place:</b></td>
          <td>
            <xsl:value-of select="."/>
          </td>
@@ -54,7 +54,7 @@
     <html>
       <head>
         <title>
-          <xsl:value-of select="//zr:explain/zr:databaseInfo/zr:title"/>
+          BIBFRAME demo
         </title>
         <link href="css.css" rel="stylesheet"
               type="text/css" media="screen, all"/>
@@ -68,9 +68,8 @@
   </xsl:template>
 
   <xsl:template match="zr:explain">
-    <xsl:call-template name="dbinfo"/>
     <xsl:call-template name="diagnostic"/>
-    <xsl:call-template name="searchform"/>
+    <xsl:call-template name="searchform1"/>
   </xsl:template>
 
   <xsl:template match="srw:searchRetrieveResponse">
     </div>
   </xsl:template>
 
-  <xsl:template name="searchform">
+  <xsl:template name="searchform1">
+    <div class="searchform">
+      <form name="searchform"  method="get"> <!-- action=".." -->
+        <input type="hidden" name="version" value="1.2"/>
+        <input type="hidden" name="operation" value="searchRetrieve"/>
+       <input type="hidden" name="stylesheet">
+         <xsl:attribute name="value">
+           <xsl:value-of select="//srw:echoedExplainRequest/srw:stylesheet"/>
+           <xsl:value-of select="//sru:echoedExplainRequest/sru:stylesheet"/>
+         </xsl:attribute>
+       </input>
+       <input type="text" name="query"/>
+       <input name="version" value="1.2" type="hidden"/>
+       <input name="operation" value="searchRetrieve" type="hidden"/>
+       <input name="startRecord" value="1" type="hidden"/>
+       <input name="maximumRecords" value="10" type="hidden"/>
+       <input name="recordSchema" value="bibframe" type="hidden"/>
+       <input type="submit" value="submit"/>
+      </form>
+    </div>
+  </xsl:template>
+
+  <xsl:template name="searchform2">
     <div class="searchform">
       <form name="searchform"  method="get"> <!-- action=".." -->
         <input type="hidden" name="version" value="1.2"/>
     </xsl:for-each>
   </xsl:template>
 
+  <xsl:template name="new-search">
+    <form name="newsearch" method="get">
+      <input type="hidden" name="version">
+       <xsl:attribute name="value">
+         <xsl:value-of
+             select="//srw:echoedSearchRetrieveRequest/srw:version"/>
+       </xsl:attribute>
+      </input>
+      <input type="hidden" name="stylesheet">
+       <xsl:attribute name="value">
+         <xsl:value-of
+             select="//srw:echoedSearchRetrieveRequest/srw:stylesheet"/>
+       </xsl:attribute>
+      </input>
+
+      <input type="submit">
+       <xsl:attribute name="value">
+         <xsl:text>New Query</xsl:text>
+       </xsl:attribute>
+      </input>
+    </form>
+  </xsl:template>
+
+  <xsl:template name="next-records">
+    <xsl:for-each select="srw:nextRecordPosition">
+      <form name="nextlink" method="get">
+       <input type="hidden" name="version">
+         <xsl:attribute name="value">
+           <xsl:value-of
+               select="//srw:echoedSearchRetrieveRequest/srw:version"/>
+         </xsl:attribute>
+       </input>
+       <input type="hidden" name="operation" value="searchRetrieve"/>
+       <input type="hidden" name="query">
+         <xsl:attribute name="value">
+           <xsl:value-of
+               select="//srw:echoedSearchRetrieveRequest/srw:query"/>
+         </xsl:attribute>
+       </input>
+       <input type="hidden" name="recordPacking">
+         <xsl:attribute name="value">
+           <xsl:value-of select="srw:recordPacking"/>
+         </xsl:attribute>
+       </input>
+       <input type="hidden" name="recordSchema">
+         <xsl:attribute name="value">
+           <xsl:value-of
+               select="//srw:echoedSearchRetrieveRequest/srw:recordSchema"/>
+         </xsl:attribute>
+       </input>
+       <input type="hidden" name="stylesheet">
+         <xsl:attribute name="value">
+           <xsl:value-of
+               select="//srw:echoedSearchRetrieveRequest/srw:stylesheet"/>
+         </xsl:attribute>
+       </input>
+       <input type="hidden" name="startRecord">
+         <xsl:attribute name="value">
+           <xsl:value-of select="."/>
+         </xsl:attribute>
+       </input>
+       <input type="hidden" name="maximumRecords">
+         <xsl:attribute name="value">
+           <xsl:value-of
+               select="//srw:echoedSearchRetrieveRequest/srw:maximumRecords"/>
+         </xsl:attribute>
+       </input>
+       <input type="submit">
+         <xsl:attribute name="value">
+           <xsl:text>Next</xsl:text>
+         </xsl:attribute>
+       </input>
+      </form>
+    </xsl:for-each>
+  </xsl:template>
+
   <xsl:template name="displaysearch">
     <div class="searchresults">
       <xsl:for-each select="srw:numberOfRecords">
           <xsl:value-of select="."/>
         </h4>
       </xsl:for-each>
-      <xsl:for-each select="srw:nextRecordPosition">
-        <h4>
-          <xsl:text>Next Record Position: </xsl:text>
-          <xsl:value-of select="."/>
-         </h4>
-      </xsl:for-each>
+
+      <xsl:call-template name="new-search"/>
+
+      <xsl:call-template name="next-records"/>
 
       <xsl:for-each select="srw:records">
         <xsl:for-each select="srw:record">
+         <hr/>
           <div class="record">
-            <p>
-              <xsl:text>Record: </xsl:text>
+            <h4>
+              <xsl:text>Record </xsl:text>
               <xsl:value-of select="srw:recordPosition"/>
-              <xsl:text> : </xsl:text>
-              <xsl:value-of select="srw:recordSchema"/>
-              <xsl:text> : </xsl:text>
-              <xsl:value-of select="srw:recordPacking"/>
-           </p>
+           </h4>
             <p>
              <xsl:if test="srw:recordPacking='string'">
                <pre>
                  </xsl:when>
                </xsl:choose>
              </xsl:if>
-
+           </p>
+         </div>
+         <table>
+           <tr>
+             <td>
              <form name="fulllink" method="get">
-               <input type="hidden" name="version" value="1.2"/>
+               <input type="hidden" name="version">
+                 <xsl:attribute name="value">
+                   <xsl:value-of
+                       select="//srw:echoedSearchRetrieveRequest/srw:version"/>
+                 </xsl:attribute>
+               </input>
                <input type="hidden" name="operation" value="searchRetrieve"/>
                <input type="hidden" name="query">
                  <xsl:attribute name="value">
                  </xsl:attribute>
                </input>
              </form>
+             </td>
+             <td>
              <form name="rawlink" method="get">
-               <input type="hidden" name="version" value="1.2"/>
+               <input type="hidden" name="version">
+                 <xsl:attribute name="value">
+                   <xsl:value-of
+                       select="//srw:echoedSearchRetrieveRequest/srw:version"/>
+                 </xsl:attribute>
+               </input>
                <input type="hidden" name="operation" value="searchRetrieve"/>
                <input type="hidden" name="query">
                  <xsl:attribute name="value">
                  </xsl:attribute>
                </input>
              </form>
-           </p>
-          </div>
+             </td>
+           </tr>
+         </table>
         </xsl:for-each>
       </xsl:for-each>
+
+      <xsl:call-template name="next-records"/>
+
     </div>
   </xsl:template>
 
index 9245e85..967f45d 100644 (file)
   <xsl:template match="rdf:RDF">
     <table>
       <xsl:for-each select="bf:*">
-       <tr><td><xsl:value-of select="name(.)"/></td></tr>
+       <tr><td><b><xsl:value-of select="name(.)"/>:</b></td></tr>
        <xsl:for-each select="./*">
          <xsl:variable name="resource" select="./@rdf:resource"/>
          <tr>
-           <td/><td><xsl:value-of select="name(.)"/></td>
+           <td/><td><b><xsl:value-of select="name(.)"/>:</b></td>
            <td/><td>
              <xsl:if test="$resource">
                <xsl:variable name="rvalue"
@@ -49,7 +49,7 @@
   <xsl:template name="html">
     <html>
       <head>
-        <title>Full Display</title>
+        <title>BIBFRAME Full Display</title>
         <link href="css.css" rel="stylesheet"
               type="text/css" media="screen, all"/>
       </head>
       <xsl:for-each select="srw:records">
         <xsl:for-each select="srw:record">
           <div class="record">
-            <p>
-              <xsl:text>Record: </xsl:text>
+            <h4>
+              <xsl:text>Record </xsl:text>
               <xsl:value-of select="srw:recordPosition"/>
-              <xsl:text> : </xsl:text>
-              <xsl:value-of select="srw:recordSchema"/>
-              <xsl:text> : </xsl:text>
-              <xsl:value-of select="srw:recordPacking"/>
-           </p>
+           </h4>
             <p>
              <xsl:if test="srw:recordPacking='string'">
                <pre>
              </xsl:if>
 
              <form name="rawlink" method="get">
-               <input type="hidden" name="version" value="1.2"/>
+               <input type="hidden" name="version">
+                 <xsl:attribute name="value">
+                   <xsl:value-of
+                       select="//srw:echoedSearchRetrieveRequest/srw:version"/>
+                 </xsl:attribute>
+               </input>
                <input type="hidden" name="operation" value="searchRetrieve"/>
                <input type="hidden" name="query">
                  <xsl:attribute name="value">