Skip to content

Commit

Permalink
Don't deduce primary scope as being the first scope mentioned, have i…
Browse files Browse the repository at this point in the history
…t be explicitly denoted by an attribute. Take the first such scope mentioned for a member, ignore all others. Stats page displays primary scope in fixed pitch font now. Adjust actual metadata for iay.org.uk to suit the above.
  • Loading branch information
iay committed Aug 7, 2008
1 parent 2ce7407 commit 39eb798
Showing 1 changed file with 4 additions and 10 deletions.
14 changes: 4 additions & 10 deletions build/statistics.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -1081,7 +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/members:Scope"/>
<xsl:variable name="primaryScope" select="members:Scopes/members:Scope[@isPrimary='true'][position()=1]"/>
<tr>
<td><xsl:value-of select="$myName"/></td>
<!-- count total entities -->
Expand Down Expand Up @@ -1130,20 +1130,14 @@
</xsl:otherwise>
</xsl:choose>
</td>
<!-- Scope or scopes -->
<!-- Primary Scope, if present -->
<td align="left">
<xsl:choose>
<xsl:when test="count($scopes) = 0">
<xsl:when test="count($primaryScope) = 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>)
<code><xsl:value-of select="$primaryScope"/></code>
</xsl:otherwise>
</xsl:choose>
</td>
Expand Down

0 comments on commit 39eb798

Please sign in to comment.