Commits

bria...@CDL-BTINGLE-9.local  committed 80374f3

make physdesc creation a parameter option

  • Participants
  • Parent commits 139284d

Comments (0)

Files changed (2)

 
 - converts the country code to uppercase as per the schema
 
-- turns did/container/@label to did/physdesc
-  
+- turns did/container/@label to did/physdesc or removes the lables
+  depending on the value of stylesheet parameter label-to-physdesc
 
 Produced by the California Digital Library, Digital Special Collections
 	http://www.cdlib.org/services/dsc/
 
 <xsl:param name="namespace" select="'urn:isbn:1-931666-22-9'"/>
 
+<xsl:param name="label-to-physdesc"/> 
+
 <!-- root template -->
 <xsl:template match="/|comment()|processing-instruction()">
     <xsl:copy>
   <xsl:element name="{name()}" namespace="{$namespace}">
     <xsl:apply-templates select="@*[name()!='label'] | node() "/>
   </xsl:element>
-  <xsl:element name="physdesc" namespace="{$namespace}">
-    <xsl:value-of select="@label"/>
-  </xsl:element>
+  <xsl:if test="$label-to-physdesc">
+    <xsl:element name="physdesc" namespace="{$namespace}">
+      <xsl:value-of select="@label"/>
+    </xsl:element>
+  </xsl:if>
 </xsl:template>
 
 <!-- identity -->