Edit report at https://bugs.php.net/bug.php?id=1&edit=1

 ID:                 1
 Comment by:         billhansachim at gmail dot com
 Reported by:        rasmus at lerdorf dot on dot ca
 Summary:            Apache 1.3b3 + mod_php3 is slow
 Status:             Not a bug
 Type:               Bug
 Package:            *General Issues
 Operating System:   Solaris 2.5.1
 PHP Version:        3.0b3
 Block user comment: N
 Private report:     N

 New Comment:

<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform";>


<xsl:param name="von">0</xsl:param>
<xsl:param name="bis">9999</xsl:param>
        <xsl:template match="/buchhandel">
                <xsl:for-each-group 
select="buch[(@ersch-jahr&gt;$von)and(@ersch-
jahr&lt;$bis)]" group-by="@ersch-jahr">
                        <xsl:sort select="@ersch-jahr"/>
                        <p>
                                <b><xsl:value-of select="current-grouping-
key()"/></b><br/>
                                <xsl:for-each select="current-group()">
                                        <xsl:value-of select="position()"/>
<xsl:text>. </xsl:text><xsl:value-of select="buchtitel"/><br/>          
                                </xsl:for-each> 
                        </p>
                </xsl:for-each-group>
        </xsl:template>
        <xsl:param name="ausrichtung">right</xsl:param>
        <xsl:template match="/buchhandel">
                <html><head><title>jop</title><style>.reisen {background-color: 
green;}</style></head>
                <body>
                        <xsl:apply-templates select="buch"/>
                </body>
                </html>
                <xsl:apply-templates select="buch">
                        <xsl:sort select="preis" data-type="number"/>
                </xsl:apply-templates>
                <xsl:for-each select="buch">
                        <xsl:sort select="buchtitel" data-type="text"/>
                        <p><xsl:value-of select="buchtitel"/><xsl:text> 
</xsl:text></p>
                </xsl:for-each>
                <xsl:for-each-group select="buch" group-by="buchverlag">
                        <p><b><xsl:value-of 
select="current-grouping-key()"/></b>
</p>
                        <p><xsl:value-of select="current-group()/buchtitel" 
separator=", "/></p>
                </xsl:for-each-group>
        </xsl:template>
        <xsl:template match="buch">
                <xsl:element name="p">
                        <xsl:attribute name="class" select="@kat" />
                        <xsl:value-of select="buchtitel"/><xsl:text> </xsl:text>
                        <xsl:value-of select="buchverlag"/><xsl:text> 
</xsl:text>
                        <xsl:value-of select="preis"/>
                </xsl:element>
        </xsl:template>
        <xsl:template match="buch">
                <p style="text-align:{$ausrichtung}">
                        <xsl:value-of select="buchtitel"/><xsl:text> </xsl:text>
                        <xsl:value-of select="buchverlag"/><xsl:text> 
</xsl:text>
                        <xsl:value-of select="preis"/>
                </p>
        </xsl:template>
        <xsl:template match="buch">
                <p>
                        <xsl:value-of select="buchtitel"/><xsl:text> </xsl:text>
                        <xsl:value-of select="buchverlag"/><xsl:text> 
</xsl:text>
                        <xsl:call-template name="preis_template">
                                <xsl:with-param name="preis" select="preis"/>   
                        
                        </xsl:call-template>
                </p> 
        </xsl:template>
        <xsl:template name="preis_template">
                <xsl:param name="preis"/>
                        <xsl:choose>
                                <xsl:when test="preis/@waehrung='Dollar'">
                                        <xsl:value-of select="format-
number($preis*0.68054,'0.00')"/> EUR
                                                (<xsl:value-of 
select="$preis"/> 
Dollar)                                 
                                </xsl:when>
                                <xsl:otherwise>
                                        <xsl:value-of select="$preis"/> EUR
                                </xsl:otherwise>
                        </xsl:choose>
        </xsl:template>
        <!-- done down -->
        <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) &lt; 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>


Previous Comments:
------------------------------------------------------------------------
[2012-05-30 22:23:14] nico...@php.net

Automatic comment from SVN on behalf of nicolas
Revision: http://svn.php.net/viewvc/?view=revision&amp;revision=325902
Log: Fix github issue #1, Ref. https://github.com/orieg/php-judy/issues/1

------------------------------------------------------------------------
[2011-11-11 14:43:58] se...@php.net

Automatic comment from SVN on behalf of seros
Revision: http://svn.php.net/viewvc/?view=revision&amp;revision=319056
Log: Example #1 was wrong

------------------------------------------------------------------------
[2011-03-25 09:52:21] der...@php.net

testiung

------------------------------------------------------------------------
[2011-03-23 17:08:32] z...@php.net

test

------------------------------------------------------------------------
[2011-01-06 02:41:39] ahar...@php.net

Automatic comment from SVN on behalf of aharvey
Revision: http://svn.php.net/viewvc/?view=revision&amp;revision=307144
Log: Fix doc bug #53660 (There is an error in the code provided in Example #1).

------------------------------------------------------------------------


The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at

    https://bugs.php.net/bug.php?id=1


-- 
Edit this bug report at https://bugs.php.net/bug.php?id=1&edit=1

Reply via email to