You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lenya.apache.org by an...@apache.org on 2010/07/22 00:56:44 UTC
svn commit: r966451 - in /lenya/contributions/2_0_X/modules/javascript: ./
config/ config/module.xml resources/ resources/head.xml sitemap.xmap xslt/
xslt/head.xsl
Author: andreas
Date: Wed Jul 21 22:56:44 2010
New Revision: 966451
URL: http://svn.apache.org/viewvc?rev=966451&view=rev
Log:
Adding javascript module.
Added:
lenya/contributions/2_0_X/modules/javascript/
lenya/contributions/2_0_X/modules/javascript/config/
lenya/contributions/2_0_X/modules/javascript/config/module.xml
lenya/contributions/2_0_X/modules/javascript/resources/
lenya/contributions/2_0_X/modules/javascript/resources/head.xml
lenya/contributions/2_0_X/modules/javascript/sitemap.xmap
lenya/contributions/2_0_X/modules/javascript/xslt/
lenya/contributions/2_0_X/modules/javascript/xslt/head.xsl
Added: lenya/contributions/2_0_X/modules/javascript/config/module.xml
URL: http://svn.apache.org/viewvc/lenya/contributions/2_0_X/modules/javascript/config/module.xml?rev=966451&view=auto
==============================================================================
--- lenya/contributions/2_0_X/modules/javascript/config/module.xml (added)
+++ lenya/contributions/2_0_X/modules/javascript/config/module.xml Wed Jul 21 22:56:44 2010
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ 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.
+-->
+
+
+<module xmlns="http://apache.org/lenya/module/1.0">
+ <id>org.apache.lenya.modules.javascript</id>
+ <package>org.apache.lenya.modules</package>
+ <version>0.1-dev</version>
+ <name>JavaScript</name>
+ <lenya-version>@lenya.version@</lenya-version>
+ <description>JavaScript functionality for Lenya</description>
+</module>
Added: lenya/contributions/2_0_X/modules/javascript/resources/head.xml
URL: http://svn.apache.org/viewvc/lenya/contributions/2_0_X/modules/javascript/resources/head.xml?rev=966451&view=auto
==============================================================================
--- lenya/contributions/2_0_X/modules/javascript/resources/head.xml (added)
+++ lenya/contributions/2_0_X/modules/javascript/resources/head.xml Wed Jul 21 22:56:44 2010
@@ -0,0 +1,3 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<head xmlns="http://www.w3.org/1999/xhtml">
+</head>
Added: lenya/contributions/2_0_X/modules/javascript/sitemap.xmap
URL: http://svn.apache.org/viewvc/lenya/contributions/2_0_X/modules/javascript/sitemap.xmap?rev=966451&view=auto
==============================================================================
--- lenya/contributions/2_0_X/modules/javascript/sitemap.xmap (added)
+++ lenya/contributions/2_0_X/modules/javascript/sitemap.xmap Wed Jul 21 22:56:44 2010
@@ -0,0 +1,49 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ 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.
+-->
+
+<map:sitemap xmlns:map="http://apache.org/cocoon/sitemap/1.0">
+
+ <map:components>
+ <map:generators default="file">
+ <map:generator name="index-terms" src="org.apache.lenya.modules.tagcloud.IndexTermsGenerator"/>
+ </map:generators>
+ <map:transformers default="xslt">
+ <map:transformer name="uuid2url-tags" logger="lenya.sitemap.transformer.uuid2url-tags"
+ src="org.apache.lenya.cms.cocoon.transformation.UuidToUrlTransformer">
+ <transform namespace="http://apache.org/lenya/tagcloud" element="tag" attribute="href"/>
+ </map:transformer>
+ </map:transformers>
+ </map:components>
+
+ <map:pipelines>
+
+ <map:pipeline>
+
+ <!-- pattern: head.xml -->
+ <map:match pattern="head.xml">
+ <map:generate src="resources/head.xml"/>
+ <map:transform src="xslt/head.xsl">
+ <map:parameter name="baseUri" value="{proxy:/{page-envelope:publication-id}/{page-envelope:area}}"/>
+ </map:transform>
+ <map:serialize type="xml"/>
+ </map:match>
+
+ </map:pipeline>
+
+ </map:pipelines>
+</map:sitemap>
Added: lenya/contributions/2_0_X/modules/javascript/xslt/head.xsl
URL: http://svn.apache.org/viewvc/lenya/contributions/2_0_X/modules/javascript/xslt/head.xsl?rev=966451&view=auto
==============================================================================
--- lenya/contributions/2_0_X/modules/javascript/xslt/head.xsl (added)
+++ lenya/contributions/2_0_X/modules/javascript/xslt/head.xsl Wed Jul 21 22:56:44 2010
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
+ xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:xhtml="http://www.w3.org/1999/xhtml">
+
+ <xsl:param name="baseUri"/>
+
+ <xsl:template match="xhtml:head">
+ <xsl:copy>
+ <script type="text/javascript">
+ Lenya = function() {
+ var baseUri = '<xsl:value-of select="$baseUri"/>';
+ return {
+ link: function(href) {
+ return baseUri + href;
+ }
+ }
+ }();
+ </script>
+ </xsl:copy>
+ </xsl:template>
+
+</xsl:stylesheet>
\ No newline at end of file
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@lenya.apache.org
For additional commands, e-mail: commits-help@lenya.apache.org