note 109219 added to function.spliti
| From: | max dot mueller dot 65 at gmx dot de | Date: | Wed, 27 Jun 2012 10:10:14 +0000 |
| Subject: | note 109219 added to function.spliti | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-188912@lists.php.net to get a copy of this message | ||
<xsl:template match="/fahrplan">
<html>
<head><title>Von <xsl:value-of select="@von"/> nach <xsl:value-of
select="@nach"/></title></head>
<body>
<h1>Von <xsl:value-of select="@von"/> nach <xsl:value-of
select="@nach"/></h1>
<ul><xsl:apply-templates select="verbindung"/></ul>
</body>
</html>
</xsl:template>
<xsl:template match="verbindung">
<xsl:if test="fn:count(umsteigen) < 3">
<li>
<b><xsl:value-of select="ab"/> - <xsl:value-of
select="an"/></b><br/>
Dauer: <xsl:value-of select="dauer"/> (<xsl:value-of
select="zug"/>, <xsl:value-of select="umsteigen/zug" separator=",
"/>)
</li>
</xsl:if>
</xsl:template>
<xsl:template match="/fluege">
<ul>
<xsl:for-each select="flug">
<li>
<xsl:value-of select="datum"/> (<xsl:value-of select="@id"/>)
<br/>
<xsl:variable name="von" select="von"/>
<xsl:variable name="nach" select="nach"/>
von <xsl:value-of select="/fluege/ort[@id = $von]"/> nach <xsl:value-of
select="/fluege/ort[@id = $nach]"/> <br/>
Klassen: <xsl:value-of select="klasse" separator=", "/>
</li>
</xsl:for-each>
</ul>
</xsl:template>
<xsl:template match="/history">
<html><head><title>Wetter</title></head>
<body>
<dl><xsl:apply-templates select="weather"/></dl>
<h3>Durchschnitt</h3>
<xsl:value-of select="fn:format-number(sum(weather/rain) div
count(weather/rain),'0.0')"/>
</body>
</html>
</xsl:template>
<xsl:param name="art">C</xsl:param>
<xsl:template match="weather">
<dt><xsl:value-of select="@measured"/></dt>
<xsl:choose>
<xsl:when test="$art='F'">
<dd><xsl:value-of select="((temperature*9) div 5 )+32"/> F</dd>
</xsl:when>
<xsl:otherwise>
<dd><xsl:value-of select="temperature"/> <xsl:value-of
select="temperature/@unit"/></dd>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
<xsl:param name="isin"></xsl:param>
<xsl:template match="/aktien">
<html><head><title>Aktien</title></head>
<body><xsl:apply-templates select="aktie"/></body>
</html>
</xsl:template>
<xsl:template match="aktie">
<xsl:choose>
<xsl:when test="(@isin = $isin) or ($isin = '')">
<p>
Name: <xsl:value-of select="name"/><br/>
Mittelwert: <xsl:value-of select="fn:format-number(sum(kurse/kurs/ausgabepreis) div
count(kurse/kurs),'0.00')"/>
</p>
</xsl:when>
</xsl:choose>
</xsl:template>
</xsl:stylesheet>
----
Server IP: 212.124.37.9
Probable Submitter: 95.90.226.94
----
Manual Page -- http://www.php.net/manual/en/function.spliti.php
Edit -- https://master.php.net/note/edit/109219
Del: integrated -- https://master.php.net/note/delete/109219/integrated
Del: useless -- https://master.php.net/note/delete/109219/useless
Del: bad code -- https://master.php.net/note/delete/109219/bad+code
Del: spam -- https://master.php.net/note/delete/109219/spam
Del: non-english -- https://master.php.net/note/delete/109219/non-english
Del: in docs -- https://master.php.net/note/delete/109219/in+docs
Del: other reasons-- https://master.php.net/note/delete/109219
Reject -- https://master.php.net/note/reject/109219
Search -- https://master.php.net/manage/user-notes.php