Blame | Last modification | View Log | RSS feed
<?xml version="1.0" encoding="iso-8859-1"?><xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"><xsl:output method="html" encoding="iso-8859-1" version="1.0" standalone="yes" indent="yes" /><xsl:template match="/"><?php$y = 700 ;$pdf = pdf_new() ;pdf_open_file($pdf);pdf_begin_page($pdf, 595, 842);pdf_set_font($pdf, "Courier", 20, "host");pdf_set_value($pdf, "textrendering", 0);pdf_show_boxed($pdf, "Fiche d'identité d'un taxon", 50, 750,500,60,"center");pdf_set_font($pdf, "Courier", 12, "host") ;pdf_show_boxed($pdf, "Nom valide :", 50, 700,500,40,"left");pdf_moveto($pdf, 50, 690);pdf_lineto($pdf, 330, 690);pdf_stroke($pdf);<xsl:apply-templates/></xsl:template><xsl:template match="FICHE_IDENTITES_TAXONS"><xsl:if test="not(NOM_VALIDE) and not(LISTE_NOMS_VALIDES)">$y = $y - 50 ;pdf_show_boxed($pdf, "Il n'existe aucun nom valide pour ce taxon relativement à laclassification", 40, $y, 500,50, "left") ;</xsl:if><xsl:apply-templates select ="NOM_VALIDE"/><xsl:apply-templates select ="LISTE_NOMS_VALIDE"/><xsl:apply-templates select ="LISTE_NOMS_TAXONS_PARENTS"/><xsl:apply-templates select ="LISTE_SYNONYMES"/><xsl:apply-templates select ="LISTE_NOMS_VERNACULAIRES"/>pdf_end_page($pdf);pdf_close($pdf) ;$data = pdf_get_buffer($pdf);header("Content-type: application/pdf");header("Content-Disposition: inline; filename=test.pdf");header("Content-length : ".strlen($data)) ;echo $data ;?></xsl:template><xsl:template match="NOM_VALIDE"><xsl:apply-templates select="NOM_TAXON"/></xsl:template><xsl:template match="LISTE_NOMS_VALIDES"><tr class="fieldLabel"><td>Nom valide:</td></tr><tr class="text"><td><UL><xsl:apply-templates select="NOM_TAXON" /></UL></td></tr></xsl:template><xsl:template match="LISTE_NOMS_TAXONS_PARENTS">$y = $y - 50 ;pdf_show_boxed($pdf,"Niveaux taxonomiques supérieurs:",40,$y,500,50,"left") ;<xsl:apply-templates select="NOM_TAXON_PARENTS/NOM_TAXON" mode="parent"/></xsl:template><xsl:template match="LISTE_SYNONYMES">$y = $y - 50 ;pdf_show_boxed($pdf,"Liste des synonymes :",40,$y,500,50,"left") ;<xsl:apply-templates select="NOM_TAXON"/></xsl:template><xsl:template match="LISTE_NOMS_VERNACULAIRES">$y = $y - 50 ;pdf_show_boxed($pdf,"Noms communs :",40,$y,500,50,"left") ;<xsl:apply-templates select="NOM_VERNACULAIRE" /></xsl:template><xsl:template match="NOM_TAXON"><xsl:apply-templates select="NOM"/></xsl:template><xsl:template match="NOM_TAXON" mode="parent"><xsl:apply-templates select="NOM"/></xsl:template><xsl:template match="NOM">$y = $y - 20 ;pdf_show_boxed($pdf,"<xsl:value-of select="@type"/><xsl:value-of select="."/> <xsl:value-of select="@auteur"/>",40,$y,500,50,"left") ;</xsl:template><xsl:template match="NOM_VERNACULAIRE">$y = $y -50 ;pdf_show_boxed($pdf,"<xsl:value-of select="@langue"/> : <xsl:value-of select="."/>(<xsl:value-of select="@pays"/>) <xsl:choose><xsl:when test="@emploi='0'">recommandé ou typique</xsl:when><xsl:when test="@emploi='1'">secondaire ou regional</xsl:when><xsl:when test="@emploi='2'">peu usité et à éviter</xsl:when></xsl:choose>",40,$y,500,50,"left") ;</xsl:template></xsl:stylesheet>