view summa/bilingual/fixup_e.xsl @ 113:26a80064e75a

through FS Q54
author ht
date Sat, 17 Nov 2018 15:43:27 +0000
parents 77921d86a058
children
line wrap: on
line source

<?xml version='1.0'?>
<!DOCTYPE doc SYSTEM "../../../../lib/xml/xsl.dtd" >
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="2.0" xmlns:x="http://www.w3.org/1999/xhtml" exclude-result-prefixes="x" xmlns="http://www.w3.org/1999/xhtml">
 
 <xsl:output method="xhtml"/>
 
 <xsl:template match="x:p[not(text())]"/><!-- These mess up the count later -->
 
 <xsl:template match="node()|@*">
  <xsl:copy>
   <xsl:apply-templates select="node()|@*"/>
  </xsl:copy>
 </xsl:template>
 
 <xsl:template match="x:div[@class='div3']">
  <!-- Doc elt.
     Collect the splayed out questions at the beginning of each Question 
     (Loses some empty <a...> at the beginning -->
  <xsl:copy>
   <xsl:apply-templates select="@*"/>
   <xsl:text>&#10;</xsl:text>
   <xsl:apply-templates select="x:h3"/>
   <xsl:text>&#10;</xsl:text>
   <div class="div4">
    <xsl:text>&#10;</xsl:text>
     <xsl:apply-templates select="x:p"/>
    <xsl:text>&#10;</xsl:text>
   </div>
   <xsl:text>&#10;</xsl:text>
   <xsl:apply-templates select="x:div"/>
  </xsl:copy>
 </xsl:template>
</xsl:stylesheet>