Skip to content

Commit

Permalink
Migrate check for entity IDs containing space characters.
Browse files Browse the repository at this point in the history
  • Loading branch information
iay committed May 11, 2009
1 parent b181e9c commit 32328f5
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 15 deletions.
12 changes: 11 additions & 1 deletion build/check.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -64,14 +64,24 @@
</xsl:template>


<!--
Entity IDs should not contain space characters.
-->
<xsl:template match="md:EntityDescriptor[contains(@entityID, ' ')]">
<xsl:call-template name="fatal">
<xsl:with-param name="m">entity ID contains space character</xsl:with-param>
</xsl:call-template>
</xsl:template>


<!--
Common template to call to report a fatal error on some element within an entity.
-->
<xsl:template name="fatal">
<xsl:param name="m"/>
<xsl:message terminate='no'>
<xsl:text>*** </xsl:text>
<xsl:value-of select="ancestor::md:EntityDescriptor/@ID"/>
<xsl:value-of select="ancestor-or-self::md:EntityDescriptor/@ID"/>
<xsl:text>: </xsl:text>
<xsl:value-of select="$m"/>
</xsl:message>
Expand Down
15 changes: 1 addition & 14 deletions build/statistics.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -89,8 +89,6 @@
Look for some potential problems in the metadata. We need to do this
at the start so that we can include or exclude the associated section.
-->
<!-- spaces in entity IDs -->
<xsl:variable name="prob.space.entityID" select="$entities[contains(@entityID, ' ')]"/>
<!-- spaces in Locations -->
<xsl:variable name="prob.space.location" select="$entities[descendant::*[contains(@Location,' ')]]"/>

Expand Down Expand Up @@ -128,7 +126,7 @@
[@Binding!='urn:oasis:names:tc:SAML:profiles:SSO:idp-discovery-protocol']]"/>

<!-- all problems, used as a conditional -->
<xsl:variable name="prob.all" select="$prob.space.entityID | $prob.space.location |
<xsl:variable name="prob.all" select="$prob.space.location |
$prob.nohttps.location | $prob.discovery.binding.missing | $prob.discovery.binding.wrong |
$prob.dup.entityID | $prob.dup.ODNs | $prob.unowned.entities"/>
<xsl:variable name="prob.count" select="count($prob.all)"/>
Expand Down Expand Up @@ -161,17 +159,6 @@
-->
<xsl:if test="$prob.count != 0">
<h2><a name="problems">Metadata Problems</a></h2>
<xsl:if test="count($prob.space.entityID) != 0">
<p>The following entities have <code>entityID</code> attributes that include space characters:</p>
<ul>
<xsl:for-each select="$prob.space.entityID">
<li>
<xsl:value-of select="@ID"/>:
"<code><xsl:value-of select="@entityID"/></code>"
</li>
</xsl:for-each>
</ul>
</xsl:if>
<xsl:if test="count($prob.space.location) != 0">
<p>The following entities include elements with <code>Location</code> attributes
that include space characters:</p>
Expand Down

0 comments on commit 32328f5

Please sign in to comment.