[ Index ]

PHP Cross Reference of Unnamed Project

title

Body

[close]

/se3-wpkg/sources/www/bin/ -> mergeForum.xsl (source)

   1  <?xml version="1.0" encoding="iso-8859-1"?>
   2  <xsl:stylesheet xmlns:xsl = "http://www.w3.org/1999/XSL/Transform" version = "1.0" >
   3     <xsl:output method="xml" version="1.0" encoding="iso-8859-1" indent="yes" />
   4     <xsl:variable name="forumStable" select="/packages"/>
   5     <xsl:variable name="forumTest" select="document('/var/www/se3/wpkg/se3_wpkglist.php?branch=testing')/packages"/>
   6     <!-- 
   7      Concatène les fichiers xml se3_wpkglist.php et se3_wpkglist.php?branch=testing
   8      ## $Id: mergeForum.xsl 3577 2009-03-06 19:43:44Z jlebail $ ##
   9  
  10      xsltproc -o /var/www/se3/wpkg/forum.xml /var/www/se3/wpkg/bin/mergeForum.xsl 'se3_wpkglist.php'
  11      
  12     -->
  13  
  14      <xsl:template match="/">
  15          <!-- insère le noeud racine ( /packages )-->
  16          <xsl:element name = "packages" >
  17              <xsl:for-each select="$forumStable/package" >
  18                  <xsl:element name = "package" >
  19                      <xsl:attribute name="forum" >stable</xsl:attribute>
  20                      <xsl:apply-templates select = "@*"/>
  21                  </xsl:element>
  22              </xsl:for-each>
  23  
  24              <xsl:for-each select="$forumTest/package" >
  25                  <xsl:element name = "package" >
  26                      <xsl:attribute name="forum" >test</xsl:attribute>
  27                      <xsl:apply-templates select = "@*"/>
  28                  </xsl:element>
  29              </xsl:for-each>
  30  
  31          </xsl:element>
  32      </xsl:template>
  33      
  34      <xsl:template match="@*">
  35          <!-- recopie les attributs -->
  36          <xsl:copy />
  37      </xsl:template>
  38  
  39  </xsl:stylesheet>


Generated: Tue Mar 17 22:47:18 2015 Cross-referenced by PHPXref 0.7.1