Skip to content

Commit

Permalink
Check for distinct index values in AssertionConsumerService and Artif…
Browse files Browse the repository at this point in the history
…actResolutionService elements.
  • Loading branch information
iay committed Apr 21, 2010
1 parent 532d494 commit 07afc05
Showing 1 changed file with 35 additions and 0 deletions.
35 changes: 35 additions & 0 deletions build/check_misc.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,41 @@
</xsl:template>


<!--
Check for distinct index attributes on appropriate elements.
-->

<xsl:template match="md:SPSSODescriptor">
<xsl:variable name="indices" select="md:AssertionConsumerService/@index"/>
<xsl:variable name="distinct.indices" select="set:distinct($indices)"/>
<xsl:if test="count($indices) != count($distinct.indices)">
<xsl:call-template name="fatal">
<xsl:with-param name="m">AssertionConsumerService index values not all different</xsl:with-param>
</xsl:call-template>
</xsl:if>

<!--
Perform checks on child elements.
-->
<xsl:apply-templates/>
</xsl:template>

<xsl:template match="md:IDPSSODescriptor">
<xsl:variable name="indices" select="md:ArtifactResolutionService/@index"/>
<xsl:variable name="distinct.indices" select="set:distinct($indices)"/>
<xsl:if test="count($indices) != count($distinct.indices)">
<xsl:call-template name="fatal">
<xsl:with-param name="m">ArtifactResolutionService index values not all different</xsl:with-param>
</xsl:call-template>
</xsl:if>

<!--
Perform checks on child elements.
-->
<xsl:apply-templates/>
</xsl:template>


<!--
Check for role descriptors with missing KeyDescriptor elements.
-->
Expand Down

0 comments on commit 07afc05

Please sign in to comment.