This repository has been archived by the owner on Apr 12, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3
/
addProp.xslt
46 lines (42 loc) · 1.97 KB
/
addProp.xslt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="xml" version="1.0" encoding="UTF-8" indent="yes"/>
<xsl:template match="/">
<xsl:apply-templates select="node()" mode="copy"/>
</xsl:template>
<xsl:template match="web-app" mode="copy">
<xsl:copy>
<xsl:apply-templates select="@*" mode="copy"/>
<xsl:apply-templates select="context-param" mode="copy" />
<xsl:apply-templates select="filter" mode="copy" />
<xsl:apply-templates select="filter-mapping" mode="copy" />
<xsl:apply-templates select="listener" mode="copy" />
<xsl:apply-templates select="servlet" mode="copy"/>
<xsl:if test="not(//servlet/servlet-name='PSOSmartPreviewServlet')">
<servlet>
<servlet-name>PSOSmartPreviewServlet</servlet-name>
<servlet-class>com.percussion.servlets.PSDispatcherServlet</servlet-class>
<init-param>
<param-name>contextConfigLocation</param-name>
<param-value>/WEB-INF/addins/PSOSmartPreview/*-servlet.xml</param-value>
</init-param>
</servlet>
</xsl:if>
<xsl:apply-templates select="servlet-mapping" mode="copy"/>
<xsl:if test="not(//servlet-mapping/servlet-name='PSOSmartPreviewServlet')">
<servlet-mapping>
<servlet-name>PSOSmartPreviewServlet</servlet-name>
<url-pattern>/user/addins/psosmartpreview/*</url-pattern>
</servlet-mapping>
</xsl:if>
<xsl:apply-templates select="mime-mapping" mode="copy"/>
<xsl:apply-templates select="welcome-file-list" mode="copy"/>
</xsl:copy>
</xsl:template>
<xsl:template match="@*|node()" mode="copy">
<xsl:copy>
<xsl:apply-templates select="@*" mode="copy"/>
<xsl:apply-templates select="node()" mode="copy" />
</xsl:copy>
</xsl:template>
</xsl:stylesheet>