forrest-svn mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From twilli...@apache.org
Subject svn commit: r279214 - /forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.xhtml2/resources/stylesheets/
Date Wed, 07 Sep 2005 02:23:15 GMT
Author: twilliams
Date: Tue Sep  6 19:23:02 2005
New Revision: 279214

URL: http://svn.apache.org/viewcvs?rev=279214&view=rev
Log:
merging the view stylesheets

Added:
    forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.xhtml2/resources/stylesheets/hooksMatcher.xsl
  (with props)
    forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.xhtml2/resources/stylesheets/includes-viewLocationmap.xsl
  (with props)
    forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.xhtml2/resources/stylesheets/nugget.xsl
  (with props)
    forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.xhtml2/resources/stylesheets/prepare.css.xsl
  (with props)
    forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.xhtml2/resources/stylesheets/prepare.include.templates.xsl
  (with props)
    forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.xhtml2/resources/stylesheets/prepare.include.xsl
  (with props)
    forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.xhtml2/resources/stylesheets/prepare.properties.xsl
  (with props)
    forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.xhtml2/resources/stylesheets/prepare.view.xsl
  (with props)
    forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.xhtml2/resources/stylesheets/viewLocationmap.xsl
  (with props)
    forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.xhtml2/resources/stylesheets/viewLocationmap2path.xsl
  (with props)

Added: forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.xhtml2/resources/stylesheets/hooksMatcher.xsl
URL: http://svn.apache.org/viewcvs/forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.xhtml2/resources/stylesheets/hooksMatcher.xsl?rev=279214&view=auto
==============================================================================
--- forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.xhtml2/resources/stylesheets/hooksMatcher.xsl
(added)
+++ forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.xhtml2/resources/stylesheets/hooksMatcher.xsl
Tue Sep  6 19:23:02 2005
@@ -0,0 +1,47 @@
+<?xml version="1.0"?>
+<!--
+  Copyright 2002-2005 The Apache Software Foundation or its licensors,
+  as applicable.
+
+  Licensed 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:forrest="http://apache.org/forrest/templates/1.0" 
+  xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+  <!--This template will match the different combinations for forrest:hooks-->
+  <xsl:template match="forrest:hook[@name and (@type='div' or not(@type))]">
+    <div id="{@name}">
+      <xsl:apply-templates/>
+      <xsl:if test="@nbsp='true'">&#160;</xsl:if>
+    </div>
+  </xsl:template>
+  <xsl:template match="forrest:hook[@class and (@type='div' or not(@type))]">
+    <div class="{@class}">
+      <xsl:apply-templates/>
+      <xsl:if test="@nbsp='true'">&#160;</xsl:if>
+    </div>
+  </xsl:template>
+  <xsl:template match="forrest:hook[@class and @type='span']">
+    <span class="{@class}"> 
+      <xsl:apply-templates/>
+      <xsl:if test="@nbsp='true'">&#160;</xsl:if>
+    </span>
+  </xsl:template>
+  <xsl:template match="forrest:hook[@name and @type='span']">
+    <span id="{@name}"> 
+      <xsl:apply-templates/>
+      <xsl:if test="@nbsp='true'">&#160;</xsl:if>
+    </span>
+  </xsl:template>
+</xsl:stylesheet>

Propchange: forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.xhtml2/resources/stylesheets/hooksMatcher.xsl
------------------------------------------------------------------------------
    svn:eol-style = native

Added: forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.xhtml2/resources/stylesheets/includes-viewLocationmap.xsl
URL: http://svn.apache.org/viewcvs/forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.xhtml2/resources/stylesheets/includes-viewLocationmap.xsl?rev=279214&view=auto
==============================================================================
--- forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.xhtml2/resources/stylesheets/includes-viewLocationmap.xsl
(added)
+++ forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.xhtml2/resources/stylesheets/includes-viewLocationmap.xsl
Tue Sep  6 19:23:02 2005
@@ -0,0 +1,159 @@
+<?xml version="1.0"?>
+<!--
+  Copyright 2002-2005 The Apache Software Foundation or its licensors,
+  as applicable.
+
+  Licensed 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:collection="http://apache.org/cocoon/collection/1.0"
+  xmlns:xi="http://www.w3.org/2001/XInclude"
+  xmlns:dyn="http://exslt.org/dynamic">
+  
+  <xsl:param name="defaultView" select="'default.fv'"/>
+  <xsl:param name="rootElement" select="'/xdocs/'"/>
+  <xsl:param name="viewExtension" select="'.fv'"/>
+  <xsl:param name="path" select="'.'"/>
+  <xsl:param name="root" select="'xdocs'"/>
+  <xsl:param name="viewFallback" select="'resources/views/default.fv'"/>
+  <xsl:variable name="lastFallback" select="boolean(/xdocs/*[local-name()=$defaultView])"/>
+   <!--
+    *viewSelector* project-xdocs
+    will return which view is responsible for the requested path.
+    If no view (choice|fallback) could be found the template will return the 
+    viewFallback (resources/views/default.fv).
+    
+    ex.: 
+    1.request: index 
+    First choice: index.fv
+    First/last fallback: default.fv
+    
+    2.request: sample/index 
+    First choice: sample/index.fv
+    First fallback: sample/default.fv
+    Last fallback: default.fv
+    
+    3.request: sample/subdir/index 
+    First choice: sample/subdir/index.fv
+    First fallback: sample/subdir/default.fv
+    Second fallback: sample/default.fv
+    Last fallback: default.fv
+    
+    ...
+    
+    des.: 
+    The parent view (root-view) inherits to its children until 
+    a child is overriding this view. This override can be used for 
+    directories (default.fv) and/or files (*.fv).
+    That means that the root view is the default view as long no other
+    view can be found in the requested child.
+    -->
+  <xsl:template match="/">
+    <!--<xsl:comment>
+      lastFallback: <xsl:value-of select="$lastFallback"/>
+      root: <xsl:value-of select="$root"/>
+      request: <xsl:value-of select="$path"/>
+      default view: <xsl:value-of select="$defaultView"/>
+      function-available('dyn:evaluate') <xsl:value-of select="function-available('dyn:evaluate')"/>
+    </xsl:comment>-->
+    <xsl:variable name="view2response">
+      <xsl:call-template name="viewSelector">
+	      <xsl:with-param name="request" select="concat($path,$viewExtension)"/>
+	      <xsl:with-param name="rest" select="''"/>
+	    </xsl:call-template>
+    </xsl:variable>
+    <!--Nothing can be found, returning the default.fv-->
+    <xsl:if test="not($lastFallback) and $view2response=''">
+      <xi:include href="{$viewFallback}"/>
+    </xsl:if>
+    <!--The lastFallback can be found, returning this-->
+    <xsl:if test="$lastFallback and $view2response=''">
+      <xi:include href="{concat('file://', $root,$defaultView)}"/>
+    </xsl:if>
+    <!--Some fallback can be found that is not the last one-->
+    <xsl:if test="$view2response!=''">
+      <xi:include href="{concat('file://', $root,$view2response)}"/>
+    </xsl:if>
+  </xsl:template>
+ 
+  <xsl:template name="viewSelector">
+    <xsl:param name="request" select="''"/>
+    <xsl:param name="rest" select="''"/>
+    <xsl:param name="view2response" select="''"/>
+    <xsl:if test="contains($request,'/')">
+      <xsl:variable name="nextRequest" select="substring-after($request,'/')"/>
+      <xsl:variable name="currentDir" select="substring-before($request,'/')"/>
+      <!--<xsl:comment>
+        request: <xsl:value-of select="$request"/>
+	      currentDir: <xsl:value-of select="$currentDir"/>
+        currentDir has default view: <xsl:value-of select="boolean(dyn:evaluate(concat($rootElement,$rest,$currentDir,'/',$defaultView)))"/>
+        next request: <xsl:value-of select="$nextRequest"/>
+        rest: <xsl:value-of select="$rest"/>
+        view2response: <xsl:value-of select="$view2response"/>
+	    </xsl:comment>-->
+      <!--In the path are still directories-->
+      <xsl:if test="boolean(dyn:evaluate(concat($rootElement,$rest,$currentDir,'/',$defaultView)))">
+        <!--<xsl:comment>view2response set - <xsl:value-of select="(concat($rest,$currentDir,'/',$defaultView)"/></xsl:comment>-->
+        <xsl:variable name="viewTemp" select="concat($rest,$currentDir,'/',$defaultView)"/>
+        <xsl:call-template name="viewSelector">
+			    <xsl:with-param name="request" select="$nextRequest"/>
+			    <xsl:with-param name="rest" select="concat($rest,$currentDir,'/')"/>
+	        <xsl:with-param name="view2response" select="$viewTemp"/>
+			  </xsl:call-template>
+      </xsl:if>
+      <xsl:if test="not(dyn:evaluate(concat($rootElement,$rest,$currentDir,'/',$defaultView)))">
+        <!--<xsl:comment>no view2response set</xsl:comment>-->
+        <xsl:if test="$view2response=''">
+          <xsl:variable name="viewTemp" select="''"/>
+          <xsl:call-template name="viewSelector">
+				    <xsl:with-param name="request" select="$nextRequest"/>
+				    <xsl:with-param name="rest" select="concat($rest,$currentDir,'/')"/>
+		        <xsl:with-param name="view2response" select="$viewTemp"/>
+				  </xsl:call-template>
+        </xsl:if>
+        <xsl:if test="$view2response!=''">
+          <xsl:variable name="viewTemp" select="$view2response"/>
+          <xsl:call-template name="viewSelector">
+				    <xsl:with-param name="request" select="$nextRequest"/>
+				    <xsl:with-param name="rest" select="concat($rest,$currentDir,'/')"/>
+		        <xsl:with-param name="view2response" select="$viewTemp"/>
+				  </xsl:call-template>
+        </xsl:if>
+      </xsl:if>
+    </xsl:if>
+    <xsl:if test="not(contains($request,'/'))">
+      <!--<xsl:comment>
+        request: <xsl:value-of select="$request"/>
+        rest: <xsl:value-of select="$rest"/>
+        iteration: <xsl:value-of select="number($iteration)"/>
+        view2response: <xsl:value-of select="$view2response"/>
+	    </xsl:comment>-->
+      <xsl:if test="not(dyn:evaluate(concat($rootElement, $rest, $request)))">
+        <!--<xsl:comment>no file specific override</xsl:comment>-->
+        <xsl:if test="boolean(dyn:evaluate(concat($rootElement,$rest,$defaultView)))">
+          <!--<xsl:comment>dir specific override</xsl:comment>-->
+          <xsl:value-of select="concat($rest,$defaultView)"/>
+        </xsl:if>
+        <xsl:if test="not(dyn:evaluate(concat($rootElement,$rest,$defaultView)))">
+          <!--<xsl:comment>no dir specific override</xsl:comment>-->
+          <xsl:value-of select="$view2response"/>
+        </xsl:if>
+      </xsl:if>
+      <xsl:if test="boolean(dyn:evaluate(concat($rootElement, $rest, $request)))">
+        <!--<xsl:comment>file specific override</xsl:comment>-->
+         <xsl:value-of select="concat($rest, $request)"/>
+      </xsl:if>
+    </xsl:if>
+  </xsl:template>
+  
+</xsl:stylesheet>

Propchange: forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.xhtml2/resources/stylesheets/includes-viewLocationmap.xsl
------------------------------------------------------------------------------
    svn:eol-style = native

Added: forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.xhtml2/resources/stylesheets/nugget.xsl
URL: http://svn.apache.org/viewcvs/forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.xhtml2/resources/stylesheets/nugget.xsl?rev=279214&view=auto
==============================================================================
--- forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.xhtml2/resources/stylesheets/nugget.xsl
(added)
+++ forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.xhtml2/resources/stylesheets/nugget.xsl
Tue Sep  6 19:23:02 2005
@@ -0,0 +1,52 @@
+<?xml version="1.0"?>
+<!--
+  Copyright 2002-2005 The Apache Software Foundation or its licensors,
+  as applicable.
+
+  Licensed 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.
+-->
+<!--
+site2xml.xsl is the final stage in XML page production.  It merges HTML from
+document2html.xsl, tab2menu.xsl and book2menu.xsl, and adds the site header,
+footer, searchbar, css etc.  As input, it takes XML of the form:
+
+<elements>
+  <branding/>
+  <search/>
+  <menu/>
+  <content/>
+  <siteinfo/>
+</elements>
+
+-->
+
+<xsl:stylesheet version="1.0" 
+  xmlns:xsl="http://www.w3.org/1999/XSL/Transform" 
+  xmlns:forrest="http://apache.org/forrest/templates/1.0">
+  
+  <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="no"/>
+  <xsl:strip-space elements="forrest:properties"/>
+  <xsl:param name="contract"/>
+  
+  <xsl:template match="/">
+    <xsl:apply-templates/>
+  </xsl:template>
+  
+  <xsl:template match="forrest:property[@name=$contract]">
+    <xsl:comment> properties <xsl:value-of select="$contract"/> </xsl:comment>
+    <xsl:copy-of select="*"/>
+  </xsl:template>
+  
+  <xsl:template match="forrest:property"/>
+
+</xsl:stylesheet>

Propchange: forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.xhtml2/resources/stylesheets/nugget.xsl
------------------------------------------------------------------------------
    svn:eol-style = native

Added: forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.xhtml2/resources/stylesheets/prepare.css.xsl
URL: http://svn.apache.org/viewcvs/forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.xhtml2/resources/stylesheets/prepare.css.xsl?rev=279214&view=auto
==============================================================================
--- forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.xhtml2/resources/stylesheets/prepare.css.xsl
(added)
+++ forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.xhtml2/resources/stylesheets/prepare.css.xsl
Tue Sep  6 19:23:02 2005
@@ -0,0 +1,38 @@
+<?xml version="1.0"?>
+<!--
+  Copyright 2002-2005 The Apache Software Foundation or its licensors,
+  as applicable.
+
+  Licensed 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:xi="http://www.w3.org/2001/XInclude"
+  xmlns:forrest="http://apache.org/forrest/templates/1.0" 
+  >
+  
+  <xsl:key name="contract-name" match="forrest:properties" use="@name" />
+  
+  <xsl:template match="/">
+    <xsl:for-each 
+      select="//forrest:properties/*[count(. | key('contract-name', @name)[1]) = 1 and @css='true']">
+      <xsl:sort select="@name" />
+      <xi:include href="cocoon://get.contract-css.{@name}" />
+    </xsl:for-each>
+    <xsl:apply-templates select="//extra-css"/>
+  </xsl:template>
+  <xsl:template match="extra-css">
+    <xsl:value-of select="."/>
+  </xsl:template>
+</xsl:stylesheet>

Propchange: forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.xhtml2/resources/stylesheets/prepare.css.xsl
------------------------------------------------------------------------------
    svn:eol-style = native

Added: forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.xhtml2/resources/stylesheets/prepare.include.templates.xsl
URL: http://svn.apache.org/viewcvs/forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.xhtml2/resources/stylesheets/prepare.include.templates.xsl?rev=279214&view=auto
==============================================================================
--- forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.xhtml2/resources/stylesheets/prepare.include.templates.xsl
(added)
+++ forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.xhtml2/resources/stylesheets/prepare.include.templates.xsl
Tue Sep  6 19:23:02 2005
@@ -0,0 +1,37 @@
+<?xml version="1.0"?>
+<!--
+  Copyright 2002-2005 The Apache Software Foundation or its licensors,
+  as applicable.
+
+  Licensed 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:forrest="http://apache.org/forrest/templates/1.0" 
+  xmlns:xi="http://www.w3.org/2001/XInclude" >
+  
+  <xsl:template match="/">
+    <xsl:apply-templates/>
+  </xsl:template>
+  <!---->
+  <xsl:template match="forrest:call-template">
+    <xi:include 
+      href="cocoon://prepare.view-templates.{@name}#xpointer(/*/*)"/>
+  </xsl:template>
+  
+  <xsl:template match="@*|*|text()|processing-instruction()|comment()">
+    <xsl:copy>
+      <xsl:apply-templates select="@*|*|text()|processing-instruction()|comment()"/>
+    </xsl:copy>
+  </xsl:template>
+</xsl:stylesheet>

Propchange: forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.xhtml2/resources/stylesheets/prepare.include.templates.xsl
------------------------------------------------------------------------------
    svn:eol-style = native

Added: forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.xhtml2/resources/stylesheets/prepare.include.xsl
URL: http://svn.apache.org/viewcvs/forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.xhtml2/resources/stylesheets/prepare.include.xsl?rev=279214&view=auto
==============================================================================
--- forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.xhtml2/resources/stylesheets/prepare.include.xsl
(added)
+++ forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.xhtml2/resources/stylesheets/prepare.include.xsl
Tue Sep  6 19:23:02 2005
@@ -0,0 +1,43 @@
+<?xml version="1.0"?>
+<!--
+  Copyright 2002-2005 The Apache Software Foundation or its licensors,
+  as applicable.
+
+  Licensed 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:forrest="http://apache.org/forrest/templates/1.0"  
+  xmlns:xi="http://www.w3.org/2001/XInclude"
+  xmlns:alias="http://www.w3.org/1999/XSL/TransformAlias">
+    <xsl:namespace-alias 
+         stylesheet-prefix="alias" result-prefix="xsl"/>
+
+	<xsl:param name="format"/>
+  <xsl:key name="contract-name" match="forrest:contract" use="@name" />
+  
+  <xsl:template match="/">
+    <alias:stylesheet version="1.0">
+      <!--NOTE:
+        contracts are allowed only to be importet once! Thx to
+        http://www.jenitennison.com/xslt/grouping/muenchian.html-->
+      <xsl:for-each 
+        select="forrest:views/forrest:view[@type=$format]//forrest:contract[count(. | key('contract-name',
@name)[1]) = 1]">
+        <xsl:sort select="@name" />
+        <xi:include href="cocoon://get.contract.{@name}.{$format}"/>
+      </xsl:for-each>
+    </alias:stylesheet>
+  </xsl:template>
+
+</xsl:stylesheet>

Propchange: forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.xhtml2/resources/stylesheets/prepare.include.xsl
------------------------------------------------------------------------------
    svn:eol-style = native

Added: forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.xhtml2/resources/stylesheets/prepare.properties.xsl
URL: http://svn.apache.org/viewcvs/forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.xhtml2/resources/stylesheets/prepare.properties.xsl?rev=279214&view=auto
==============================================================================
--- forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.xhtml2/resources/stylesheets/prepare.properties.xsl
(added)
+++ forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.xhtml2/resources/stylesheets/prepare.properties.xsl
Tue Sep  6 19:23:02 2005
@@ -0,0 +1,35 @@
+<?xml version="1.0"?>
+<!--
+  Copyright 2002-2005 The Apache Software Foundation or its licensors,
+  as applicable.
+
+  Licensed 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:forrest="http://apache.org/forrest/templates/1.0"  
+  xmlns:xi="http://www.w3.org/2001/XInclude"
+  >
+
+	<xsl:param name="format"/>
+
+  <xsl:template match="/">
+    <forrest:properties >
+	    <xsl:for-each select="forrest:views/forrest:view[@type=$format]//forrest:contract">
+	      <xi:include href="cocoon://get.contract-property.{@name}.{$format}"/>
+	    </xsl:for-each>
+    </forrest:properties>
+  </xsl:template>
+  
+</xsl:stylesheet>

Propchange: forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.xhtml2/resources/stylesheets/prepare.properties.xsl
------------------------------------------------------------------------------
    svn:eol-style = native

Added: forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.xhtml2/resources/stylesheets/prepare.view.xsl
URL: http://svn.apache.org/viewcvs/forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.xhtml2/resources/stylesheets/prepare.view.xsl?rev=279214&view=auto
==============================================================================
--- forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.xhtml2/resources/stylesheets/prepare.view.xsl
(added)
+++ forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.xhtml2/resources/stylesheets/prepare.view.xsl
Tue Sep  6 19:23:02 2005
@@ -0,0 +1,46 @@
+<?xml version="1.0"?>
+<!--
+  Copyright 2002-2005 The Apache Software Foundation or its licensors,
+  as applicable.
+
+  Licensed 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:forrest="http://apache.org/forrest/templates/1.0"  
+  xmlns:xi="http://www.w3.org/2001/XInclude"
+  xmlns:alias="http://www.w3.org/1999/XSL/TransformAlias">
+    <xsl:namespace-alias 
+         stylesheet-prefix="alias" result-prefix="xsl"/>
+<xsl:output method="xml" version="1.0" encoding="UTF-8" indent="no"/>
+  <xsl:strip-space elements="forrest:property"/>
+  
+ <xsl:param name="view"/>
+
+  <xsl:template match="/">
+    <xsl:apply-templates/>
+  </xsl:template>
+
+  <xsl:template match="forrest:property[@nugget]">
+    <forrest:property name="{@name}"><xi:include href="cocoon://{url}"/></forrest:property>
+  </xsl:template>
+
+  <xsl:template match="@*|*|text()|processing-instruction()|comment()">
+    <xsl:copy>
+      <xsl:apply-templates select="@*|*|text()|processing-instruction()|comment()"/>
+    </xsl:copy>
+  </xsl:template>
+  
+
+</xsl:stylesheet>

Propchange: forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.xhtml2/resources/stylesheets/prepare.view.xsl
------------------------------------------------------------------------------
    svn:eol-style = native

Added: forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.xhtml2/resources/stylesheets/viewLocationmap.xsl
URL: http://svn.apache.org/viewcvs/forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.xhtml2/resources/stylesheets/viewLocationmap.xsl?rev=279214&view=auto
==============================================================================
--- forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.xhtml2/resources/stylesheets/viewLocationmap.xsl
(added)
+++ forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.xhtml2/resources/stylesheets/viewLocationmap.xsl
Tue Sep  6 19:23:02 2005
@@ -0,0 +1,42 @@
+<?xml version="1.0"?>
+<!--
+  Copyright 2002-2005 The Apache Software Foundation or its licensors,
+  as applicable.
+
+  Licensed 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:collection="http://apache.org/cocoon/collection/1.0">
+  <xsl:variable name="includePattern" select="'.fv'"/>
+  
+  <xsl:template match="/">
+    <xsl:apply-templates/>
+  </xsl:template>
+  <xsl:template match="collection:collection">
+    <dir name="{@name}">
+    	<xsl:apply-templates/>
+    </dir>
+  </xsl:template>
+  <xsl:template match="collection:resource[contains(@name,$includePattern)]">
+    <view name="{@name}">
+    	<xsl:apply-templates/>
+    </view>
+  </xsl:template>
+  <!--/collection:resource[contains(@name,$includePattern)]-->
+ <!-- <xsl:template match="//*/*[contains(@name,$includePattern)]">
+    <xsl:variable name="parent" select="../."/>
+    <node id="{$parent/@name}"/>
+   <!-#-<xsl:copy-of select="$parent"/>-#->
+  </xsl:template>-->
+  
+</xsl:stylesheet>

Propchange: forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.xhtml2/resources/stylesheets/viewLocationmap.xsl
------------------------------------------------------------------------------
    svn:eol-style = native

Added: forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.xhtml2/resources/stylesheets/viewLocationmap2path.xsl
URL: http://svn.apache.org/viewcvs/forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.xhtml2/resources/stylesheets/viewLocationmap2path.xsl?rev=279214&view=auto
==============================================================================
--- forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.xhtml2/resources/stylesheets/viewLocationmap2path.xsl
(added)
+++ forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.xhtml2/resources/stylesheets/viewLocationmap2path.xsl
Tue Sep  6 19:23:02 2005
@@ -0,0 +1,35 @@
+<?xml version="1.0"?>
+<!--
+  Copyright 2002-2005 The Apache Software Foundation or its licensors,
+  as applicable.
+
+  Licensed 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:collection="http://apache.org/cocoon/collection/1.0">
+  
+  <xsl:template match="/">
+   <xsl:apply-templates/>
+  </xsl:template>
+ 
+  <xsl:template match="dir[view or dir]">
+    <xsl:element name="{@name}">
+      <xsl:apply-templates/>
+    </xsl:element>
+  </xsl:template>
+  
+  <xsl:template match="view">
+    <xsl:element name="{@name}"/>
+  </xsl:template>
+ 
+</xsl:stylesheet>

Propchange: forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.xhtml2/resources/stylesheets/viewLocationmap2path.xsl
------------------------------------------------------------------------------
    svn:eol-style = native



Mime
View raw message