<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">

    <xsl:template match="comps">
        <comps>


            <xsl:for-each select="category">
                <category>
                    <id>
                        <xsl:value-of select="id"/>
                    </id>
                    <xsl:for-each select="name">
                        <xsl:if test="not(lang(attribute::node()))">
                            <name>
                                <xsl:value-of select="."/>
                            </name>
                        </xsl:if>
                    </xsl:for-each>

                    <xsl:for-each select="description">
                        <xsl:if test="not(lang(attribute::node()))">
                            <description>
                                <xsl:value-of select="."/>
                            </description>
                        </xsl:if>
                    </xsl:for-each>

                    <xsl:for-each select="grouplist">
                        <grouplist>
                            <xsl:for-each select="groupid">
                                <groupid>
                                    <xsl:value-of select="node()"/>
                                </groupid>
                            </xsl:for-each>
                        </grouplist>
                    </xsl:for-each>
                </category>
            </xsl:for-each>


            <xsl:for-each select="group">
                <group>
                    <id>
                        <xsl:value-of select="id"/>
                    </id>
                    <xsl:for-each select="name">
                        <xsl:if test="not(lang(attribute::node()))">
                            <name>
                                <xsl:value-of select="."/>
                            </name>
                        </xsl:if>
                    </xsl:for-each>

                    <xsl:for-each select="description">
                        <xsl:if test="not(lang(attribute::node()))">
                            <description>
                                <xsl:value-of select="."/>
                            </description>
                        </xsl:if>
                    </xsl:for-each>

                    <default>
                        <xsl:value-of select="default"/>
                    </default>

                    <xsl:for-each select="packagelist">
                        <packagelist>
                            <xsl:for-each select="packagereq">
                                <packagereq>
                                    <xsl:attribute name="type">
                                        <xsl:value-of select="attribute::node()"/>
                                    </xsl:attribute>
                                    <xsl:value-of select="node()"/>
                                </packagereq>
                            </xsl:for-each>
                        </packagelist>
                    </xsl:for-each>



                </group>

            </xsl:for-each>

        </comps>
    </xsl:template>

</xsl:stylesheet>
