xslt/specfiles.xsl
changeset 20 565e0daa124c
parent 6 678173477765
equal deleted inserted replaced
19:f720bde9865f 20:565e0daa124c
       
     1 <?xml version="1.0" encoding="UTF-8"?>
       
     2 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
       
     3   <xsl:strip-space elements="*"/>
       
     4   <xsl:output method="text"/>
       
     5 
       
     6   <xsl:param name="encumbered">false</xsl:param>
       
     7 
       
     8   <xsl:template match="/pkgs">
       
     9     <xsl:apply-templates/>
       
    10   </xsl:template>
       
    11 
       
    12   <xsl:template match="pkg">
       
    13     <xsl:if test="(not(@skip='true'))">
       
    14        <xsl:if test="($encumbered='true' and @encumbered='true') or ($encumbered!='true' and not(@encumbered='true'))">
       
    15 	 <xsl:choose>
       
    16 	   <xsl:when test="@filename">
       
    17 	     <xsl:value-of select="@filename"/>
       
    18 	   </xsl:when>
       
    19 	   <xsl:otherwise>
       
    20 	     <xsl:value-of select="./name"/>
       
    21 	     <xsl:text>.spec</xsl:text>
       
    22 	   </xsl:otherwise>
       
    23 	 </xsl:choose>
       
    24          <xsl:text>
       
    25 </xsl:text>
       
    26        </xsl:if>
       
    27     </xsl:if>
       
    28 
       
    29   </xsl:template>
       
    30 </xsl:stylesheet>