mail-xsl.xml :
Code :
- <?xml version="1.0" encoding="UTF-8"?>
- <xsl:stylesheet version="1.0"
- xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
- xmlns="http://www.w3.org/TR/REC-html40">
- <xsl:output method="html" encoding="UTF-8"
- doctype-public="-//W3C//DTD HTML 4.01//EN"
- doctype-system="http://www.w3.org/TR/html4/strict.dtd" indent="yes" />
- <xsl:template match="/">
- <html xmlns="http://www.w3.org/1999/xhtml">
- <head>
- <meta http-equiv="Content-Type"
- content="text/html; charset=UTF-8" />
- <title>ARGUS - Dealer Request</title>
- </head>
- <body>
- <table border="0">
- <xsl:apply-templates select="subject" />
- </table>
- </body>
- </html>
- </xsl:template>
- <xsl:template match="subject">
- <tr align="left">
- <th>SUBJECT:</th>
- <td>
- <xsl:value-of select="." />
- </td>
- </tr>
- </xsl:template>
- </xsl:stylesheet>
|
mail.xml :
Code :
- <?xml version="1.0" encoding="UTF-8"?>
- <mail>
- <subject>Submit</subject>
- <body>
- <description>
- <correspondent>
- ...
|
mail.html désiré :
Code :
- <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Strict//EN" "http://www.w3.org/TR/html4/strict.dtd">
- <html>
- <head>
- <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
- <title>ARGUS - Request For Incident</title>
- </head>
- <body>
- <table border="0">
- <tr align="left">
- <th>SUBJECT:</th>
- <td>Submit</td>
- </tr>
- ...
|
Résultat HTML obtenu :
Code :
- <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
- <html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
- <title>ARGUS - Dealer Request</title></head><body><table border="0"></table></body></html>
|
Le
Code :
- <xsl:template match="subject">
|
n'est pas execute pourquoi ? Le contenu de <table></table> est vide .
Message édité par Giz le 20-11-2007 à 11:00:23
---------------
Asus P5Q Pro | C2D E8400 3GHz@4GHz + Noctua NH-C12P | 2x2Go Patriot Extreme PC-8500 | GeForce GTX 460@Stock 1Go GLH | Crucial SSD M4 64Go Sata3