Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
model:customcoll [2013/01/10 17:34]
giancarlo
model:customcoll [2013/01/10 17:53]
giancarlo
Line 264: Line 264:
       </xsl:when>       </xsl:when>
     </xsl:choose>     </xsl:choose>
 +  </xsl:template>
 +</xsl:stylesheet>
 +</code>
 +</WRAP>
 +
 +**__Repository statistics__**
 +  * DSID QUERY
 +
 +<code>
 +select $ordine $colle $titlecolle
 +count(
 + select $object
 + from <#ri>
 + where walk($object <fedora-rels-ext:isMemberOfCollection> $colle
 + and $libro <fedora-rels-ext:isMemberOfCollection> $object)
 + and $pagine <fedora-rels-ext:isMemberOf> $libro)
 +count(
 + select $libro
 + from <#ri>
 + where walk($object <fedora-rels-ext:isMemberOfCollection> $colle
 + and $libro <fedora-rels-ext:isMemberOfCollection> $object)
 + and $libro <fedora-model:hasModel> <info:fedora/islandora:bookCModel>)
 +count(
 + select $pagine
 + from <#ri>
 + where walk($object <fedora-rels-ext:isMemberOfCollection> $colle
 + and $libro <fedora-rels-ext:isMemberOfCollection> $object)
 + and $pagine <fedora-rels-ext:isMemberOf> $libro)
 +from <#ri>
 +where ((($colle <fedora-rels-ext:isMemberOfCollection> <info:fedora/islandora:root>
 +minus
 +$colle <mulgara:is> <info:fedora/openbess:collezioni>)
 +and $ordine <mulgara:is> '3')
 +or ($colle <fedora-rels-ext:isMemberOfCollection> <info:fedora/openbess:collezioni>
 +and $ordine <mulgara:is> '2')
 +or ($colle <mulgara:is> <info:fedora/islandora:root>
 +and $ordine <mulgara:is> '1'))
 +and $colle <dc:title> $titlecolle
 +order by $ordine $titlecolle
 +</code>
 +
 +  * DSID QUERYCOLLECTION_VIEW
 +
 +<WRAP prewrap center>
 +<code xml>
 +<?xml version="1.0"?>
 +<xsl:stylesheet xmlns:s="http://www.w3.org/2001/sw/DataAccess/rf1/result" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
 +  <xsl:template match="/">
 +    <xsl:variable name="BASEURL">
 +      <xsl:value-of select="$baseUrl"/>
 +    </xsl:variable>
 +    <table>
 +      <tr>
 +        <td>
 + </td>
 +        <td align="right">
 +        Pages
 + </td>
 +        <td align="right">
 +        Books
 + </td>
 +        <td align="right">
 +        Collections
 + </td>
 +      </tr>
 +      <xsl:for-each select="/s:sparql/s:results/s:result">
 +        <xsl:choose>
 +          <xsl:when test="s:ordine=1">
 +            <tr BGCOLOR="#E0E0E0" HEIGHT="50">
 +              <td>
 +                <b>
 +                  <xsl:value-of select="s:titlecolle"/>
 +                </b>
 +              </td>
 +              <td align="right">
 +                <b>
 +                  <xsl:value-of select="s:k2"/>
 +                </b>
 +              </td>
 +              <td align="right">
 +                <b>
 +                  <xsl:value-of select="s:k1"/>
 +                </b>
 +              </td>
 +              <td align="right">
 +                <b>
 +                  <xsl:value-of select="s:k0"/>
 +                </b>
 +              </td>
 +            </tr>
 +          </xsl:when>
 +          <xsl:when test="s:ordine=2">
 +            <tr BGCOLOR="#F0F0F0" HEIGHT="35">
 +              <td><xsl:value-of select="s:titlecolle"/> (BESS)
 +       </td>
 +              <td align="right">
 +                <xsl:value-of select="s:k2"/>
 +              </td>
 +              <td align="right">
 +                <xsl:value-of select="s:k1"/>
 +              </td>
 +              <td align="right">
 +                <xsl:value-of select="s:k0"/>
 +              </td>
 +            </tr>
 +          </xsl:when>
 +          <xsl:when test="s:ordine=3">
 +            <tr BGCOLOR="#E8E8E8" HEIGHT="35">
 +              <td>
 +                <xsl:value-of select="s:titlecolle"/>
 +              </td>
 +              <td align="right">
 +                <xsl:value-of select="s:k2"/>
 +              </td>
 +              <td align="right">
 +                <xsl:value-of select="s:k1"/>
 +              </td>
 +              <td align="right">
 +                <xsl:value-of select="s:k0"/>
 +              </td>
 +            </tr>
 +          </xsl:when>
 +        </xsl:choose>
 +      </xsl:for-each>
 +    </table>
   </xsl:template>   </xsl:template>
 </xsl:stylesheet> </xsl:stylesheet>
 
 
model/customcoll.txt ยท Last modified: 2013/01/10 17:53 by giancarlo

Developers: CNR IRCrES IT Office and Library
Giancarlo Birello (giancarlo.birello _@_ ircres.cnr.it) and Anna Perin (anna.perin _@_ ircres.cnr.it)
DigiBess is licensed under: Creative Commons License
Recent changes RSS feed Creative Commons License Valid XHTML 1.0 Valid CSS Driven by DokuWiki
Drupal Garland Theme for Dokuwiki