|
|
Choosing A Webhost: |
svn commit: r371923 - in /lenya/trunk/src: java/org/apache/lenya/cms/cocoon: msg#00132cms.lenya.cvs
Author: andreas Date: Tue Jan 24 06:26:56 2006 New Revision: 371923 URL: http://svn.apache.org/viewcvs?rev=371923&view=rev Log: Added module-resources.xmap to serve module resources directly. RNG schemas are now served in a generic way, see pipeline in global-sitemap.xmap (there is still room for improvement). Added: lenya/trunk/src/modules/links/resources/ lenya/trunk/src/modules/links/resources/schema/ - copied from r371588, lenya/trunk/src/modules/links/schema/ lenya/trunk/src/modules/xhtml/resources/ lenya/trunk/src/modules/xhtml/resources/schemas/ - copied from r371588, lenya/trunk/src/modules/xhtml/schemas/ lenya/trunk/src/webapp/lenya/module-resources.xmap lenya/trunk/src/webapp/lenya/pubs/default/modules/homepage/resources/ lenya/trunk/src/webapp/lenya/pubs/default/modules/homepage/resources/schemas/ - copied from r371588, lenya/trunk/src/webapp/lenya/pubs/default/modules/homepage/schemas/ lenya/trunk/src/webapp/lenya/xslt/util/translate-rng-includes.xsl Removed: lenya/trunk/src/modules/bxe/xslt/translate-rng-includes.xsl lenya/trunk/src/modules/links/schema/ lenya/trunk/src/modules/xhtml/schemas/ lenya/trunk/src/webapp/lenya/pubs/default/modules/homepage/schemas/ Modified: lenya/trunk/src/java/org/apache/lenya/cms/cocoon/components/modules/input/ResourceTypeModule.java lenya/trunk/src/java/org/apache/lenya/cms/publication/ResourceType.java lenya/trunk/src/java/org/apache/lenya/xml/Schema.java lenya/trunk/src/modules/bxe/java/src/org/apache/lenya/cms/editors/bxe/BXE.java lenya/trunk/src/modules/bxe/sitemap.xmap lenya/trunk/src/modules/bxe/usecases/bxe.jx lenya/trunk/src/modules/links/config/module.xconf lenya/trunk/src/modules/xhtml/config/module.xconf lenya/trunk/src/modules/xhtml/resources/schemas/xhtml.rng lenya/trunk/src/webapp/global-sitemap.xmap lenya/trunk/src/webapp/lenya/pubs/blog/config/menus/entry.xsp lenya/trunk/src/webapp/lenya/pubs/default/modules/homepage/config/module.xconf lenya/trunk/src/webapp/lenya/pubs/default/modules/homepage/resources/schemas/homepage.rng lenya/trunk/src/webapp/lenya/pubs/default/sitemap.xmap Modified: lenya/trunk/src/java/org/apache/lenya/cms/cocoon/components/modules/input/ResourceTypeModule.java URL: http://svn.apache.org/viewcvs/lenya/trunk/src/java/org/apache/lenya/cms/cocoon/components/modules/input/ResourceTypeModule.java?rev=371923&r1=371922&r2=371923&view=diff ============================================================================== --- lenya/trunk/src/java/org/apache/lenya/cms/cocoon/components/modules/input/ResourceTypeModule.java (original) +++ lenya/trunk/src/java/org/apache/lenya/cms/cocoon/components/modules/input/ResourceTypeModule.java Tue Jan 24 06:26:56 2006 @@ -22,6 +22,7 @@ import org.apache.avalon.framework.configuration.ConfigurationException; import org.apache.avalon.framework.service.ServiceException; import org.apache.avalon.framework.service.ServiceManager; +import org.apache.avalon.framework.service.ServiceSelector; import org.apache.avalon.framework.service.Serviceable; import org.apache.cocoon.components.modules.input.AbstractInputModule; import org.apache.cocoon.environment.ObjectModelHelper; @@ -34,10 +35,19 @@ import org.apache.lenya.util.ServletHelper; /** + * <p> * Resource type module. + * </p> + * <p> + * The syntax is either <code>{resource-type:<attribute>}</code> or + * <code>{resource-type:<name>:<attribute>}</code>. + * </p> */ public class ResourceTypeModule extends AbstractInputModule implements Serviceable { + protected static final String SCHEMA_URI = "schemaUri"; + protected static final String HTTP_SCHEMA_URI = "httpSchemaUri"; + public Object getAttribute(String name, Configuration modeConf, Map objectModel) throws ConfigurationException { Object value = null; @@ -45,25 +55,48 @@ try { Request request = ObjectModelHelper.getRequest(objectModel); Session session = RepositoryUtil.getSession(request, getLogger()); - DocumentIdentityMap docFactory = new DocumentIdentityMap(session, - this.manager, - getLogger()); - String webappUrl = ServletHelper.getWebappURI(request); - Document document = docFactory.getFromURL(webappUrl); - ResourceType resourceType = document.getResourceType(); - - if (name.startsWith("format-")) { - String[] steps = name.split("-"); - String format = steps[1]; - value = resourceType.getFormatURI(format); + + ResourceType resourceType; + String attribute; + + String[] steps = name.split(":"); + if (steps.length == 1) { + attribute = name; + DocumentIdentityMap docFactory = new DocumentIdentityMap(session, + this.manager, + getLogger()); + String webappUrl = ServletHelper.getWebappURI(request); + Document document = docFactory.getFromURL(webappUrl); + resourceType = document.getResourceType(); + } else { + attribute = steps[1]; + String resourceTypeName = steps[0]; + + ServiceSelector selector = null; + try { + selector = (ServiceSelector) this.manager.lookup(ResourceType.ROLE + "Selector"); + resourceType = (ResourceType) selector.select(resourceTypeName); + } finally { + this.manager.release(selector); + } } - else { + + if (attribute.startsWith("format-")) { + String[] formatSteps = name.split("-"); + String format = formatSteps[1]; + value = resourceType.getFormatURI(format); + } else if (attribute.equals(SCHEMA_URI)) { + value = resourceType.getSchema().getURI(); + } else if (attribute.equals(HTTP_SCHEMA_URI)) { + String uri = resourceType.getSchema().getURI(); + String path = uri.substring("lallback://".length()); + value = request.getContextPath() + "/fallback/" + path; + } else { throw new ConfigurationException("Attribute [" + name + "] not supported!"); } } catch (Exception e) { throw new ConfigurationException("Resolving attribute [" + name + "] failed: ", e); - } finally { } return value; Modified: lenya/trunk/src/java/org/apache/lenya/cms/publication/ResourceType.java URL: http://svn.apache.org/viewcvs/lenya/trunk/src/java/org/apache/lenya/cms/publication/ResourceType.java?rev=371923&r1=371922&r2=371923&view=diff ============================================================================== --- lenya/trunk/src/java/org/apache/lenya/cms/publication/ResourceType.java (original) +++ lenya/trunk/src/java/org/apache/lenya/cms/publication/ResourceType.java Tue Jan 24 06:26:56 2006 @@ -32,8 +32,6 @@ */ package org.apache.lenya.cms.publication; -import java.util.Set; - import org.apache.lenya.cms.authoring.NodeCreatorInterface; import org.apache.lenya.xml.Schema; Modified: lenya/trunk/src/java/org/apache/lenya/xml/Schema.java URL: http://svn.apache.org/viewcvs/lenya/trunk/src/java/org/apache/lenya/xml/Schema.java?rev=371923&r1=371922&r2=371923&view=diff ============================================================================== --- lenya/trunk/src/java/org/apache/lenya/xml/Schema.java (original) +++ lenya/trunk/src/java/org/apache/lenya/xml/Schema.java Tue Jan 24 06:26:56 2006 @@ -42,6 +42,7 @@ * @param language The language, as defined by * org.apache.cocoon.components.validation.Validator. * @param schemaUri The schema URI. + * @param httpUri The URI to access the schema via HTTP. * @see org.apache.cocoon.components.validation.Validator */ public Schema(String language, String schemaUri) { @@ -67,5 +68,5 @@ public String getURI() { return this.uri; } - + } Modified: lenya/trunk/src/modules/bxe/java/src/org/apache/lenya/cms/editors/bxe/BXE.java URL: http://svn.apache.org/viewcvs/lenya/trunk/src/modules/bxe/java/src/org/apache/lenya/cms/editors/bxe/BXE.java?rev=371923&r1=371922&r2=371923&view=diff ============================================================================== --- lenya/trunk/src/modules/bxe/java/src/org/apache/lenya/cms/editors/bxe/BXE.java (original) +++ lenya/trunk/src/modules/bxe/java/src/org/apache/lenya/cms/editors/bxe/BXE.java Tue Jan 24 06:26:56 2006 @@ -100,4 +100,5 @@ protected String getEvent() { return "edit"; } + } Modified: lenya/trunk/src/modules/bxe/sitemap.xmap URL: http://svn.apache.org/viewcvs/lenya/trunk/src/modules/bxe/sitemap.xmap?rev=371923&r1=371922&r2=371923&view=diff ============================================================================== --- lenya/trunk/src/modules/bxe/sitemap.xmap (original) +++ lenya/trunk/src/modules/bxe/sitemap.xmap Tue Jan 24 06:26:56 2006 @@ -182,7 +182,7 @@ <map:parameter name="BX_xslfile" value="{2}.xsl"/> --> <map:parameter name="BX_xhtmlfile" value="{../2}.bxe.html?rendertype=edit"/> - <map:parameter name="BX_validationfile" value="{request:contextPath}/{page-envelope:publication-id}/{page-envelope:area}/schemas/{page-envelope:document-type}.rng"/> + <map:parameter name="BX_validationfile" value="{resource-type:httpSchemaUri}"/> <map:parameter name="css" value="{request:contextPath}/{page-envelope:publication-id}/{page-envelope:area}/css/{page-envelope:document-type}-bxe.css"/> <!-- The document is checked in when we exit from bx (in case of save&exit and in case of exit), so we use the usecase for the checkin while we redirect to the document Modified: lenya/trunk/src/modules/bxe/usecases/bxe.jx URL: http://svn.apache.org/viewcvs/lenya/trunk/src/modules/bxe/usecases/bxe.jx?rev=371923&r1=371922&r2=371923&view=diff ============================================================================== --- lenya/trunk/src/modules/bxe/usecases/bxe.jx (original) +++ lenya/trunk/src/modules/bxe/usecases/bxe.jx Tue Jan 24 06:26:56 2006 @@ -7,8 +7,8 @@ > <page:head> - <link rel="stylesheet" href="${request.getContextPath()}/bxe/css/editor.css" type="text/css"/> - <script src="${request.getContextPath()}/bxe/bxeLoader.js" type="text/javascript"/> + <link rel="stylesheet" href="${request.getContextPath()}/modules/bxe/bxe/css/editor.css" type="text/css"/> + <script src="${request.getContextPath()}/modules/bxe/bxe/bxeLoader.js" type="text/javascript"/> <meta name="bxeNS" content="xhtml=http://www.w3.org/1999/xhtml"/> <meta name="bxeNS" content="lenya=http://apache.org/cocoon/lenya/page-envelope/1.0"/> Modified: lenya/trunk/src/modules/links/config/module.xconf URL: http://svn.apache.org/viewcvs/lenya/trunk/src/modules/links/config/module.xconf?rev=371923&r1=371922&r2=371923&view=diff ============================================================================== --- lenya/trunk/src/modules/links/config/module.xconf (original) +++ lenya/trunk/src/modules/links/config/module.xconf Tue Jan 24 06:26:56 2006 @@ -22,7 +22,8 @@ <component-instance name="links" logger="lenya.resourcetypes.links" class="org.apache.lenya.cms.publication.ResourceTypeImpl"> - <schema src="fallback://lenya/modules/links/schema/links.rng" language="http://relaxng.org/ns/structure/0.9"/> + <schema language="http://relaxng.org/ns/structure/0.9" + src="fallback://lenya/modules/links/resources/schema/links.rng"/> <creator src="org.apache.lenya.cms.authoring.DefaultBranchCreator"> <sample-name>fallback://lenya/modules/links/samples/links.xml</sample-name> </creator> Modified: lenya/trunk/src/modules/xhtml/config/module.xconf URL: http://svn.apache.org/viewcvs/lenya/trunk/src/modules/xhtml/config/module.xconf?rev=371923&r1=371922&r2=371923&view=diff ============================================================================== --- lenya/trunk/src/modules/xhtml/config/module.xconf (original) +++ lenya/trunk/src/modules/xhtml/config/module.xconf Tue Jan 24 06:26:56 2006 @@ -22,7 +22,8 @@ <component-instance name="xhtml" logger="lenya.resourcetypes.xhtml" class="org.apache.lenya.cms.publication.ResourceTypeImpl"> - <schema src="fallback://lenya/modules/xhtml/schemas/xhtml.rng" language="http://relaxng.org/ns/structure/0.9"/> + <schema language="http://relaxng.org/ns/structure/0.9" + src="fallback://lenya/modules/xhtml/resources/schemas/xhtml.rng"/> <creator src="org.apache.lenya.cms.authoring.DefaultBranchCreator"> <sample-name>fallback://lenya/modules/xhtml/samples/xhtml.xml</sample-name> <!-- <sample-name name="Two Column Layout">fallback://lenya/modules/xhtml/samples/xhtml-2col.xml</sample-name> --> Modified: lenya/trunk/src/modules/xhtml/resources/schemas/xhtml.rng URL: http://svn.apache.org/viewcvs/lenya/trunk/src/modules/xhtml/resources/schemas/xhtml.rng?rev=371923&r1=371588&r2=371923&view=diff ============================================================================== --- lenya/trunk/src/modules/xhtml/resources/schemas/xhtml.rng (original) +++ lenya/trunk/src/modules/xhtml/resources/schemas/xhtml.rng Tue Jan 24 06:26:56 2006 @@ -37,7 +37,7 @@ <include href="fallback://lenya/resources/schemas/lenya.rng"/> <!-- include original XHTML transitional schema --> -<include href="fallback://lenya/modules/xhtml/schemas/xhtml/xhtml-basic.rng"> +<include href="xhtml/xhtml-basic.rng"> <define name="html"> <element name="html"> Modified: lenya/trunk/src/webapp/global-sitemap.xmap URL: http://svn.apache.org/viewcvs/lenya/trunk/src/webapp/global-sitemap.xmap?rev=371923&r1=371922&r2=371923&view=diff ============================================================================== --- lenya/trunk/src/webapp/global-sitemap.xmap (original) +++ lenya/trunk/src/webapp/global-sitemap.xmap Tue Jan 24 06:26:56 2006 @@ -112,13 +112,6 @@ </map:match> </map:pipeline> - <!-- Editor BXE --> - <map:pipeline> - <map:match pattern="bxe/**"> - <map:read src="lenya/modules/bxe/resources/bxe/{1}"/> - </map:match> - </map:pipeline> - <!-- Editor Kupu --> <map:pipeline> <map:match pattern="kupu/**"> @@ -270,16 +263,35 @@ </map:match> </map:pipeline> - - <!-- Internal module requests --> - <map:pipeline internal-only="true"> - <!-- Enter a module --> + + <map:pipeline> + + <!-- RNG fallback requests --> + <map:match pattern="fallback/**.rng"> + <map:generate src="fallback://{1}.rng"/> + <map:transform src="lenya/xslt/util/translate-rng-includes.xsl"/> + <map:serialize type="xml"/> + </map:match> + + <!-- Module requests --> <map:match pattern="modules/*/**"> - <map:mount uri-prefix="modules/{1}/" src="lenya/modules/{1}/sitemap.xmap" check-reload="true" reload-method="synchron"/> + <map:select type="resource-exists"> + + <!-- resource exists - serve statically --> + <map:when test="lenya/modules/{1}/resources/{2}"> + <map:mount uri-prefix="modules/" src="lenya/module-resources.xmap" check-reload="true" reload-method="synchron"/> + </map:when> + + <!-- resource doesn't exist - delegate to module --> + <map:otherwise> + <map:mount uri-prefix="modules/{1}/" src="lenya/modules/{1}/sitemap.xmap" check-reload="true" reload-method="synchron"/> + </map:otherwise> + + </map:select> </map:match> </map:pipeline> - <!-- Internal usecases --> + <!-- Internal usecases --> <map:pipeline internal-only="true"> <map:match pattern="core/modules/*/*/**"> <map:mount uri-prefix="core/modules/{1}/{2}" src="lenya/modules/{1}/usecases/{2}/usecase.xmap"/> Added: lenya/trunk/src/webapp/lenya/module-resources.xmap URL: http://svn.apache.org/viewcvs/lenya/trunk/src/webapp/lenya/module-resources.xmap?rev=371923&view=auto ============================================================================== --- lenya/trunk/src/webapp/lenya/module-resources.xmap (added) +++ lenya/trunk/src/webapp/lenya/module-resources.xmap Tue Jan 24 06:26:56 2006 @@ -0,0 +1,136 @@ +<?xml version="1.0"?> +<!-- + Copyright 1999-2004 The Apache Software Foundation + + 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. +--> + +<!-- $Id: resources-shared.xmap 349588 2005-11-29 02:07:44Z chestnut $ --> + +<map:sitemap xmlns:map="http://apache.org/cocoon/sitemap/1.0"> + + <map:pipelines> + <map:pipeline> + + <!-- matches modules/*/**.css --> + <map:match pattern="*/**.css"> + <!-- Only called if a {3}.css exists because of resource-exists-enhanced before --> + <map:act type="resource-exists" src="fallback://lenya/modules/{1}/resources/{2}.xml"> + <map:generate src="fallback://lenya/modules/{1}/resources/{../2}.xml"/> + <map:transform src="fallback://resources/css/css.xsl"> + <map:parameter name="contextprefix" value="{request:contextPath}"/> + </map:transform> + <map:serialize type="text" mime-type="text/css"/> + </map:act> + <map:read src="fallback://lenya/modules/{1}/resources/{2}.css" mime-type="text/css" /> + </map:match> + + <!-- matches modules/*/**.js --> + <map:match pattern="*/**.js"> + <map:read src="fallback://lenya/modules/{1}/resources/{2}.js" mime-type="application/x-javascript" /> + </map:match> + + <!-- matches modules/*/**.* --> + <map:match pattern="*/**.*"> + + <map:match type="regexp" pattern="(.*\.)(rng)$"> + <map:read src="fallback://lenya/modules/{../1}/resources/{../2}.{../3}" mime-type="application/xml"/> + </map:match> + <map:match type="regexp" pattern="(.*\.)(jpg|JPG|Jpg|jpeg|Jpeg|JPEG)$"> + <map:read src="fallback://lenya/modules/{../1}/resources/{../2}.{../3}" mime-type="image/jpeg" /> + </map:match> + <map:match type="regexp" pattern="(.*\.)(gif|GIF|Gif)$"> + <map:read src="fallback://lenya/modules/{../1}/resources/{../2}.{../3}" mime-type="image/gif" /> + </map:match> + <map:match type="regexp" pattern="(.*\.)(png|PNG|Png)$"> + <map:read src="fallback://lenya/modules/{../1}/resources/{../2}.{../3}" mime-type="image/png" /> + </map:match> + <map:match type="regexp" pattern="(.*\.)(tar\.gz|tgz)$"> + <map:read src="fallback://lenya/modules/{../1}/resources/{../2}.{../3}" mime-type="application/x-gtar" /> + </map:match> + <map:match type="regexp" pattern="(.*\.)(pdf|PDF|Pdf)$"> + <map:read src="fallback://lenya/modules/{../1}/resources/{../2}.{../3}" mime-type="application/pdf"> + <!-- TODO: http://marc.theaimsgroup.com/?l=xml-cocoon-dev&m=112496255207733&w=2 --> + <map:parameter name="byte-ranges" value="false"/> + </map:read> + </map:match> + <map:match type="regexp" pattern="(.*\.)(doc|DOC|Doc|dot|DOT|Dot)$"> + <map:read src="fallback://lenya/modules/{../1}/resources/{../2}.{../3}" mime-type="application/msword" /> + </map:match> + <map:match type="regexp" pattern="(.*\.)(rtf|RTF|Rtf)$"> + <map:read src="fallback://lenya/modules/{../1}/resources/{../2}.{../3}" mime-type="application/rtf" /> + </map:match> + <map:match type="regexp" pattern="(.*\.)(txt|TXT|Txt|asc|ASC|Asc|ascii|ASCII|Ascii)$"> + <map:read src="fallback://lenya/modules/{../1}/resources/{../2}.{../3}" mime-type="text/plain" /> + </map:match> + <map:match type="regexp" pattern="(.*\.)(xls|XLS|Xls|xlt|XLT|Xlt)$"> + <map:read src="fallback://lenya/modules/{../1}/resources/{../2}.{../3}" mime-type="application/vnd.ms-excel" /> + </map:match> + <map:match type="regexp" pattern="(.*\.)(ppt|PPT|Ppt|pot|POT|Pot)$"> + <map:read src="fallback://lenya/modules/{../1}/resources/{../2}.{../3}" mime-type="application/vnd.ms-powerpoint" /> + </map:match> + <map:match type="regexp" pattern="(.*\.)(swf|SWF|Swf)$"> + <map:read src="fallback://lenya/modules/{../1}/resources/{../2}.{../3}" mime-type="application/x-shockwave-flash" /> + </map:match> + <map:match type="regexp" pattern="(.*\.)(tif|TIF|Tif)$"> + <map:read src="fallback://lenya/modules/{../1}/resources/{../2}.{../3}" mime-type="image/tiff" /> + </map:match> + <map:match type="regexp" pattern="(.*\.)(eps|EPS|Eps)$"> + <map:read src="fallback://lenya/modules/{../1}/resources/{../2}.{../3}" mime-type="application/postscript" /> + </map:match> + <map:match type="regexp" pattern="(.*\.)(m3u|M3U|M3u)$"> + <map:read src="fallback://lenya/modules/{../1}/resources/{../2}.{../3}" mime-type="application/x-mpegurl" /> + </map:match> + <map:match type="regexp" pattern="(.*\.)(kar|KAR|Kar|mid|MID|Mid)$"> + <map:read src="fallback://lenya/modules/{../1}/resources/{../2}.{../3}" mime-type="audio/midi" /> + </map:match> + <map:match type="regexp" pattern="(.*\.)(smf|SMF|Smf)$"> + <map:read src="fallback://lenya/modules/{../1}/resources/{../2}.{../3}" mime-type="application/vnd.stardivision.math" /> + </map:match> + <map:match type="regexp" pattern="(.*\.)(mp3|MP3|Mp3)$"> + <map:read src="fallback://lenya/modules/{../1}/resources/{../2}.{../3}" mime-type="audio/mpeg" /> + </map:match> + <map:match type="regexp" pattern="(.*\.)(swa|SWA|Swa)$"> + <map:read src="fallback://lenya/modules/{../1}/resources/{../2}.{../3}" mime-type="audio/x-swa" /> + </map:match> + <map:match type="regexp" pattern="(.*\.)(mpg|MPG|Mpg|mpv|MPV|Mpv|mp4|MP4|Mp4)$"> + <map:read src="fallback://lenya/modules/{../1}/resources/{../2}.{../3}" mime-type="video/mpeg" /> + </map:match> + <map:match type="regexp" pattern="(.*\.)(mov|MOV|Mov)$"> + <map:read src="fallback://lenya/modules/{../1}/resources/{../2}.{../3}" mime-type="video/quicktime" /> + </map:match> + <map:match type="regexp" pattern="(.*\.)(bin|BIN|Bin|hqx|HQX|Hqx)$"> + <map:read src="fallback://lenya/modules/{../1}/resources/{../2}.{../3}" mime-type="application/mac-binhex40" /> + </map:match> + <map:match type="regexp" pattern="(.*\.)(sea|SEA|Sea)$"> + <map:read src="fallback://lenya/modules/{../1}/resources/{../2}.{../3}" mime-type="application/sea" /> + </map:match> + <map:match type="regexp" pattern="(.*\.)(sit|SIT|Sit)$"> + <map:read src="fallback://lenya/modules/{../1}/resources/{../2}.{../3}" mime-type="application/x-stuffit" /> + </map:match> + <map:match type="regexp" pattern="(.*\.)(zip|ZIP|Zip)$"> + <map:read src="fallback://lenya/modules/{../1}/resources/{../2}.{../3}" mime-type="application/zip" /> + </map:match> + <map:match type="regexp" pattern="(.*\.)(pct|PCT|Pct|jmx|JMX|Jmx|jcl|JCL|Jcl|qz|QZ|Qz|jbc|JBC|Jbc|jmt|JMT|Jmt|cfg|CFG|Cfg)$"> + <map:read src="fallback://lenya/modules/{../1}/resources/{../2}.{../3}" mime-type="application/x-ms-word" /> + </map:match> + </map:match> + + <!-- matches pub-id/area/**favicon.ico --> + <map:match pattern="*/**favicon.ico"> + <map:read src="fallback://lenya/modules/{1}/resources/{2}favicon.ico" mime-type="application/ico"/> + </map:match> + + </map:pipeline> + </map:pipelines> +</map:sitemap> Modified: lenya/trunk/src/webapp/lenya/pubs/blog/config/menus/entry.xsp URL: http://svn.apache.org/viewcvs/lenya/trunk/src/webapp/lenya/pubs/blog/config/menus/entry.xsp?rev=371923&r1=371922&r2=371923&view=diff ============================================================================== --- lenya/trunk/src/webapp/lenya/pubs/blog/config/menus/entry.xsp (original) +++ lenya/trunk/src/webapp/lenya/pubs/blog/config/menus/entry.xsp Tue Jan 24 06:26:56 2006 @@ -40,9 +40,12 @@ <menus> <menu i18n:attr="name" name="File"> <block> + <!-- <item href="index-bxe.html">Edit with BXE</item> + --> + <item uc:usecase="edit.bxe" href="?">Edit with BXE</item> <item uc:usecase="edit.oneform" href="?">Edit with one Form</item> - <item uc:usecase="edit.forms" href="?&form=entry">Edit with Forms</item> + <item uc:usecase="edit.forms" href="?&form=entry">Edit with Forms</item> </block> <block> <item uc:usecase="workflow.publish" href="?"><i18n:text>Publish</i18n:text></item> Modified: lenya/trunk/src/webapp/lenya/pubs/default/modules/homepage/config/module.xconf URL: http://svn.apache.org/viewcvs/lenya/trunk/src/webapp/lenya/pubs/default/modules/homepage/config/module.xconf?rev=371923&r1=371922&r2=371923&view=diff ============================================================================== --- lenya/trunk/src/webapp/lenya/pubs/default/modules/homepage/config/module.xconf (original) +++ lenya/trunk/src/webapp/lenya/pubs/default/modules/homepage/config/module.xconf Tue Jan 24 06:26:56 2006 @@ -22,7 +22,7 @@ <component-instance name="homepage" logger="lenya.resourcetypes.homepage" class="org.apache.lenya.cms.publication.ResourceTypeImpl"> - <schema src="fallback://lenya/modules/homepage/schemas/homepage.rng" language="http://relaxng.org/ns/structure/0.9"/> + <schema src="fallback://lenya/modules/homepage/resources/schemas/homepage.rng" language="http://relaxng.org/ns/structure/0.9"/> <creator src="org.apache.lenya.cms.authoring.DefaultBranchCreator"> <sample-name>homepage.xml</sample-name> </creator> Modified: lenya/trunk/src/webapp/lenya/pubs/default/modules/homepage/resources/schemas/homepage.rng URL: http://svn.apache.org/viewcvs/lenya/trunk/src/webapp/lenya/pubs/default/modules/homepage/resources/schemas/homepage.rng?rev=371923&r1=371588&r2=371923&view=diff ============================================================================== --- lenya/trunk/src/webapp/lenya/pubs/default/modules/homepage/resources/schemas/homepage.rng (original) +++ lenya/trunk/src/webapp/lenya/pubs/default/modules/homepage/resources/schemas/homepage.rng Tue Jan 24 06:26:56 2006 @@ -32,6 +32,6 @@ xmlns:lenya="http://apache.org/cocoon/lenya/page-envelope/1.0" > -<include href="fallback://lenya/modules/xhtml/schemas/xhtml.rng"/> +<include href="fallback://lenya/modules/xhtml/resources/schemas/xhtml.rng"/> </grammar> Modified: lenya/trunk/src/webapp/lenya/pubs/default/sitemap.xmap URL: http://svn.apache.org/viewcvs/lenya/trunk/src/webapp/lenya/pubs/default/sitemap.xmap?rev=371923&r1=371922&r2=371923&view=diff ============================================================================== --- lenya/trunk/src/webapp/lenya/pubs/default/sitemap.xmap (original) +++ lenya/trunk/src/webapp/lenya/pubs/default/sitemap.xmap Tue Jan 24 06:26:56 2006 @@ -90,31 +90,12 @@ - <!-- BX Editor: RNG Schema, CSS --> + <!-- BX Editor: CSS --> <map:pipeline type="noncaching"> - - <map:match pattern="*/schemas/fallback/**.rng"> - <map:generate src="fallback://{2}.rng"/> - <map:transform src="fallback://lenya/modules/bxe/xslt/translate-rng-includes.xsl"> - <map:parameter name="root" value="{request:contextPath}/{page-envelope:publication-id}/{page-envelope:area}/schemas/"/> - <map:parameter name="uri" value="{request:requestURI}"/> - </map:transform> - <map:serialize type="xml"/> - </map:match> - - <map:match pattern="*/schemas/**.rng"> - <map:generate src="fallback://lenya/modules/{2}/schemas/{2}.rng"/> - <map:transform src="fallback://lenya/modules/bxe/xslt/translate-rng-includes.xsl"> - <map:parameter name="root" value="{request:contextPath}/{page-envelope:publication-id}/{page-envelope:area}/schemas/"/> - <map:parameter name="uri" value="{request:contextPath}/{page-envelope:publication-id}/{page-envelope:area}/schemas/fallback/lenya/modules/{2}/schemas/{2}.rng"/> - </map:transform> - <map:serialize type="xml"/> - </map:match> - <map:match pattern="**/*-bxe.css"> <map:read mime-type="text/css" src="fallback://resources/misc/bxe/{2}-bxe.css"/> </map:match> - </map:pipeline> + </map:pipeline> <!-- /BX Editor: RNG Schema --> <!-- This is the pipeline that builds the page. It aggregates all Added: lenya/trunk/src/webapp/lenya/xslt/util/translate-rng-includes.xsl URL: http://svn.apache.org/viewcvs/lenya/trunk/src/webapp/lenya/xslt/util/translate-rng-includes.xsl?rev=371923&view=auto ============================================================================== --- lenya/trunk/src/webapp/lenya/xslt/util/translate-rng-includes.xsl (added) +++ lenya/trunk/src/webapp/lenya/xslt/util/translate-rng-includes.xsl Tue Jan 24 06:26:56 2006 @@ -0,0 +1,20 @@ +<?xml version="1.0" encoding="UTF-8"?> +<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0" + xmlns:rng="http://relaxng.org/ns/structure/1.0"> + + + <xsl:template match="rng:include/@href[starts-with(., 'fallback://')]"> + <xsl:attribute name="href"> + <xsl:text>/fallback/</xsl:text> + <xsl:value-of select="substring-after(., 'fallback://')"/> + </xsl:attribute> + </xsl:template> + + + <xsl:template match="@*|node()" priority="-1"> + <xsl:copy> + <xsl:apply-templates select="@*|node()"/> + </xsl:copy> + </xsl:template> + +</xsl:stylesheet> \ No newline at end of file
|
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | svn commit: r371896 - /lenya/trunk/src/java/org/apache/lenya/cms/site/usecases/CreateDocument.java, josias |
|---|---|
| Next by Date: | svn commit: r371930 - /lenya/trunk/src/webapp/lenya/pubs/blog/config/menus/entry.xsp, andreas |
| Previous by Thread: | svn commit: r371896 - /lenya/trunk/src/java/org/apache/lenya/cms/site/usecases/CreateDocument.java, josias |
| Next by Thread: | svn commit: r371930 - /lenya/trunk/src/webapp/lenya/pubs/blog/config/menus/entry.xsp, andreas |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
Free MagazinesCisco NewsReceive a free quarterly e-newsletter with exclusive articles on how Cisco IT uses its own products and solutions to enable the business. subscribe Systems Management News, the newspaper for IT systems administration and data center managers! Each issue of Systems Management News is chock-full of news and analysis to help you understand what's happening in your field. subscribe The Enterprise Newsweekly eWeek is the essential technology information source for builders of e-business. subscribe Oracle Magazine Oracle Magazine contains technology strategy articles, sample code, tips, Oracle and partner news, how to articles for developers and DBAs, and more. Oracle (NASDAQ: ORCL) is the world's largest enterprise software company. subscribe Total Telecom Total Telecom is "The Economist of the communications industry". subscribe |