From: eh@BEC.CH
Date: 28/02/2001 - 13:57
Qui peu m'aider.J'ai récupéré une XSL qui ne me satisfait pas. Je voudrai
simplement la simplifier pour obtenir un tableau 2 colonnes et qui ne me
remplisse pas la ligne dont le champ "content" égal 0.0000.
Fichier XSL:
<?xml version="1.0" encoding="ISO-8859-1"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/TR/WD-xsl">
<xsl:template match="/">
<html>
<head>
<title>
<xsl:value-of
select="recordset/row/field/content"/>
</title>
<style>
.stdText {
font-Family:ariel;
font-Size: 12px;
}
</style>
<IMG SRC="image.gif"/>
</head>
<body>
<h1>
<xsl:value-of
select="recordset/row/field/content"/>
</h1>
<table BORDER="3" CELLSPACING="2"
CELLPADDING="6">
<col bgcolor="yellow"/>
<THEAD align="left"
bgcolor="silver">
<TH>Name</TH>
<TH>Description</TH>
</THEAD>
<xsl:for-each
select="recordset/row/field">
<xsl:if
test="@name[.!='Name']">
<xsl:if
test="content[.!='0.0000']">
<tr>
<td
class="stdText" valign="top" width="20%">
<xsl:value-of select="@name"/>
</td>
<td
class="stdText" valign="top" width="80%">
<xsl:value-of select="content"/>
</td>
</tr>
</xsl:if>
</xsl:if>
</xsl:for-each>
</table>
</body>
<br/>
</html>
</xsl:template>
</xsl:stylesheet>
Fichier XML:
<?xml version="1.0" encoding="ISO-8859-1"?>
<?xml-stylesheet type="text/xsl" href="NibStyle.xsl"?>
<recordset total="1">
<row id="1">
<field name="Name">
<content>TSX</content>
</field>
<field name="FullName">
<content>Trading System Extended</content>
</field>
<field name="Status">
<content>P0</content>
</field>
<field name="OS">
<content>0.0000</content>
</field>
</row>
</recordset>
> --
> Eric HARTMANN
> Information System Engineer
> Private Banking
> EDS Information Business SARL
>
> Banque Edouard Constant
> E-mail: eh@bec.ch
> Tel.: +41 22 787 35 22
> Fax: +41 (0) 22 787 33 16 (not confidential)
> Standard disclaimers apply
>
-----------------------------------------------------------------------------
This message should only be read by the addressee. It expresses the views of the sender and by no means those of Banque Edouard Constant S.A. (hereafter "the Bank").
Any opinions, conclusions or information no matter their nature expressed in this message shall not be considered as being supplied, provided, given or endorsed by the Bank unless otherwise indicated in a separate written confirmation (non-E-mail), referring to the message sent, validly signed by the Bank. Unless such confirmation has been provided to and received by the addressee, this message is not binding on the bank.
If you receive this E-mail by error, please destroy it and delete it from your computer immediately and notify us. No copies can be made.
Any form of reproduction, dissemination, copying, disclosure, duplication, modification, alteration, appropriation, distribution, withholding, diverting, redirecting, delivering, deviating, and/or publication of this message is strictly prohibited whether partially or not, and no matter the mean.
--
Devenez redacteur <XML>fr et contribuez au developpement du
xml francophone (http://xmlfr.org/infos/redacteurs/) !
Liste de diffusion "xml-tech@xmlfr.org" (http://xmlfr.org).
Cette liste est a votre disposition pour discuter en francais de
tout sujet technique lie a XML.
Pour resilier votre abonnement, envoyez un message contenant
la commande "unsubscribe" a xml-tech-request@xmlfr.org
(mailto:xml-tech-request@xmlfr.org?Subject=unsubscribe)
Archive générée par hypermail 2.1.3 le 28/06/2004 - 11:05 UTC
webmaster@xmlfr.org
|