Commits

btingle  committed e6ccb72

don't bother answering questions you don't know the answer to

  • Participants
  • Parent commits cbe765c

Comments (0)

Files changed (1)

 <xsl:template match="ead:dsc[parent::ead:archdesc and position()=1]">
   <xsl:element name="{name()}">
     <xsl:apply-templates select="@*"/>
-    <xsl:if test="not(@type)">
+    <xsl:if test="not(@type) and $dsc-type!=''">
       <xsl:attribute name="type">
         <xsl:value-of select="$dsc-type"/>
       </xsl:attribute>
 <xsl:template match="ead:unitid[parent::ead:did and not(ancestor::ead:dsc)]">
   <xsl:element name="{name()}">
     <xsl:apply-templates select="@*"/>
-    <xsl:if test="not(@repositorycode)">
+    <xsl:if test="not(@repositorycode) and $repositorycode!=''">
       <xsl:attribute name="repositorycode">
         <xsl:value-of select="$repositorycode"/>
       </xsl:attribute>
     </xsl:if>
-    <xsl:if test="not(@countrycode)">
+    <xsl:if test="not(@countrycode) and $countrycode!=''">
       <xsl:attribute name="countrycode">
         <xsl:value-of select="$countrycode"/>
       </xsl:attribute>