Skip to content

Commit

Permalink
Display the scope (or primary scope) of members who have one recorded.
Browse files Browse the repository at this point in the history
  • Loading branch information
iay committed Aug 6, 2008
1 parent 911b969 commit 3a178c4
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions build/statistics.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -270,6 +270,7 @@
<th>IdPs</th>
<th>SPs</th>
<th>AIdP</th>
<th align="left">Scope</th>
</tr>
<xsl:apply-templates select="$members" mode="count">
<xsl:with-param name="entities" select="$entities"/>
Expand Down Expand Up @@ -413,6 +414,7 @@
<th>IdPs</th>
<th>SPs</th>
<th>AIdP</th>
<th align="left">Scope</th>
</tr>
<xsl:apply-templates select="$nonMembers" mode="count">
<xsl:with-param name="entities" select="$entities"/>
Expand Down Expand Up @@ -1079,6 +1081,7 @@
<xsl:param name="entities"/>
<xsl:variable name="myName" select="string(md:OrganizationName)"/>
<xsl:variable name="matched" select="$entities[md:Organization/md:OrganizationName = $myName]"/>
<xsl:variable name="scopes" select="members:Scopes/shibmeta:Scope"/>
<tr>
<td><xsl:value-of select="$myName"/></td>
<!-- count total entities -->
Expand Down Expand Up @@ -1127,6 +1130,23 @@
</xsl:otherwise>
</xsl:choose>
</td>
<!-- Scope or scopes -->
<td align="left">
<xsl:choose>
<xsl:when test="count($scopes) = 0">
&#160;
</xsl:when>
<xsl:when test="count($scopes) = 1">
<xsl:value-of select="$scopes"/>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="$scopes[position()=1]"/>
<br />
(<xsl:value-of select="count($scopes)-1"/> other
scope<xsl:if test="count($scopes) != 2">s</xsl:if>)
</xsl:otherwise>
</xsl:choose>
</td>
</tr>
</xsl:template>

Expand Down

0 comments on commit 3a178c4

Please sign in to comment.