Skip to content

Commit

Permalink
Remove redundant checks that will be caught by schema validation.
Browse files Browse the repository at this point in the history
Marked as corresponding to WD08, although the rules have not changed in this edition.
  • Loading branch information
iay committed Jul 19, 2011
1 parent 55b57a7 commit 7566c95
Showing 1 changed file with 1 addition and 61 deletions.
62 changes: 1 addition & 61 deletions build/check_mdui.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,8 @@
http://wiki.oasis-open.org/security/SAML2MetadataUI
This ruleset reflects WD06, 16-Nov-2010.
This ruleset reflects WD08, 17-Jul-2011.
Some of these rules are simply checks on schema validity; those can
probably be removed and replaced by direct checks against the schema.
They are marked with comments to that effect.
Author: Ian A. Young <ian@iay.org.uk>
-->
Expand Down Expand Up @@ -131,24 +127,6 @@
</xsl:template>


<!--
Section 2.1.2 Element <mdui:DisplayName>
-->
<xsl:template match="mdui:DisplayName">
<xsl:call-template name="localisedNameType"/>
</xsl:template>

<!--
Section 2.1.3 Element <mdui:Description>
-->
<xsl:template match="mdui:Description">
<xsl:call-template name="localisedNameType"/>
</xsl:template>

<!--
Section 2.1.4 Element <mdui:Keywords>
-->

<!--
Section 2.1.5 Element <mdui:Logo>
-->
Expand All @@ -163,44 +141,6 @@
<xsl:with-param name="m">mdui:Logo URL does not start with https://</xsl:with-param>
</xsl:call-template>
</xsl:if>
<!-- Schema validity: must have a height attribute -->
<xsl:if test="not(@height)">
<xsl:call-template name="error">
<xsl:with-param name="m">missing @height on <xsl:value-of select="name()"/></xsl:with-param>
</xsl:call-template>
</xsl:if>
<!-- Schema validity: must have a width attribute -->
<xsl:if test="not(@width)">
<xsl:call-template name="error">
<xsl:with-param name="m">missing @width on <xsl:value-of select="name()"/></xsl:with-param>
</xsl:call-template>
</xsl:if>
</xsl:template>

<!--
Section 2.1.6 Element <mdui:InformationURL>
-->
<xsl:template match="mdui:InformationURL">
<xsl:call-template name="localisedNameType"/>
</xsl:template>

<!--
Section 2.1.7 Element <mdui:PrivacyStatementURL>
-->
<xsl:template match="mdui:PrivacyStatementURL">
<xsl:call-template name="localisedNameType"/>
</xsl:template>

<!--
Common ruleset for elements derived from localisedNameType.
-->
<xsl:template name="localisedNameType">
<!-- Schema validity: must have an xml:lang attribute -->
<xsl:if test="not(@xml:lang)">
<xsl:call-template name="error">
<xsl:with-param name="m">missing @xml:lang on <xsl:value-of select="name()"/></xsl:with-param>
</xsl:call-template>
</xsl:if>
</xsl:template>

<!--
Expand Down

0 comments on commit 7566c95

Please sign in to comment.