[ Index ]

PHP Cross Reference of Unnamed Project

title

Body

[close]

/se3-wpkg/sources/www/bin/ -> addPackages.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     <!--     Ajoute les packages définis dans profiles.xml à ceux existant dans profiles.xml.tmp 
   5     
   6              ## $Id: addPackages.xsl 2559 2007-11-04 00:24:40Z jlebail $ ##
   7     -->
   8     <xsl:variable name="PROFILES" select="document('/var/se3/unattended/install/wpkg/profiles.xml')/profiles"/>
   9  
  10      <xsl:template match="*">
  11          <!-- recopie le noeud -->
  12          <xsl:copy>
  13              <xsl:apply-templates select="@*" />
  14              <xsl:apply-templates select="comment()|processing-instruction()" />
  15              <xsl:apply-templates select="*"/>
  16          </xsl:copy>
  17      </xsl:template>
  18  
  19      <xsl:template match="@*">
  20          <!-- recopie les attributs -->
  21          <xsl:copy />
  22      </xsl:template>
  23  
  24      <xsl:template match="comment()|processing-instruction()">
  25          <xsl:copy />
  26      </xsl:template>
  27  
  28      <xsl:template match="/profiles/profile">
  29          <!-- recupère les packages associés depuis profiles.xml -->
  30          <xsl:variable name="profilId" select="@id"/>
  31          <xsl:variable name="packagesDeCeProfil" select="$PROFILES/profile[@id=$profilId]/package"/>
  32          <xsl:copy>
  33              <xsl:apply-templates select="@*" />
  34              <xsl:apply-templates select="comment()|processing-instruction()" />
  35              <xsl:if test="$packagesDeCeProfil">
  36                  <xsl:for-each select="$packagesDeCeProfil">
  37                      <xsl:copy >
  38                          <xsl:apply-templates select="@*" />
  39                      </xsl:copy>
  40                  </xsl:for-each>
  41              </xsl:if>
  42              <xsl:apply-templates select="*" />
  43          </xsl:copy>
  44      </xsl:template>
  45      
  46  </xsl:stylesheet>


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