You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by ar...@apache.org on 2012/01/13 23:30:41 UTC

svn commit: r1231359 - /myfaces/trinidad-maven/trunk/maven-faces-plugin/src/main/resources/org/apache/myfaces/trinidadbuild/plugin/faces/resources/transform20.xsl

Author: arobinson74
Date: Fri Jan 13 22:30:41 2012
New Revision: 1231359

URL: http://svn.apache.org/viewvc?rev=1231359&view=rev
Log:
TRINIDAD-2200 - Allow non-fmd data in the global-metadata block. Also fixed the component metadata and property-metadata to recursively copy their nodes since there is no generic node matching

Modified:
    myfaces/trinidad-maven/trunk/maven-faces-plugin/src/main/resources/org/apache/myfaces/trinidadbuild/plugin/faces/resources/transform20.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=1231359&r1=1231358&r2=1231359&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 Fri Jan 13 22:30:41 2012
@@ -1077,19 +1077,20 @@
     namespace-uri() != 'http://java.sun.com/xml/ns/javaee'
     and namespace-uri() !='http://myfaces.apache.org/maven-faces-plugin'
     and namespace-uri() !='http://java.sun.com/xml/ns/javaee/faces/design-time-metadata']">
-    <xsl:copy>
-      <xsl:apply-templates select="@*|node()"/>
-      <xsl:value-of select="text()"/>
-    </xsl:copy>
+    <xsl:copy-of select="*"/>
   </xsl:template>
 
   <xsl:template match="mfp:component-metadata/*[
     namespace-uri() != 'http://java.sun.com/xml/ns/javaee'
     and namespace-uri() !='http://myfaces.apache.org/maven-faces-plugin']">
-    <xsl:copy>
-      <xsl:apply-templates select="@*|node()"/>
-      <xsl:value-of select="text()"/>
-    </xsl:copy>
+    <xsl:copy-of select="*"/>
+  </xsl:template>
+
+  <xsl:template match="fmd:global-metadata/*[
+    namespace-uri() != 'http://java.sun.com/xml/ns/javaee'
+    and namespace-uri() !='http://myfaces.apache.org/maven-faces-plugin'
+    and namespace-uri() !='http://java.sun.com/xml/ns/javaee/faces/design-time-metadata']">
+    <xsl:copy-of select="*"/>
   </xsl:template>
 
   <xsl:template match="//*[
@@ -1123,7 +1124,7 @@
   </xsl:template>
 
   <xsl:template match="//javaee:faces-config-extension">
-        <xsl:apply-templates select="fmd:global-metadata"/>
+    <xsl:apply-templates select="fmd:global-metadata"/>
   </xsl:template>
 
   <!-- Rule for the jsr-276 (top level) global metadata extension -->
@@ -1134,6 +1135,10 @@
         <xsl:apply-templates select="fmd:component-category-definitions"/>
         <xsl:apply-templates select="fmd:property-category-definitions"/>
         <xsl:apply-templates select="fmd:faces-taglib-definitions"/>
+        <!-- Include non-metadata children -->
+        <xsl:apply-templates select="*[namespace-uri() != 'http://java.sun.com/xml/ns/javaee'
+          and namespace-uri() != 'http://java.sun.com/xml/ns/javaee/faces/design-time-metadata'
+          and namespace-uri() != 'http://myfaces.apache.org/maven-faces-plugin']"/>
       </xsl:element>
     </xsl:element>
   </xsl:template>