Skip to content

Commit

Permalink
Detect entities with Location attributes that don't start with "http".
Browse files Browse the repository at this point in the history
  • Loading branch information
iay committed Aug 8, 2007
1 parent 2d6c4fe commit b0f8b7e
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions build/statistics.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,8 @@
<xsl:variable name="prob.space.entityID" select="$entities[contains(@entityID, ' ')]"/>
<!-- spaces in Locations -->
<xsl:variable name="prob.space.location" select="$entities[descendant::*[contains(@Location,' ')]]"/>
<!-- Locations that don't start with http, at least -->
<xsl:variable name="prob.nohttp.location" select="$entities[descendant::*[@Location and not(starts-with(@Location,'http'))]]"/>
<!-- duplicate entity IDs -->
<xsl:variable name="prob.distinct.entityIDs" select="set:distinct($entities/@entityID)"/>
<xsl:variable name="prob.dup.entityID"
Expand All @@ -101,6 +103,7 @@
<xsl:variable name="prob.unowned.entities" select="set:difference($entities, $ownedEntities)"/>
<!-- all problems, used as a conditional -->
<xsl:variable name="prob.all" select="$prob.space.entityID | $prob.space.location |
$prob.nohttp.location |
$prob.dup.entityID | $prob.unowned.entities"/>
<xsl:variable name="prob.count" select="count($prob.all)"/>

Expand Down Expand Up @@ -155,6 +158,18 @@
</xsl:for-each>
</ul>
</xsl:if>
<xsl:if test="count($prob.nohttp.location) != 0">
<p>The following entities include elements with <code>Location</code> attributes
that don't start with <code>http</code>:</p>
<ul>
<xsl:for-each select="$prob.nohttp.location">
<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.dup.entityID) != 0">
<p>The following entity names are used by more than one entity:</p>
<ul>
Expand Down

0 comments on commit b0f8b7e

Please sign in to comment.