<?xml version='1.0'?>
<!DOCTYPE xsl:stylesheet SYSTEM "../../../../lib/xml/xsl.dtd" >
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0" xmlns="http://www.w3.org/1999/xhtml" xmlns:x="http://www.w3.org/1999/xhtml">
 
 <xsl:template match="x:a[@href and not(text())]"/>
 
 <xsl:template match="x:h3">
  <xsl:copy>
   <xsl:apply-templates select="@*"/>
   <xsl:text>Q. </xsl:text><xsl:value-of select="substring-after(../@id,'FP_Q')"/><xsl:text>. </xsl:text>
   <xsl:apply-templates/>
  </xsl:copy>
 </xsl:template>
 
 <xsl:template match="x:h4">
  <xsl:copy>
   <xsl:apply-templates select="@*"/>
   <xsl:text>Q. </xsl:text><xsl:value-of select="substring-after(../../@id,'FP_Q')"/><xsl:text>. A. </xsl:text>
   <xsl:value-of select="substring-after(../@id,'_A')"/>
   <xsl:text>. </xsl:text>
   <xsl:apply-templates/>
  </xsl:copy>
 </xsl:template>
 
 <xsl:template match="x:div[@class='bilingual']">
  <xsl:copy>
   <xsl:apply-templates select="@*"/>
   <div class="eng"><xsl:apply-templates select="*[1]"/></div>
   <div class="lat"><xsl:apply-templates select="*[2]"/></div>
  </xsl:copy>
 </xsl:template>
 
 <xsl:template match="node()|@*">
  <xsl:copy>
   <xsl:apply-templates select="node()|@*"/>
  </xsl:copy>
 </xsl:template>
</xsl:stylesheet>
