<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet 
    xmlns:xsl="http://www.w3.org/1999/XSL/Transform" 
    xmlns:n="http://java.sun.com/xml/ns/j2ee" 
    xmlns="http://java.sun.com/xml/ns/j2ee"
    exclude-result-prefixes="xsl n"
    version="1.0">
    
    <xsl:output encoding="ISO-8859-1" indent="yes" method="xml"/>
    
    <xsl:param name="specific-filename"/>
    
    <xsl:variable name="specificities" select="document($specific-filename)"/>
    
    <xsl:template match="n:web-app">
        <xsl:copy>
            <xsl:for-each select="@*"><xsl:copy/></xsl:for-each>
            <xsl:for-each select="n:listener">
                <xsl:copy-of select="."/>
            </xsl:for-each>
            <xsl:for-each select="n:context-param">
                <xsl:copy-of select="."/>
            </xsl:for-each>
            <xsl:for-each select="$specificities/n:web-app/n:context-param">
                <xsl:copy-of select="."/>
            </xsl:for-each>
            <xsl:for-each select="n:session-config">
                <xsl:copy-of select="."/>
            </xsl:for-each>
            <xsl:for-each select="n:servlet">
                <xsl:copy-of select="."/>
            </xsl:for-each>
            <xsl:for-each select="n:servlet-mapping">
                <xsl:copy-of select="."/>
            </xsl:for-each>
            <xsl:for-each select="n:filter">
                <xsl:copy-of select="."/>
            </xsl:for-each>
            <xsl:for-each select="$specificities/n:web-app/n:filter">
                <xsl:copy-of select="."/>
            </xsl:for-each>
            <xsl:for-each select="n:filter-mapping">
                <xsl:copy-of select="."/>
            </xsl:for-each>
            <xsl:for-each select="$specificities/n:web-app/n:filter-mapping">
                <xsl:copy-of select="."/>
            </xsl:for-each>
            <xsl:for-each select="n:welcome-file-list">
                <xsl:copy-of select="."/>
            </xsl:for-each>
            <xsl:for-each select="n:error-page">
                <xsl:copy-of select="."/>
            </xsl:for-each>
        </xsl:copy>
    </xsl:template>
    
    <xsl:template match="*"/>
    

</xsl:stylesheet>
