cvs: phpweb /bin projects_inc.xsl
| From: | Jesus M. Castagnetto | Date: | Wed, 28 Feb 2001 23:49:43 +0000 |
| Subject: | cvs: phpweb /bin projects_inc.xsl | ||
| Groups: | php.mirrors | ||
| Request: | Send a blank email to php-mirrors+get-4092@lists.php.net to get a copy of this message | ||
jmcastagnetto Wed Feb 28 15:49:43 2001 EDT
Modified files:
/phpweb/bin projects_inc.xsl
Log:
Replaced some extaneous tabs in the XSLT, and added a xsl:if rule to
skip printing the match_count element from the XML output
Index: phpweb/bin/projects_inc.xsl
diff -u phpweb/bin/projects_inc.xsl:1.1 phpweb/bin/projects_inc.xsl:1.2
--- phpweb/bin/projects_inc.xsl:1.1 Wed Feb 28 15:29:30 2001
+++ phpweb/bin/projects_inc.xsl Wed Feb 28 15:49:43 2001
@@ -21,20 +21,22 @@
<!-- generating an array to be included and manipulated in projects.php -->
<xsl:template match="/">
<xsl:processing-instruction name="php">
- <xsl:text>
+ <xsl:text>
// Created using projects_inc.xsl and projects.xml, do not edit manually
- </xsl:text>
+ </xsl:text>
<xsl:apply-templates select="/search-results" />
- <xsl:text>
+ <xsl:text>
?</xsl:text></xsl:processing-instruction>
</xsl:template>
<xsl:template match="/search-results">
<!-- Loop through all the matches -->
<xsl:for-each select="match/*">
- <xsl:variable name="count" select="../match_count - 1" />
- $project[<xsl:value-of select="$count" />]["<xsl:value-of
- select="name()" />"]="<xsl:value-of select="."
/><xsl:text>";</xsl:text>
+ <xsl:variable name="count" select="../match_count - 1" />
+ <xsl:if test="name()!='match_count'">
+ $project[<xsl:value-of select="$count" />]["<xsl:value-of
+ select="name()" />"]="<xsl:value-of select="."
/><xsl:text>";</xsl:text>
+ </xsl:if>
</xsl:for-each>
</xsl:template>