Skip to content

Commit

Permalink
Provide more information about Attribute and RequestedAttribute errors.
Browse files Browse the repository at this point in the history
  • Loading branch information
iay committed May 25, 2011
1 parent e2f4a26 commit fa4626d
Showing 1 changed file with 22 additions and 4 deletions.
26 changes: 22 additions & 4 deletions build/check_saml2int.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -71,12 +71,21 @@
-->
<xsl:template match="saml:Attribute[not(@NameFormat)]">
<xsl:call-template name="error">
<xsl:with-param name="m">SAML2Int: Attribute element lacks NameFormat attribute</xsl:with-param>
<xsl:with-param name="m">
<xsl:text>Attribute </xsl:text>
<xsl:value-of select="@Name"/>
<xsl:text> lacks NameFormat attribute</xsl:text>
</xsl:with-param>
</xsl:call-template>
</xsl:template>
<xsl:template match="saml:Attribute[@NameFormat][not(@NameFormat='urn:oasis:names:tc:SAML:2.0:attrname-format:uri')]">
<xsl:call-template name="error">
<xsl:with-param name="m">SAML2Int: Attribute element has incorrect NameFormat attribute</xsl:with-param>
<xsl:with-param name="m">
<xsl:text>Attribute </xsl:text>
<xsl:value-of select="@Name"/>
<xsl:text> has incorrect NameFormat </xsl:text>
<xsl:value-of select="@NameFormat"/>
</xsl:with-param>
</xsl:call-template>
</xsl:template>

Expand All @@ -87,12 +96,21 @@
-->
<xsl:template match="md:RequestedAttribute[not(@NameFormat)]">
<xsl:call-template name="error">
<xsl:with-param name="m">SAML2IntX: RequestedAttribute element lacks NameFormat attribute</xsl:with-param>
<xsl:with-param name="m">
<xsl:text>(X) RequestedAttribute </xsl:text>
<xsl:value-of select="@Name"/>
<xsl:text> lacks NameFormat attribute</xsl:text>
</xsl:with-param>
</xsl:call-template>
</xsl:template>
<xsl:template match="md:RequestedAttribute[@NameFormat][not(@NameFormat='urn:oasis:names:tc:SAML:2.0:attrname-format:uri')]">
<xsl:call-template name="error">
<xsl:with-param name="m">SAML2IntX: RequestedAttribute element has incorrect NameFormat attribute</xsl:with-param>
<xsl:with-param name="m">
<xsl:text>(X) RequestedAttribute </xsl:text>
<xsl:value-of select="@Name"/>
<xsl:text> has incorrect NameFormat </xsl:text>
<xsl:value-of select="@NameFormat"/>
</xsl:with-param>
</xsl:call-template>
</xsl:template>

Expand Down

0 comments on commit fa4626d

Please sign in to comment.