You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by mf...@apache.org on 2009/10/06 01:47:09 UTC

svn commit: r822093 - in /myfaces/portlet-bridge/testsuite/trunk/src/test/resources: pluto-portal-driver-config.xsl test.xsl

Author: mfreedman
Date: Mon Oct  5 23:47:08 2009
New Revision: 822093

URL: http://svn.apache.org/viewvc?rev=822093&view=rev
Log:
Initial commit 

Added:
    myfaces/portlet-bridge/testsuite/trunk/src/test/resources/pluto-portal-driver-config.xsl
    myfaces/portlet-bridge/testsuite/trunk/src/test/resources/test.xsl

Added: myfaces/portlet-bridge/testsuite/trunk/src/test/resources/pluto-portal-driver-config.xsl
URL: http://svn.apache.org/viewvc/myfaces/portlet-bridge/testsuite/trunk/src/test/resources/pluto-portal-driver-config.xsl?rev=822093&view=auto
==============================================================================
--- myfaces/portlet-bridge/testsuite/trunk/src/test/resources/pluto-portal-driver-config.xsl (added)
+++ myfaces/portlet-bridge/testsuite/trunk/src/test/resources/pluto-portal-driver-config.xsl Mon Oct  5 23:47:08 2009
@@ -0,0 +1,65 @@
+<!--
+    Licensed to the Apache Software Foundation (ASF) under one
+    or more contributor license agreements.  See the NOTICE file
+    distributed with this work for additional information
+    regarding copyright ownership.  The ASF licenses this file
+    to you under the Apache License, Version 2.0 (the
+    "License"); you may not use this file except in compliance
+    with the License.  You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing,
+    software distributed under the License is distributed on an
+    "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+    KIND, either express or implied.  See the License for the
+    specific language governing permissions and limitations
+    under the License.	   
+-->
+
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:pa="http://java.sun.com/xml/ns/portlet/portlet-app_1_0.xsd">
+  <xsl:strip-space elements="pa:portlet-app"/>
+  <xsl:output method="xml" indent="yes"/>
+  <xsl:param name="portlet-app-context"/>
+  <xsl:template match="/">
+  <pluto-portal-driver
+    xmlns="http://portals.apache.org/pluto/xsd/pluto-portal-driver-config.xsd"
+    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+    xsi:schemaLocation="http://portals.apache.org/pluto/xsd/pluto-portal-driver-config.xsd
+                        http://portals.apache.org/pluto/pluto-portal/1.1/pluto-portal-driver-config.xsd"
+    version="1.1">
+
+
+    <portal-name>pluto-portal-driver</portal-name>
+    <portal-version>1.1.6</portal-version>
+    <container-name>Pluto Portal Driver</container-name>
+
+    <supports>
+      <portlet-mode>view</portlet-mode>
+      <portlet-mode>edit</portlet-mode>
+      <portlet-mode>help</portlet-mode>
+      <portlet-mode>config</portlet-mode>
+
+      <window-state>normal</window-state>
+      <window-state>maximized</window-state>
+      <window-state>minimized</window-state>
+    </supports>
+    <xsl:element name="render-config">
+      <xsl:attribute name="default">TestPage001</xsl:attribute>
+      <xsl:apply-templates/>
+    </xsl:element>
+    </pluto-portal-driver>
+  </xsl:template>
+
+  <xsl:template match="pa:portlet-app/pa:portlet">
+      <xsl:element name="page">
+        <xsl:attribute name="name">TestPage<xsl:number format="001"/></xsl:attribute>
+        <xsl:attribute name="uri">/WEB-INF/themes/pluto-default-theme.jsp</xsl:attribute>
+          <xsl:element name="portlet">
+            <xsl:attribute name="context">/<xsl:value-of select='$portlet-app-context'/></xsl:attribute>
+            <xsl:attribute name="name"><xsl:value-of select="pa:portlet-name"/></xsl:attribute>
+          </xsl:element>
+      </xsl:element>    
+  </xsl:template>
+
+</xsl:stylesheet>

Added: myfaces/portlet-bridge/testsuite/trunk/src/test/resources/test.xsl
URL: http://svn.apache.org/viewvc/myfaces/portlet-bridge/testsuite/trunk/src/test/resources/test.xsl?rev=822093&view=auto
==============================================================================
--- myfaces/portlet-bridge/testsuite/trunk/src/test/resources/test.xsl (added)
+++ myfaces/portlet-bridge/testsuite/trunk/src/test/resources/test.xsl Mon Oct  5 23:47:08 2009
@@ -0,0 +1,35 @@
+<!--
+    Licensed to the Apache Software Foundation (ASF) under one
+    or more contributor license agreements.  See the NOTICE file
+    distributed with this work for additional information
+    regarding copyright ownership.  The ASF licenses this file
+    to you under the Apache License, Version 2.0 (the
+    "License"); you may not use this file except in compliance
+    with the License.  You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing,
+    software distributed under the License is distributed on an
+    "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+    KIND, either express or implied.  See the License for the
+    specific language governing permissions and limitations
+    under the License.	   
+-->
+
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:pa="http://java.sun.com/xml/ns/portlet/portlet-app_1_0.xsd">
+  <xsl:output method="xml" indent="yes" doctype-system="http://java.sun.com/dtd/properties.dtd"/> 
+  <xsl:strip-space elements="pa:portlet-app"/>
+  <xsl:param name="page-path"/>
+  <xsl:template match="/">
+    <xsl:element name="properties">
+      <xsl:apply-templates/>
+    </xsl:element>
+  </xsl:template>
+  <xsl:template match="pa:portlet-app/pa:portlet">
+    <xsl:element name="entry">
+      <xsl:attribute name="key"><xsl:value-of select='$page-path'/>/TestPage<xsl:number format="001"/></xsl:attribute>
+      <xsl:value-of select="substring-before(substring-after(pa:portlet-name,'-'),'-')"/>
+    </xsl:element>
+  </xsl:template>
+</xsl:stylesheet>