atoulme | b0f0e50 | 2009-01-21 17:27:25 +0000 | [diff] [blame] | 1 | <?xml version="1.0" encoding="UTF-8" ?> |
| 2 | <xsl:stylesheet |
| 3 | version="1.0" |
| 4 | xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> |
| 5 | |
| 6 | <xsl:output indent="yes" /> |
| 7 | |
| 8 | <!-- Copy all elements with their attributes --> |
| 9 | <xsl:template match="@*|node()"> |
| 10 | <xsl:copy> |
| 11 | <xsl:apply-templates select="@*|node()"/> |
| 12 | </xsl:copy> |
| 13 | </xsl:template> |
| 14 | |
| 15 | <!-- Copy <required> elements belonging to nl feature groups, adding "optional" attribute --> |
| 16 | <xsl:template match="unit[contains(@id,'.nl') and contains(@id,'.feature.group')]/requires/required[not(contains(@name,'.feature.jar'))]"> |
| 17 | <xsl:copy> |
| 18 | <xsl:copy-of select="@*"/> |
| 19 | <xsl:attribute name="optional">true</xsl:attribute> |
| 20 | <xsl:apply-templates/> |
| 21 | </xsl:copy> |
| 22 | </xsl:template> |
| 23 | |
| 24 | <!-- Copy <required> elements belonging to nl plugins, adding "greedy" attribute --> |
| 25 | <xsl:template match="unit[contains(@id,'.nl') and not(contains(@id,'.feature.group'))]/requires/required"> |
| 26 | <xsl:copy> |
| 27 | <xsl:copy-of select="@*"/> |
| 28 | <xsl:attribute name="greedy">false</xsl:attribute> |
| 29 | <xsl:apply-templates/> |
| 30 | </xsl:copy> |
| 31 | </xsl:template> |
| 32 | |
| 33 | </xsl:stylesheet> |