You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by ms...@apache.org on 2012/03/28 23:33:46 UTC
svn commit: r1306603 - in
/myfaces/trinidad-maven/trunk/maven-faces-plugin/src/main/resources/org/apache/myfaces/trinidadbuild/plugin/faces/resources:
transform20.xsl transform21.xsl
Author: mstarets
Date: Wed Mar 28 21:33:46 2012
New Revision: 1306603
URL: http://svn.apache.org/viewvc?rev=1306603&view=rev
Log:
Added support for specifying facelets-processing and application-extension
Modified:
myfaces/trinidad-maven/trunk/maven-faces-plugin/src/main/resources/org/apache/myfaces/trinidadbuild/plugin/faces/resources/transform20.xsl
myfaces/trinidad-maven/trunk/maven-faces-plugin/src/main/resources/org/apache/myfaces/trinidadbuild/plugin/faces/resources/transform21.xsl
Modified: myfaces/trinidad-maven/trunk/maven-faces-plugin/src/main/resources/org/apache/myfaces/trinidadbuild/plugin/faces/resources/transform20.xsl
URL: http://svn.apache.org/viewvc/myfaces/trinidad-maven/trunk/maven-faces-plugin/src/main/resources/org/apache/myfaces/trinidadbuild/plugin/faces/resources/transform20.xsl?rev=1306603&r1=1306602&r2=1306603&view=diff
==============================================================================
--- myfaces/trinidad-maven/trunk/maven-faces-plugin/src/main/resources/org/apache/myfaces/trinidadbuild/plugin/faces/resources/transform20.xsl (original)
+++ myfaces/trinidad-maven/trunk/maven-faces-plugin/src/main/resources/org/apache/myfaces/trinidadbuild/plugin/faces/resources/transform20.xsl Wed Mar 28 21:33:46 2012
@@ -26,6 +26,7 @@
xmlns:mfp="http://myfaces.apache.org/maven-faces-plugin"
xmlns:fmd="http://java.sun.com/xml/ns/javaee/faces/design-time-metadata"
xmlns:exsl="http://exslt.org/common"
+ xmlns:bridge="http://www.apache.org/myfaces/xml/ns/bridge/bridge-extension"
exclude-result-prefixes="xsl xs javaee mfp fmd"
version="1.0">
@@ -66,6 +67,9 @@
<xsl:variable name="mafp">
<xsl:element name="mafp:xxx" namespace="http://xmlns.oracle.com/maven-adf-faces-plugin"/>
</xsl:variable>
+ <xsl:variable name="bridge">
+ <xsl:element name="bridge:xxx" namespace="http://www.apache.org/myfaces/xml/ns/bridge/bridge-extension"/>
+ </xsl:variable>
<xsl:template match="/javaee:faces-config" >
<xsl:element name="faces-config"
@@ -76,6 +80,7 @@
<xsl:copy-of select="exsl:node-set($fmd)//namespace::*"/>
<xsl:copy-of select="exsl:node-set($mfp)//namespace::*"/>
<xsl:copy-of select="exsl:node-set($mafp)//namespace::*"/>
+ <xsl:copy-of select="exsl:node-set($bridge)//namespace::*"/>
<xsl:attribute name="xsi:schemaLocation">http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-facesconfig_2_0.xsd</xsl:attribute>
<xsl:if test="$metadataComplete">
<xsl:attribute name="metadata-complete">true</xsl:attribute>
@@ -330,6 +335,7 @@
<xsl:apply-templates select="javaee:default-validators" />
<xsl:apply-templates select="javaee:locale-config" />
<xsl:apply-templates select="javaee:resource-bundle" />
+ <xsl:apply-templates select="javaee:application-extension" />
</xsl:element>
</xsl:template>
@@ -859,6 +865,12 @@
<xsl:value-of select="text()" />
</xsl:element>
</xsl:template>
+
+ <xsl:template match="//javaee:application-extension">
+ <xsl:element name="application-extension">
+ <xsl:copy-of select="*"/>
+ </xsl:element>
+ </xsl:template>
<xsl:template match="//javaee:render-kit" >
<xsl:element name="render-kit" >
Modified: myfaces/trinidad-maven/trunk/maven-faces-plugin/src/main/resources/org/apache/myfaces/trinidadbuild/plugin/faces/resources/transform21.xsl
URL: http://svn.apache.org/viewvc/myfaces/trinidad-maven/trunk/maven-faces-plugin/src/main/resources/org/apache/myfaces/trinidadbuild/plugin/faces/resources/transform21.xsl?rev=1306603&r1=1306602&r2=1306603&view=diff
==============================================================================
--- myfaces/trinidad-maven/trunk/maven-faces-plugin/src/main/resources/org/apache/myfaces/trinidadbuild/plugin/faces/resources/transform21.xsl (original)
+++ myfaces/trinidad-maven/trunk/maven-faces-plugin/src/main/resources/org/apache/myfaces/trinidadbuild/plugin/faces/resources/transform21.xsl Wed Mar 28 21:33:46 2012
@@ -26,6 +26,7 @@
xmlns:mfp="http://myfaces.apache.org/maven-faces-plugin"
xmlns:fmd="http://java.sun.com/xml/ns/javaee/faces/design-time-metadata"
xmlns:exsl="http://exslt.org/common"
+ xmlns:bridge="http://www.apache.org/myfaces/xml/ns/bridge/bridge-extension"
exclude-result-prefixes="xsl xs javaee mfp fmd"
version="1.0">
@@ -41,6 +42,7 @@
<xsl:copy-of select="exsl:node-set($fmd)//namespace::*"/>
<xsl:copy-of select="exsl:node-set($mfp)//namespace::*"/>
<xsl:copy-of select="exsl:node-set($mafp)//namespace::*"/>
+ <xsl:copy-of select="exsl:node-set($bridge)//namespace::*"/>
<xsl:attribute name="xsi:schemaLocation">http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-facesconfig_2_1.xsd</xsl:attribute>
<xsl:if test="$metadataComplete">
<xsl:attribute name="metadata-complete">true</xsl:attribute>
@@ -87,5 +89,21 @@
<xsl:apply-templates select="javaee:faces-config-extension" />
</xsl:element>
</xsl:template>
+
+
+ <xsl:template match="//javaee:faces-config-extension">
+ <xsl:apply-templates select="fmd:global-metadata"/>
+ <xsl:if test="count(javaee:facelets-processing)>0">
+ <xsl:element name="faces-config-extension">
+ <xsl:apply-templates select="javaee:facelets-processing"/>
+ </xsl:element>
+ </xsl:if>
+ </xsl:template>
+
+ <xsl:template match="//javaee:facelets-processing">
+ <xsl:element name="facelets-processing">
+ <xsl:copy-of select="*"/>
+ </xsl:element>
+ </xsl:template>
</xsl:stylesheet>