Bioghist template

From DLXS Documentation

Jump to: navigation, search

Back to Changing the Bioghist labels

Templates to be added to text.components.xsl to suppress first <head> in <bioghist> because other code is already rendering it and without this code, the first <head> would display twice. See $DLXSROOT/web/d/demofa/text.components.xsl for complete example.

 <!-- We want to use the head  element to label the bioghist so we don't want to output it a second time
      This first template matches the first bioghist so the <head> is suppressed only for the first bioghist 
      there can be multiple bioghists within a bioghist the second template matches all bioghists 
      that are not the first
 -->

  <xsl:template match="bioghist[position()=1]">
     <xsl:apply-templates select="*[not(self::head)]"/>
   </xsl:template>
  

  <xsl:template match="bioghist">
       <xsl:apply-templates/>
  </xsl:template>

Personal tools