[ Index ]

PHP Cross Reference of Unnamed Project

title

Body

[close]

/se3-wpkg/sources/www/bin/ -> mergePackage.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:param name="fichier">nomdefichierbidon</xsl:param>
   5     <xsl:param name="Appli"></xsl:param>
   6     <xsl:variable name="newPackages" select="/packages/package"/>
   7     <xsl:variable name="packages" select="document('/var/se3/unattended/install/wpkg/packages.xml')/packages"/>
   8     <!-- 
   9      Ajoute les données d'une application appli.xml à packages.xml
  10      les packages déja existants de packages.xml sont mis à jours (pas dupliqués)
  11     -->
  12      <xsl:variable name="AncienPaquets" select="$packages/package[@id != $Appli]" />
  13      <xsl:variable name="NouveauPaquet" select="$newPackages[@id = $Appli]" />
  14  
  15      <xsl:template match="/">
  16          <!-- insère le noeud racine ( /wpkg )-->
  17          <xsl:element name = "packages" >
  18              <xsl:comment >  Généré par SambaEdu. Ne pas modifier. Contient <xsl:value-of select="count($AncienPaquets) +count($NouveauPaquet)" /> applications </xsl:comment>
  19              <xsl:for-each select="$AncienPaquets | $NouveauPaquet">
  20                  <xsl:sort select="@id" />
  21                  <xsl:copy-of select="." />
  22              </xsl:for-each>
  23          </xsl:element>
  24      </xsl:template>
  25  </xsl:stylesheet>


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