1<?xml version="1.0" encoding="UTF-8"?> 2 3<xsl:stylesheet version="1.0" 4 xmlns:xsl="http://www.w3.org/1999/XSL/Transform" 5 xmlns:rng="http://relaxng.org/ns/structure/1.0"> 6 7<xsl:output method="xml" indent="yes"/> 8 9<xsl:template match="/"> 10 <todo> 11 <xsl:for-each select="/stage3"> 12 <xsl:for-each select="attribute|element"> 13 <xsl:choose> 14 <xsl:when test="@qname and @resource='Properties' and not(file)"> 15 <xsl:copy-of select="."/> 16 </xsl:when> 17 <xsl:when test="@qname and file/status[number(@done) < 100 and number(@planned) > 0]"> 18 <xsl:copy> 19 <xsl:copy-of select="@*"/> 20 <xsl:copy-of select="file[status[number(@done) < 100 and number(@planned) > 0]]"/> 21 </xsl:copy> 22 </xsl:when> 23 </xsl:choose> 24 </xsl:for-each> 25 </xsl:for-each> 26 </todo> 27</xsl:template> 28 29</xsl:stylesheet>