Skip to content

Commit

Permalink
Fix $e issue resulting in duplicately defined variable.
Browse files Browse the repository at this point in the history
  • Loading branch information
kefo committed Jan 20, 2023
1 parent e4c1654 commit 110e9ed
Showing 1 changed file with 29 additions and 23 deletions.
52 changes: 29 additions & 23 deletions rules/09-7XX.xml
Original file line number Diff line number Diff line change
Expand Up @@ -195,29 +195,35 @@
</case>
</switch>

<sf code="e">
<var name="vRelationLabel" xpath="ancestor::node()/bf:role/bf:Role/rdfs:label|ancestor::node()/bf:role/bf:Role/madsrdf:authoritativeLabel" />
<transform><xsl:value-of select="translate($vRelationLabel, $upper, $lower)" /></transform>
</sf>
<select xpath="ancestor::node()/bf:role/bf:Role[not(rdfs:label) and not(madsrdf:authoritativeLabel)]/@rdf:about | ancestor::node()/bf:role/@rdf:resource">
<var name="vRelationURI">
<switch>
<case test="contains(.,'id.loc.gov/')"><transform><xsl:value-of select="."/></transform></case>
</switch>
</var>
<var name="vRelationLabel">
<switch>
<case test="$vRelationURI != ''">
<transform>
<xsl:call-template name="tGetLabel">
<xsl:with-param name="pUri" select="$vRelationURI"/>
</xsl:call-template>
</transform>
</case>
</switch>
</var>
<sf code="e" xpath="translate($vRelationLabel, $upper, $lower)" />
</select>
<switch>
<case test="ancestor::node()/bf:role/bf:Role[rdfs:label or madsrdf:authoritativeLabel]">
<sf code="e">
<var name="vRelationLabel" xpath="ancestor::node()/bf:role/bf:Role/rdfs:label|ancestor::node()/bf:role/bf:Role/madsrdf:authoritativeLabel" />
<transform><xsl:value-of select="translate($vRelationLabel, $upper, $lower)" /></transform>
</sf>
</case>
<case test="ancestor::node()/bf:role/bf:Role[not(rdfs:label) and not(madsrdf:authoritativeLabel)]/@rdf:about or ancestor::node()/bf:role/@rdf:resource">
<select xpath="ancestor::node()/bf:role/bf:Role[not(rdfs:label) and not(madsrdf:authoritativeLabel)]/@rdf:about | ancestor::node()/bf:role/@rdf:resource">
<var name="vRelationURI">
<switch>
<case test="contains(.,'id.loc.gov/')"><transform><xsl:value-of select="."/></transform></case>
</switch>
</var>
<var name="vRelationLabel">
<switch>
<case test="$vRelationURI != ''">
<transform>
<xsl:call-template name="tGetLabel">
<xsl:with-param name="pUri" select="$vRelationURI"/>
</xsl:call-template>
</transform>
</case>
</switch>
</var>
<sf code="e" xpath="translate($vRelationLabel, $upper, $lower)" />
</select>
</case>
</switch>

<switch>
<case test="ancestor::node()/bf:role/bf:Role/@rdf:about or ancestor::node()/bf:role/@rdf:resource">
Expand Down

0 comments on commit 110e9ed

Please sign in to comment.