Skip to content

Commit

Permalink
Add future check whether md:OrganizationDisplayname matches mdui:Disp…
Browse files Browse the repository at this point in the history
…layName for SPs

See ukf/ukf-data#325
  • Loading branch information
Alex Stuart committed Feb 27, 2018
1 parent 8908069 commit 2bebbc1
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions mdx/_rules/check_future_2.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,27 @@
-->
<xsl:import href="check_framework.xsl"/>

<!--
Check whether md:OrganizationDisplayname matches mdui:DisplayName for SPs
See ukf/ukf-data#325
-->
<xsl:template match="md:EntityDescriptor[md:SPSSODescriptor]">
<xsl:variable name="mdui" select="md:SPSSODescriptor/md:Extensions/mdui:UIInfo/mdui:DisplayName[@xml:lang='en']"/>
<xsl:variable name="odn" select="md:Organization/md:OrganizationDisplayName[@xml:lang='en']"/>
<xsl:if test="$mdui and $odn and $mdui != $odn">
<xsl:call-template name="error">
<xsl:with-param name="m">
<xsl:text>mismatched xml:lang='en' DisplayNames: '</xsl:text>
<xsl:value-of select="$mdui"/>
<xsl:text>' in mdui vs. '</xsl:text>
<xsl:value-of select="$odn"/>
<xsl:text>' in ODN</xsl:text>
</xsl:with-param>
</xsl:call-template>
</xsl:if>
</xsl:template>

</xsl:stylesheet>

0 comments on commit 2bebbc1

Please sign in to comment.