|
|
Choosing A Webhost: |
svn commit: r511575 - in /lenya/branches/trunk-rework-pubconf/src: impl/jav: msg#00135cms.lenya.cvs
Author: nettings Date: Sun Feb 25 11:06:22 2007 New Revision: 511575 URL: http://svn.apache.org/viewvc?view=rev&rev=511575 Log: * remove contents of pubs/*/publication.xml (empty files remain) * remove rendering support for publication.xml (global-sitemap.xmap). * remove all uses of http://apache.org/cocoon/lenya/publication/1.0 namespace. * introduce a new new namespace: http://apache.org/cocoon/lenya/publication/1.1. * publication.xconf data must now be in that namespace (backwards-incompatible, requires changes to old files) notably, module, proxy and resource-type are now grouped in wrapper elements. * move information from pubs/*publication.xml to pubs/*config/publication.xconf * add webapp/lenya/resources/schemas/publication.rng to define the namespace * add complete list of element/attribute constants to PublicationConfiguration.java (although only a subset is actually parsed there) and enable namespace support. * modify webapp/lenya/resources/i18n/modules2xinclude.xsl accordingly * introduce core and per-publication readme.xml. * improve introduction pages TODO: * fix webapp/lenya/xslt/modules/modules2xinclude.xsl, rename to something more intuitive * fix Instantiator.java Added: lenya/branches/trunk-rework-pubconf/src/pubs/blog/readme.xml (with props) lenya/branches/trunk-rework-pubconf/src/pubs/default/readme.xml (with props) lenya/branches/trunk-rework-pubconf/src/webapp/lenya/content/welcome.xml (with props) lenya/branches/trunk-rework-pubconf/src/webapp/lenya/resources/schemas/publication.rng (with props) lenya/branches/trunk-rework-pubconf/src/webapp/lenya/xslt/util/aggregate-publications.xsl (with props) lenya/branches/trunk-rework-pubconf/src/webapp/lenya/xslt/util/introduction.xsl (with props) lenya/branches/trunk-rework-pubconf/src/webapp/readme.xml (with props) Removed: lenya/branches/trunk-rework-pubconf/src/pubs/blog/publication-tests.xml lenya/branches/trunk-rework-pubconf/src/webapp/lenya/content/introduction.xml lenya/branches/trunk-rework-pubconf/src/webapp/lenya/xslt/util/publication.xsl lenya/branches/trunk-rework-pubconf/src/webapp/lenya/xslt/util/xinclude.xsl Modified: lenya/branches/trunk-rework-pubconf/src/impl/java/org/apache/lenya/cms/publication/PublicationConfiguration.java lenya/branches/trunk-rework-pubconf/src/pubs/blog/config/publication.xconf lenya/branches/trunk-rework-pubconf/src/pubs/blog/publication.xml lenya/branches/trunk-rework-pubconf/src/pubs/default/config/publication.xconf lenya/branches/trunk-rework-pubconf/src/pubs/default/publication.xml lenya/branches/trunk-rework-pubconf/src/targets/dist-build.xml lenya/branches/trunk-rework-pubconf/src/targets/test-build.xml lenya/branches/trunk-rework-pubconf/src/targets/webapp-build.xml lenya/branches/trunk-rework-pubconf/src/webapp/global-sitemap.xmap lenya/branches/trunk-rework-pubconf/src/webapp/lenya/resources/css/default.css lenya/branches/trunk-rework-pubconf/src/webapp/lenya/resources/i18n/modules2xinclude.xsl lenya/branches/trunk-rework-pubconf/src/webapp/lenya/xslt/modules/modules2xinclude.xsl lenya/branches/trunk-rework-pubconf/src/webapp/lenya/xslt/util/welcome.xsl Modified: lenya/branches/trunk-rework-pubconf/src/impl/java/org/apache/lenya/cms/publication/PublicationConfiguration.java URL: http://svn.apache.org/viewvc/lenya/branches/trunk-rework-pubconf/src/impl/java/org/apache/lenya/cms/publication/PublicationConfiguration.java?view=diff&rev=511575&r1=511574&r2=511575 ============================================================================== --- lenya/branches/trunk-rework-pubconf/src/impl/java/org/apache/lenya/cms/publication/PublicationConfiguration.java (original) +++ lenya/branches/trunk-rework-pubconf/src/impl/java/org/apache/lenya/cms/publication/PublicationConfiguration.java Sun Feb 25 11:06:22 2007 @@ -30,7 +30,9 @@ import org.apache.lenya.cms.repository.Node; /** - * A publication configuration. + * A publication's configuration. + * Keep in sync with src/webapp/lenya/resources/schemas/publication.rng! + * FIXME: validate publication.xconf before attempting to parse */ public class PublicationConfiguration extends AbstractLogEnabled implements Publication { @@ -43,11 +45,6 @@ private String instantiatorHint = null; private String contentDir = null; - private static final String ELEMENT_PROXY = "proxy"; - private static final String ATTRIBUTE_AREA = "area"; - private static final String ATTRIBUTE_URL = "url"; - private static final String ATTRIBUTE_SSL = "ssl"; - private boolean isConfigLoaded = false; /** @@ -56,20 +53,42 @@ public static final String CONFIGURATION_FILE = CONFIGURATION_PATH + File.separator + "publication.xconf"; + private static final String CONFIGURATION_NAMESPACE = + "http://apache.org/cocoon/lenya/publication/1.1" ; + + // properties marked with "*" are currently not parsed by this class. + private static final String ELEMENT_NAME = "name"; + private static final String ELEMENT_DESCRIPTION = "description"; //* + private static final String ELEMENT_LONGDESC = "longdesc"; //* + private static final String ELEMENT_VERSION = "version"; //* + private static final String ELEMENT_LENYA_VERSION = "lenya-version"; //* + private static final String ELEMENT_LENYA_REVISION = "lenya-revision"; //* + private static final String ELEMENT_COCOON_VERSION = "cocoon-version"; //* + private static final String ELEMENT_LANGUAGES = "languages"; + private static final String ELEMENT_LANGUAGE = "language"; + private static final String ATTRIBUTE_DEFAULT_LANGUAGE = "default"; private static final String ELEMENT_TEMPLATES = "templates"; private static final String ELEMENT_TEMPLATE = "template"; private static final String ATTRIBUTE_ID = "id"; + private static final String ELEMENT_TEMPLATE_INSTANTIATOR = "template-instantiator"; + private static final String ATTRIBUTE_NAME = "name"; private static final String ELEMENT_PATH_MAPPER = "path-mapper"; private static final String ELEMENT_DOCUMENT_BUILDER = "document-builder"; private static final String ELEMENT_SITE_MANAGER = "site-manager"; - private static final String ATTRIBUTE_NAME = "name"; - private static final String ELEMENT_TEMPLATE_INSTANTIATOR = "template-instantiator"; - private static final String ELEMENT_CONTENT_DIR = "content-dir"; - private static final String LANGUAGES = "languages"; - private static final String DEFAULT_LANGUAGE_ATTR = "default"; - private static final String BREADCRUMB_PREFIX = "breadcrumb-prefix"; - private static final String ELEMENT_RESOURCE_TYPE = "resource-type"; + private static final String ELEMENT_RESOURCE_TYPES = "resource-types";//* + private static final String ELEMENT_RESOURCE_TYPE = "resource-type";//* private static final String ATTRIBUTE_WORKFLOW = "workflow"; + private static final String ELEMENT_MODULES = "modules";//* + private static final String ELEMENT_MODULE = "module";//* + private static final String ELEMENT_BREADCRUMB_PREFIX = "breadcrumb-prefix"; + private static final String ELEMENT_CONTENT_DIR = "content-dir"; + private static final String ELEMENT_LINK_ATTRIBUTE = "link-attribute"; + private static final String ELEMENT_PROXIES = "proxies"; + private static final String ELEMENT_PROXY = "proxy"; + private static final String ATTRIBUTE_AREA = "area"; + private static final String ATTRIBUTE_URL = "url"; + private static final String ATTRIBUTE_SSL = "ssl"; + /** * Creates a new instance of Publication @@ -108,8 +127,9 @@ } else { getLogger().debug("Configuration file [" + configFile + "] exists."); } - - DefaultConfigurationBuilder builder = new DefaultConfigurationBuilder(); + + final boolean ENABLE_XML_NAMESPACES = true; + DefaultConfigurationBuilder builder = new DefaultConfigurationBuilder(ENABLE_XML_NAMESPACES); Configuration config; @@ -119,6 +139,13 @@ config = builder.buildFromFile(configFile); try { + // one sanity check for the proper namespace. we should really do that for every element, + // but since ELEMENT_PATH_MAPPER is mandatory, this should catch most cases of forgotten namespace. + if (config.getChild(ELEMENT_PATH_MAPPER).getNamespace() != CONFIGURATION_NAMESPACE) { + getLogger().warn("Deprecated configuration: the publication configuration elements in " + + configFile + " must be in the " + CONFIGURATION_NAMESPACE + " namespace." + + " See webapp/lenya/resources/schemas/publication.xconf."); + } pathMapperClassName = config.getChild(ELEMENT_PATH_MAPPER).getValue(); Class pathMapperClass = Class.forName(pathMapperClassName); this.mapper = (DocumentIdToPathMapper) pathMapperClass.newInstance(); @@ -134,12 +161,12 @@ .getAttribute(ATTRIBUTE_NAME); } - Configuration[] _languages = config.getChild(LANGUAGES).getChildren(); + Configuration[] _languages = config.getChild(ELEMENT_LANGUAGES).getChildren(ELEMENT_LANGUAGE); for (int i = 0; i < _languages.length; i++) { Configuration languageConfig = _languages[i]; String language = languageConfig.getValue(); this.languages.add(language); - if (languageConfig.getAttribute(DEFAULT_LANGUAGE_ATTR, null) != null) { + if (languageConfig.getAttribute(ATTRIBUTE_DEFAULT_LANGUAGE, null) != null) { this.defaultLanguage = language; } } @@ -149,7 +176,15 @@ this.siteManagerName = siteManagerConfiguration.getAttribute(ATTRIBUTE_NAME); } - Configuration[] proxyConfigs = config.getChildren(ELEMENT_PROXY); + Configuration[] proxyConfigs = config.getChild(ELEMENT_PROXIES).getChildren(ELEMENT_PROXY); + // backwards-compatibility. rip out for lenya releases post 1.4.x: + if (proxyConfigs.length == 0) { + proxyConfigs = config.getChildren(ELEMENT_PROXY); + if (proxyConfigs.length > 0) + getLogger().warn("Deprecated configuration: <proxy> elements in " + configFile + + " must be grouped in a <proxies>...</proxies> element." + + " See webapp/lenya/resources/schemas/publication.xconf."); + } for (int i = 0; i < proxyConfigs.length; i++) { String url = proxyConfigs[i].getAttribute(ATTRIBUTE_URL); String ssl = proxyConfigs[i].getAttribute(ATTRIBUTE_SSL); @@ -209,7 +244,7 @@ e); } - this.breadcrumbprefix = config.getChild(BREADCRUMB_PREFIX).getValue(""); + this.breadcrumbprefix = config.getChild(ELEMENT_BREADCRUMB_PREFIX).getValue(""); isConfigLoaded = true; } Modified: lenya/branches/trunk-rework-pubconf/src/pubs/blog/config/publication.xconf URL: http://svn.apache.org/viewvc/lenya/branches/trunk-rework-pubconf/src/pubs/blog/config/publication.xconf?view=diff&rev=511575&r1=511574&r2=511575 ============================================================================== --- lenya/branches/trunk-rework-pubconf/src/pubs/blog/config/publication.xconf (original) +++ lenya/branches/trunk-rework-pubconf/src/pubs/blog/config/publication.xconf Sun Feb 25 11:06:22 2007 @@ -18,7 +18,13 @@ <!-- $Id$ --> -<publication> +<publication xmlns="http://apache.org/cocoon/lenya/publication/1.1" show="true"> + <name>Lenya Blog</name> + <description>An experimental Lenya-based blog in proof-of-concept stage.</description> + <version>@lenya.version@</version> + <lenya-version>@lenya.version@</lenya-version> + <lenya-revision>@lenya.revision@</lenya-revision> + <cocoon-version>2.1.8+</cocoon-version> <languages> <language default="true">en</language> <language>de</language> @@ -28,17 +34,9 @@ <breadcrumb-prefix/> <ssl-prefix/> <site-manager name="simple"/> - <resource-type name="entry" workflow="workflow.xml"/> - <resource-type name="sidebar" workflow="workflow.xml"/> - - <!-- NOTE: The configuration of the content directory has NOT been fully tested yet and might lead to unexpected results. Use at own risk ;-) --> - <!-- Relative to webapp context: --> - <!-- - <content-dir src="lenya/pubs/blog"/> - --> - <!-- Absolute: --> - <!-- - <content-dir src="/home/USERNAME/data/blog"/> - <content-dir src="D:/tmp/blog"/> - --> + <resource-types> + <resource-type name="entry" workflow="workflow.xml"/> + <resource-type name="sidebar" workflow="workflow.xml"/> + </resource-types> </publication> + Modified: lenya/branches/trunk-rework-pubconf/src/pubs/blog/publication.xml URL: http://svn.apache.org/viewvc/lenya/branches/trunk-rework-pubconf/src/pubs/blog/publication.xml?view=diff&rev=511575&r1=511574&r2=511575 ============================================================================== --- lenya/branches/trunk-rework-pubconf/src/pubs/blog/publication.xml (original) +++ lenya/branches/trunk-rework-pubconf/src/pubs/blog/publication.xml Sun Feb 25 11:06:22 2007 @@ -1,79 +0,0 @@ -<?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. ---> - -<!-- $Id$ --> - -<lenya:publication xmlns:lenya="http://apache.org/cocoon/lenya/publication/1.0" lenya:show="true"> -<lenya:pub-version>@lenya.version@</lenya:pub-version> -<lenya:lenya-version>@lenya.version@</lenya:lenya-version> -<lenya:lenya-revision>@lenya.revision@</lenya:lenya-revision> -<lenya:cocoon-version>2.1.8 or 2.1.9-dev</lenya:cocoon-version> -<lenya:name>Lenya's Weblog</lenya:name> - -<lenya:description> -This publication is an initiative to implement the <a href="http://www.intertwingly.net/wiki/pie/FrontPage">"Echo/Atom"</a> specification for syndicating, archiving and -editing episodic web sites (e.g. weblogs). -</lenya:description> - -<lenya:readme> -<h3>Customizing the layout</h3> -The fonts and colors can be customized by editing the file <code>resources/css/styles.css</code>. -The positioning can be customized by editing the file <code>xslt/global.xsl</code>. The following CSS resources -might be helpful -<br /><a href="http://www.w3schools.com/css/css_reference.asp">CSS2 Reference</a> -<br /><a href="http://www.csszengarden.com">The Beauty of CSS Design</a> -<br /><a href="http://www.lightsphere.com/colors/">216 Color Square</a> - -<h3>Weblog Resources</h3> -<a href="http://www.intertwingly.net/wiki/pie/Syntax">Doctypes</a> (entry, feed, etc.) -<br /> -<a href="http://www.imc.org/atom-syntax/mail-archive/maillist.html">Mailing List</a> -<br /> -<a href="http://intertwingly.net/stories/2003/07/01/example.necho">XML proposal of doctype entry</a> -<br /> -<a href="http://www.dynamicobjects.com/d2r/archives/001921.html">A Review of Blogging APIs</a> -<br /> -<a href="http://btrott.typepad.com/typepad/atom.xml">Sample Feed by TypePad</a> - -<h3>Other Atom API Implementations</h3> -<a href="http://bitworking.org/rfc/">Specification</a> -<br /> -<a href="http://diveintomark.org/archives/2003/08/18/atom_api_implementation">Overview</a> -<br /> -<a href="http://bitworking.org/rfc/implementation/wxAtomClient_25Aug2003.zip">Python Client</a> -<br /> -<code>export HTTP_PROXY=http://127.0.0.1:4444</code> -<br /> -<code>python wxAtomClientApp.py</code> -<br /> -<a href="http://www.diveintomark.org/atom/">Testing the client</a> -<br /> -<code>java -classpath lib/axis.jar org.apache.axis.utils.tcpmon</code> -(Listen Port # 4444, Act as a ... Proxy, Options: HTTP Proxy Support) -<br /> -<a href="http://diveintomark.org/public/2003/08/atom-api-20030825.py">Python Server</a> -<br /> -<a href="http://www.intertwingly.net/code/mombo/">Python Server</a> - -<h3>Atom Misc</h3> -<a href="http://www.feedvalidator.org">http://www.feedvalidator.org</a> -<br /> -<a href="http://feedvalidator.org/download/rssvalidator-latest.zip">Download Feed Validator</a> -</lenya:readme> - -</lenya:publication> Added: lenya/branches/trunk-rework-pubconf/src/pubs/blog/readme.xml URL: http://svn.apache.org/viewvc/lenya/branches/trunk-rework-pubconf/src/pubs/blog/readme.xml?view=auto&rev=511575 ============================================================================== --- lenya/branches/trunk-rework-pubconf/src/pubs/blog/readme.xml (added) +++ lenya/branches/trunk-rework-pubconf/src/pubs/blog/readme.xml Sun Feb 25 11:06:22 2007 @@ -0,0 +1,79 @@ +<?xml version="1.0"?> +<!-- + 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. +--> + +<!-- $Id: introduction.xml 473861 2006-11-12 03:51:14Z gregor $ --> + +<page:page + xmlns:page="http://apache.org/cocoon/lenya/cms-page/1.0" + xmlns="http://www.w3.org/1999/xhtml" +> + <page:head/> + <page:body> + <h1>README: Blog</h1> + <h2>Customizing the layout</h2> + <p> + The fonts and colors can be customized by editing the file <code>resources/css/styles.css</code>. + The positioning can be customized by editing the file <code>xslt/global.xsl</code>. The following CSS resources + might be helpful: + </p> + <ul> + <li><a href="http://www.w3schools.com/css/css_reference.asp">CSS2 Reference</a></li> + <li><a href="http://www.csszengarden.com">The Beauty of CSS Design</a></li> + <li><a href="http://www.lightsphere.com/colors/">216 Color Square</a></li> + </ul> + <h2>Testing the blog</h2> + <ul> + <li>Feed example: <a href="live/feeds/all/index.xml">XML</a>, <a href="live/feeds/all/index.html">HTML</a></li> + <li>WebDAV: <a href="webdav://127.0.0.1:8080/lenya/blog/webdav/entries/2003/">Collection</a></li> + <li>Atom: <a href="atomapi/">Introspection</a>, <a href="atomapi/search?atom-all">atom-all</a></li> + </ul> + <h2>Weblog Resources</h2> + <ul> + <li><a href="http://www.intertwingly.net/wiki/pie/Syntax">Doctypes</a> (entry, feed, etc.)</li> + <li><a href="http://www.imc.org/atom-syntax/mail-archive/maillist.html">Mailing List</a></li> + <li><a href="http://intertwingly.net/stories/2003/07/01/example.necho">XML proposal of doctype entry</a></li> + <li><a href="http://www.dynamicobjects.com/d2r/archives/001921.html">A Review of Blogging APIs</a></li> + <li><a href="http://btrott.typepad.com/typepad/atom.xml">Sample Feed by TypePad</a></li> + </ul> + + <h2>Other Atom API Implementations</h2> + <ul> + <li><a href="http://bitworking.org/rfc/">Specification</a></li> + <li><a href="http://diveintomark.org/archives/2003/08/18/atom_api_implementation">Overview</a></li> + <li> + <a href="http://bitworking.org/rfc/implementation/wxAtomClient_25Aug2003.zip">Python Client</a><br /> + <code>export HTTP_PROXY=http://127.0.0.1:4444</code><br /> + <code>python wxAtomClientApp.py</code> + </li> + <li> + <a href="http://www.diveintomark.org/atom/">Testing the client</a><br /> + <code>java -classpath lib/axis.jar org.apache.axis.utils.tcpmon</code><br /> + (Listen Port # 4444, Act as a ... Proxy, Options: HTTP Proxy Support) + </li> + <li><a href="http://diveintomark.org/public/2003/08/atom-api-20030825.py">Python Server</a></li> + <li><a href="http://www.intertwingly.net/code/mombo/">Python Server</a></li> + </ul> + + <h2>Atom Misc</h2> + <ul> + <li><a href="http://www.feedvalidator.org">http://www.feedvalidator.org</a></li> + <li><a href="http://feedvalidator.org/download/rssvalidator-latest.zip">Download Feed Validator</a></li> + </ul> + </page:body> +</page:page> + Propchange: lenya/branches/trunk-rework-pubconf/src/pubs/blog/readme.xml ------------------------------------------------------------------------------ svn:eol-style = native Modified: lenya/branches/trunk-rework-pubconf/src/pubs/default/config/publication.xconf URL: http://svn.apache.org/viewvc/lenya/branches/trunk-rework-pubconf/src/pubs/default/config/publication.xconf?view=diff&rev=511575&r1=511574&r2=511575 ============================================================================== --- lenya/branches/trunk-rework-pubconf/src/pubs/default/config/publication.xconf (original) +++ lenya/branches/trunk-rework-pubconf/src/pubs/default/config/publication.xconf Sun Feb 25 11:06:22 2007 @@ -18,8 +18,15 @@ <!-- $Id$ --> -<publication> +<publication xmlns="http://apache.org/cocoon/lenya/publication/1.1" > + <name>Default Publication</name> + <description>This publication is a best practice, getting started publication.</description> + <!-- the @...@ macros are evaluated by ant at build time --> + <version>@lenya.version@</version> + <lenya-version>@lenya.version@</lenya-version> + <lenya-revision>@lenya.revision@</lenya-revision> + <cocoon-version>2.1.10-dev</cocoon-version> <!-- NOTE: The various languages need to be listed for verification and widget building --> <languages> <language default="true">en</language> @@ -35,36 +42,41 @@ <site-manager name="tree"/> <!-- NOTE: Resource types need to be listed because of the workflow resp. because the workflow depends on the publication and not on the resource type --> - <resource-type name="xhtml" workflow="fallback://config/workflow/workflow.xml"/> - <resource-type name="homepage" workflow="fallback://config/workflow/workflow.xml"/> - <resource-type name="links" workflow="fallback://config/workflow/workflow.xml"/> - <resource-type name="cforms" workflow="fallback://config/workflow/workflow.xml"/> - <resource-type name="opendocument" workflow="fallback://config/workflow/workflow.xml"/> - <resource-type name="resource" workflow="fallback://config/workflow/workflow.xml"/> - <resource-type name="usecase" workflow="fallback://config/workflow/workflow.xml"/> + <resource-types> + <resource-type name="xhtml" workflow="fallback://config/workflow/workflow.xml"/> + <resource-type name="homepage" workflow="fallback://config/workflow/workflow.xml"/> + <resource-type name="links" workflow="fallback://config/workflow/workflow.xml"/> + <resource-type name="cforms" workflow="fallback://config/workflow/workflow.xml"/> + <resource-type name="opendocument" workflow="fallback://config/workflow/workflow.xml"/> + <resource-type name="resource" workflow="fallback://config/workflow/workflow.xml"/> + <resource-type name="usecase" workflow="fallback://config/workflow/workflow.xml"/> + </resource-types> <!-- NOTE: Modules need to be listed because of the menu and i18n --> - <module name="editors"/> - <module name="xhtml"/> - <module name="links"/> - <module name="opendocument"/> - <module name="cforms"/> - <module name="homepage"/> - <module name="resource"/> - <module name="sitemanagement"/> - <module name="sitetree"/> - <module name="export"/> - <module name="workflow"/> - <module name="notification"/> - <module name="svg"/> - <module name="lucene"/> - <module name="development"/> - <module name="languageselector"/> - <module name="administration"/> - <!-- TODO: The goal is to have a blog module ;-) --> - <!-- - <module name="blog"/> - --> + <modules> + <module name="editors"/> + <module name="xhtml"/> + <module name="links"/> + <module name="opendocument"/> + <module name="cforms"/> + <module name="homepage"/> + <module name="resource"/> + <module name="sitemanagement"/> + <module name="sitetree"/> + <module name="export"/> + <module name="workflow"/> + <module name="notification"/> + <module name="svg"/> + <module name="lucene"/> + <module name="development"/> + <module name="languageselector"/> + <module name="administration"/> + <module name="workflow"/> + <!-- TODO: The goal is to have a blog module ;-) --> + <!-- + <module name="blog"/> + --> + </modules> <!-- NOTE: The configuration of the content directory has NOT been fully tested yet and might lead to unexpected results. Use at own risk ;-) --> <!-- Relative to webapp context: --> @@ -80,12 +92,12 @@ <!-- For information about these settings, read http://lenya.apache.org/1_2_x/components/deployment/proxying.html - - <proxy area="live" ssl="true" url="https://www.host.com/ssl/default"/> - <proxy area="live" ssl="false" url="http://www.host.com/default"/> - <proxy area="authoring" ssl="true" url="https://www.host.com/lenya/default/authoring"/> - <proxy area="authoring" ssl="false" url="http://www.host.com/lenya/default/authoring"/> + <proxies> + <proxy area="live" ssl="true" url="https://www.host.com/ssl/default"/> + <proxy area="live" ssl="false" url="http://www.host.com/default"/> + <proxy area="authoring" ssl="true" url="https://www.host.com/lenya/default/authoring"/> + <proxy area="authoring" ssl="false" url="http://www.host.com/lenya/default/authoring"/> + </proxies> --> <link-attribute xpath="//*[namespace-uri() = 'http://www.w3.org/1999/xhtml']/@href"/> - </publication> Modified: lenya/branches/trunk-rework-pubconf/src/pubs/default/publication.xml URL: http://svn.apache.org/viewvc/lenya/branches/trunk-rework-pubconf/src/pubs/default/publication.xml?view=diff&rev=511575&r1=511574&r2=511575 ============================================================================== --- lenya/branches/trunk-rework-pubconf/src/pubs/default/publication.xml (original) +++ lenya/branches/trunk-rework-pubconf/src/pubs/default/publication.xml Sun Feb 25 11:06:22 2007 @@ -1,69 +0,0 @@ -<?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. ---> - -<!-- $Id$ --> - -<lenya:publication xmlns:lenya="http://apache.org/cocoon/lenya/publication/1.0" lenya:show="true"> - <lenya:name>Default Publication</lenya:name> - <lenya:pub-version>@lenya.version@</lenya:pub-version> - <lenya:lenya-version>@lenya.version@</lenya:lenya-version> - <lenya:lenya-revision>@lenya.revision@</lenya:lenya-revision> - <lenya:cocoon-version>2.1.8 or 2.1.9-dev</lenya:cocoon-version> - <lenya:modules> - <lenya:module>lucene</lenya:module> - <lenya:module>homepage</lenya:module> - <lenya:module>xhtml</lenya:module> - <lenya:module>links</lenya:module> - <lenya:module href="https://svn.apache.org/repos/asf/lenya/trunk/src/modules/opendocument">opendocument</lenya:module> - <lenya:module>cforms</lenya:module> - <lenya:module>sitetree</lenya:module> - <lenya:module>...</lenya:module> - </lenya:modules> - <lenya:description>This publication is a best practice, getting started publication.</lenya:description> - <lenya:credits>Special thanks to </lenya:credits> - <lenya:help></lenya:help> - <lenya:changelog>changes.xml</lenya:changelog> - <lenya:license></lenya:license> - <lenya:readme> - <ol> - <li><a href="live/index.html">Reader`s View</a> (Live)</li> - <li><a href="authoring/index.html">Editor`s View</a> (Authoring)</li> - </ol> - - <h4>Use WebDAV</h4> - <ul> - <li>Cadaver: cadaver http://127.0.0.1:8888/default/webdav</li> - <li>More Info: <a href="http://wiki.apache.org/lenya/HowToEditWithWebDAV">http://wiki.apache.org/lenya/HowToEditWithWebDAV</a></li> - </ul> - - <!-- - <h4>Enable JCR</h4> - <ul> - <li>Build Lenya and start it</li> - <li>Import content from filesystem into JCR Repository by executing: <a href="../index.html?lenya.usecase=jcr.import">../index.html?lenya.usecase=jcr.import</a> - </li> - <li>Stop Lenya</li> - <li>Switch the NodeFactory within <i>build/lenya/webapp/WEB-INF/classes/org/apache/lenya/lenya.roles</i> to <i>org.apache.lenya.cms.jcr.JCRNodeFactory</i> - </li> - <li>Optional: The JCR implementation can be configured within local.build.properties resp. build.properties</li> - <li>Start Lenya</li> - </ul> - --> - - </lenya:readme> -</lenya:publication> Added: lenya/branches/trunk-rework-pubconf/src/pubs/default/readme.xml URL: http://svn.apache.org/viewvc/lenya/branches/trunk-rework-pubconf/src/pubs/default/readme.xml?view=auto&rev=511575 ============================================================================== --- lenya/branches/trunk-rework-pubconf/src/pubs/default/readme.xml (added) +++ lenya/branches/trunk-rework-pubconf/src/pubs/default/readme.xml Sun Feb 25 11:06:22 2007 @@ -0,0 +1,51 @@ +<?xml version="1.0"?> +<!-- + 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. +--> + +<!-- $Id: introduction.xml 473861 2006-11-12 03:51:14Z gregor $ --> + +<page:page + xmlns:page="http://apache.org/cocoon/lenya/cms-page/1.0" + xmlns="http://www.w3.org/1999/xhtml" +> + <page:head/> + <page:body> + <h1>README: Default publication</h1> + <h2>Use WebDAV:</h2> + <ul> + <li>Cadaver: cadaver http://127.0.0.1:8888/default/webdav</li> + <li>More Info: <a href="http://wiki.apache.org/lenya/HowToEditWithWebDAV">http://wiki.apache.org/lenya/HowToEditWithWebDAV</a></li> + </ul> +<!-- + <h2>Enable JCR</h2> + <ul> + <li>Build Lenya and start it</li> + <li> + Import content from filesystem into JCR Repository by executing: + <a href="../index.html?lenya.usecase=jcr.import">../index.html?lenya.usecase=jcr.import</a> + </li> + <li>Stop Lenya</li> + <li> + Switch the NodeFactory within <i>build/lenya/webapp/WEB-INF/classes/org/apache/lenya/lenya.roles</i> + to <i>org.apache.lenya.cms.jcr.JCRNodeFactory</i> + </li> + <li>Optional: The JCR implementation can be configured within local.build.properties resp. build.properties</li> + <li>Start Lenya</li> + </ul> +--> + </page:body> +</page:page> Propchange: lenya/branches/trunk-rework-pubconf/src/pubs/default/readme.xml ------------------------------------------------------------------------------ svn:eol-style = native Modified: lenya/branches/trunk-rework-pubconf/src/targets/dist-build.xml URL: http://svn.apache.org/viewvc/lenya/branches/trunk-rework-pubconf/src/targets/dist-build.xml?view=diff&rev=511575&r1=511574&r2=511575 ============================================================================== --- lenya/branches/trunk-rework-pubconf/src/targets/dist-build.xml (original) +++ lenya/branches/trunk-rework-pubconf/src/targets/dist-build.xml Sun Feb 25 11:06:22 2007 @@ -117,9 +117,9 @@ <!-- Replace version placeholder with build version --> <replace dir="${dist.src.dir}"> - <include name="**/introduction.xml"/> + <include name="**/welcome.xml"/> <include name="**/about.xml"/> - <include name="**/publication.xml"/> + <include name="**/config/publication.xconf"/> <replacefilter token="@lenya.version@" value="${version}"/> <replacefilter token="@lenya.revision@" value="${lenya.revision}"/> </replace> Modified: lenya/branches/trunk-rework-pubconf/src/targets/test-build.xml URL: http://svn.apache.org/viewvc/lenya/branches/trunk-rework-pubconf/src/targets/test-build.xml?view=diff&rev=511575&r1=511574&r2=511575 ============================================================================== --- lenya/branches/trunk-rework-pubconf/src/targets/test-build.xml (original) +++ lenya/branches/trunk-rework-pubconf/src/targets/test-build.xml Sun Feb 25 11:06:22 2007 @@ -73,7 +73,7 @@ </fileset> </copy> <replace encoding="utf-8" - file="${build.webapp}/lenya/pubs/${test.pub.id}/publication.xml" + file="${build.webapp}/lenya/pubs/${test.pub.id}/config/publication.xconf" token="Default Publication" value="Test Publication"/> </target> Modified: lenya/branches/trunk-rework-pubconf/src/targets/webapp-build.xml URL: http://svn.apache.org/viewvc/lenya/branches/trunk-rework-pubconf/src/targets/webapp-build.xml?view=diff&rev=511575&r1=511574&r2=511575 ============================================================================== --- lenya/branches/trunk-rework-pubconf/src/targets/webapp-build.xml (original) +++ lenya/branches/trunk-rework-pubconf/src/targets/webapp-build.xml Sun Feb 25 11:06:22 2007 @@ -194,9 +194,9 @@ <!-- Replace version placeholder with build version --> <replace dir="${build.webapp}"> - <include name="lenya/content/introduction.xml"/> + <include name="lenya/content/welcome.xml"/> <include name="lenya/content/about.xml"/> - <include name="**/publication.xml"/> + <include name="**/config/publication.xconf"/> <replacefilter token="@lenya.version@" value="${version}"/> <replacefilter token="@lenya.revision@" value="${lenya.revision}"/> </replace> Modified: lenya/branches/trunk-rework-pubconf/src/webapp/global-sitemap.xmap URL: http://svn.apache.org/viewvc/lenya/branches/trunk-rework-pubconf/src/webapp/global-sitemap.xmap?view=diff&rev=511575&r1=511574&r2=511575 ============================================================================== --- lenya/branches/trunk-rework-pubconf/src/webapp/global-sitemap.xmap (original) +++ lenya/branches/trunk-rework-pubconf/src/webapp/global-sitemap.xmap Sun Feb 25 11:06:22 2007 @@ -89,9 +89,9 @@ <!-- =========================== Pipelines ================================= --> <map:pipeline> - <map:match pattern="publications.xml"> + <map:match pattern="aggregate-publications"> <map:generate type="directory" src="lenya/pubs"/> - <map:transform src="lenya/xslt/util/xinclude.xsl"/> + <map:transform src="lenya/xslt/util/aggregate-publications.xsl"/> <map:transform type="xinclude"/> <map:serialize type="xml"/> </map:match> @@ -302,9 +302,10 @@ <map:pipeline> <map:match pattern="index.html"> - <map:aggregate element="lenya" ns="http://apache.org/cocoon/lenya/publication/1.0" prefix="lenya" label="aggregate"> - <map:part src="cocoon:/publications.xml"/> - <map:part src="lenya/content/introduction.xml"/> + <map:aggregate element="aggregation-wrapper" label="aggregate"> + <map:part src="cocoon:/aggregate-publications"/> + <map:part src="lenya/content/welcome.xml"/> + <map:part src="readme.xml"/> </map:aggregate> <map:transform src="lenya/xslt/util/welcome.xsl"/> <map:call resource="style-cms-page"/> @@ -362,15 +363,11 @@ <!-- About Publication --> <map:match pattern="*/introduction.html"> - <map:generate src="lenya/pubs/{1}/publication.xml" /> - <map:transform src="lenya/xslt/util/publication.xsl"/> - <map:call resource="style-cms-page"/> - <map:serialize /> - </map:match> - <!-- Publication Tests--> - <map:match pattern="*/tests.html"> - <map:generate src="lenya/pubs/{1}/publication-tests.xml" /> - <map:transform src="lenya/xslt/util/publication.xsl"/> + <map:aggregate element="aggregation-wrapper"> + <map:part src="aggregate-fallback://readme.xml"/> + <map:part src="lenya/pubs/{1}/config/publication.xconf"/> + </map:aggregate> + <map:transform src="lenya/xslt/util/introduction.xsl"/> <map:call resource="style-cms-page"/> <map:serialize /> </map:match> Added: lenya/branches/trunk-rework-pubconf/src/webapp/lenya/content/welcome.xml URL: http://svn.apache.org/viewvc/lenya/branches/trunk-rework-pubconf/src/webapp/lenya/content/welcome.xml?view=auto&rev=511575 ============================================================================== --- lenya/branches/trunk-rework-pubconf/src/webapp/lenya/content/welcome.xml (added) +++ lenya/branches/trunk-rework-pubconf/src/webapp/lenya/content/welcome.xml Sun Feb 25 11:06:22 2007 @@ -0,0 +1,51 @@ +<?xml version="1.0"?> +<!-- + 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. +--> + +<!-- $Id: introduction.xml 473861 2006-11-12 03:51:14Z gregor $ --> + +<page:page + xmlns:page="http://apache.org/cocoon/lenya/cms-page/1.0" + xmlns="http://www.w3.org/1999/xhtml" +> + <page:head/> + <page:body> + <h1>Welcome to Apache Lenya</h1> + <p> + You have successfully installed Apache Lenya <strong>@lenya.version@</strong> + (Revision: @lenya.revision@). To start, click on any of the publications on the left. + </p> + <p> + <h2>About Apache Lenya</h2> + </p> + <p> + <a href="http://lenya.apache.org">Apache Lenya</a> is a Java-based + <a href="http://www.opensource.org">Open-Source</a> Content Management System. + It is based on open standards such as <a href="http://www.w3c.org/XML/">XML</a> and + <a href="http://www.w3c.org/TR/xslt">XSLT</a>. One of its core components is + <a href="http://cocoon.apache.org">Cocoon</a> from the + <a href="http://www.apache.org">Apache Software Foundation</a>. + </p> + <p> + Lenya supports inline WYSIWYG editors such as <a href="http://kupu.oscom.org">Kupu</a> + or <a href="http://bxe.oscom.org">BXE</a>. Your site editors do not have to learn XML. + This is possible thanks to the support of XML, XSLT and XML Schema on the client side. + An administration interface allows advanced users to monitor the CMS, and perform + configuration tasks. + </p> + </page:body> +</page:page> \ No newline at end of file Propchange: lenya/branches/trunk-rework-pubconf/src/webapp/lenya/content/welcome.xml ------------------------------------------------------------------------------ svn:eol-style = native Modified: lenya/branches/trunk-rework-pubconf/src/webapp/lenya/resources/css/default.css URL: http://svn.apache.org/viewvc/lenya/branches/trunk-rework-pubconf/src/webapp/lenya/resources/css/default.css?view=diff&rev=511575&r1=511574&r2=511575 ============================================================================== --- lenya/branches/trunk-rework-pubconf/src/webapp/lenya/resources/css/default.css (original) +++ lenya/branches/trunk-rework-pubconf/src/webapp/lenya/resources/css/default.css Sun Feb 25 11:06:22 2007 @@ -28,12 +28,17 @@ } h1 { - font-family: Verdana, sans-serif; font-size: 150%; padding: 0px; margin: 0px; } +h2 { font-size: 120%; } +h3 { font-size: 110%; } +h4 { font-size: 100%; } +h5 { font-size: 90%; } +h6 { font-size: 80%; } + p { font-size: small; } @@ -41,6 +46,27 @@ li { font-size: small; } + +td.lenya-content table { + margin-top:1em; +/* + border:1px solid #dddccf; + border-collapse:collapse; +*/ +} + +td.lenya-content td,td.lenya-content th { +/* + border:1px solid #dddccf; + padding: 0 0.25em; +*/ +} + +td.lenya-content th { + text-align:left; + font-weight:bold; +} + .lenya-header { vertical-align: bottom; Modified: lenya/branches/trunk-rework-pubconf/src/webapp/lenya/resources/i18n/modules2xinclude.xsl URL: http://svn.apache.org/viewvc/lenya/branches/trunk-rework-pubconf/src/webapp/lenya/resources/i18n/modules2xinclude.xsl?view=diff&rev=511575&r1=511574&r2=511575 ============================================================================== --- lenya/branches/trunk-rework-pubconf/src/webapp/lenya/resources/i18n/modules2xinclude.xsl (original) +++ lenya/branches/trunk-rework-pubconf/src/webapp/lenya/resources/i18n/modules2xinclude.xsl Sun Feb 25 11:06:22 2007 @@ -21,9 +21,9 @@ <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xi="http://www.w3.org/2001/XInclude" - xmlns:lenya="http://apache.org/cocoon/lenya/publication/1.0" + xmlns:lenya="http://apache.org/cocoon/lenya/publication/1.1" > - + <xsl:param name="pubId"/> <xsl:param name="catalogue"/> @@ -31,17 +31,15 @@ <xsl:template match="catalogue"> <xsl:copy> <xsl:copy-of select="@*|node()"/> - <xsl:apply-templates select="document('aggregate-fallback://config/publication.xconf')/publication/module"/> + <xsl:apply-templates select="document('aggregate-fallback://config/publication.xconf')/*/lenya:modules/lenya:module"/> </xsl:copy> - </xsl:template> - - - <xsl:template match="module"> + </xsl:template> + + <xsl:template match="lenya:module"> <xsl:if test="not(preceding-sibling::module[@name = current()/@name])"> <xi:include href="cocoon:/i18n-catalogue/module/{@name}/{$catalogue}" xpointer="xpointer(/catalogue/message)"/> </xsl:if> </xsl:template> - - + </xsl:stylesheet> Added: lenya/branches/trunk-rework-pubconf/src/webapp/lenya/resources/schemas/publication.rng URL: http://svn.apache.org/viewvc/lenya/branches/trunk-rework-pubconf/src/webapp/lenya/resources/schemas/publication.rng?view=auto&rev=511575 ============================================================================== --- lenya/branches/trunk-rework-pubconf/src/webapp/lenya/resources/schemas/publication.rng (added) +++ lenya/branches/trunk-rework-pubconf/src/webapp/lenya/resources/schemas/publication.rng Sun Feb 25 11:06:22 2007 @@ -0,0 +1,210 @@ +<?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. +--> + +<!-- + This RELAX NG grammar defines the configuration file of a. Lenya publication. + Configuration files must be located under "$YOURPUBROOT/$PUBNAME/config/publication.xconf". + + This schema is new as of 2007-02-23. It is NOT backwards-compatible. It combines the + contents of $YOURPUBROOT/$PUBNAME/publication.xml and $YOURPUBROOT/$PUBNAME/config/publication.xconf. + + The publication.xconf file is parsed by: + + * src/impl/java/org/apache/lenya/cms/publication/PublicationConfiguration.java + * src/java/org/apache/lenya/cms/publication/templating/ExistingUsecaseResolver.java + * src/modules/repository/java/src/org/apache/lenya/cms/migration/Migrate14.java (?) + * src/webapp/lenya/xslt/util/aggregate-publications.xsl + * webapp/lenya/resources/i18n/modules2xinclude.xsl + * webapp/global-sitemap.xmap + + Please keep the implementations and this grammar in sync! +--> + +<grammar + xmlns="http://relaxng.org/ns/structure/1.0" + datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes" +> + + <!-- some convenience data types used in this grammar: --> + + <define name="booleanString"> + <choice> + <value>true</value> + <value>false</value> + </choice> + </define> + + <define name="fileURL"> + <!-- regex anyone? --> + <data type="string"/> + </define> + + <define name="isoLanguage"> + <data type="string"> + <param name="pattern">[a-zA-Z]{2}</param> + </data> + </define> + + <define name="lenyaAreaName"> + <choice> + <value>live</value> + <value>authoring</value> + </choice> + </define> + + <define name="javaClassName"> + <data type="string"> + <!-- too lenient, needs tightening --> + <param name="pattern">([\-_a-zA-Z0-9]+\.)+[\-_a-zA-Z0-9]+</param> + </data> + </define> + + <define name="moduleName"> + <ref name="simpleNameToken"/> + </define> + + <define name="resourceTypeName"> + <ref name="simpleNameToken"/> + </define> + + <define name="revisionString"> + <data type="string"> + </data> + </define> + + <define name="simpleNameToken"> + <data type="string"> + <param name="pattern">[a-z]+</param> + </data> + </define> + + <define name="versionString"> + <data type="string"> + <param name="pattern">(@lenya.version@)|(([0-9]+\.)+[0-9]+(-[\-_a-zA-Z0-9]+)?)</param> + </data> + </define> + + <define name="workflowUri"> + <data type="anyURI"/> + </define> + + <define name="XPathExpression"> + <!-- regex anyone? --> + <data type="string"/> + </define> + +<!-- here comes the important part --> + +<start> + +<element name="publication" + ns="http://apache.org/cocoon/lenya/publication/1.1" +> + <optional> + <attribute name="show"><ref name="booleanString"/></attribute> + </optional> + <interleave> + <element name="name"><data type="string"/></element> + <optional> + <element name="description"><data type="string"/></element> + </optional> + <optional> + <element name="version"><ref name="versionString"/></element> + </optional> + <optional> + <element name="lenya-version"><ref name="versionString"/></element> + </optional> + <optional> + <element name="lenya-revision"><ref name="revisionString"/></element> + </optional> + <optional> + <element name="cocoon-version"><ref name="versionString"/></element> + </optional> + <element name="languages"> + <oneOrMore> + <element name="language"> + <optional> + <attribute name="default"> + <ref name="booleanString"/> + </attribute> + </optional> + <ref name="isoLanguage"/> + </element> + </oneOrMore> + </element> + <optional> + <element name="templates"> + <oneOrMore> + <element name="template"> + <attribute name="id"> + <ref name="simpleNameToken"/> + </attribute> + </element> + </oneOrMore> + </element> + </optional> + <element name="template-instantiator"><attribute name="name"><data type="string"/></attribute></element> + <element name="path-mapper"> + <ref name="javaClassName"/> + </element> + <element name="document-builder"><attribute name="name"><data type="string"/></attribute></element> + <element name="site-manager"><attribute name="name"><data type="string"/></attribute></element> + <element name="resource-types"> + <oneOrMore> + <element name="resource-type"> + <attribute name="name"><ref name="resourceTypeName"/></attribute> + <attribute name="workflow"><ref name="workflowUri"/></attribute> + </element> + </oneOrMore> + </element> + <element name="modules"> + <oneOrMore> + <element name="module"> + <attribute name="name"><ref name="moduleName"/></attribute> + </element> + </oneOrMore> + </element> + <element name="breadcrumb-prefix"><data type="string"/></element> + <optional> + <element name="content-dir"> + <attribute name="src"> + <ref name="fileURL"/> + </attribute> + </element> + </optional> + <element name="link-attribute"> + <attribute name="xpath"><ref name="XPathExpression"/></attribute> + </element> + <optional> + <element name="proxies"> + <oneOrMore> + <element name="proxy"> + <attribute name="area"><ref name="lenyaAreaName"/></attribute> + <attribute name="ssl"><ref name="booleanString"/></attribute> + <attribute name="url"><data type="anyURI"/></attribute> + </element> + </oneOrMore> + </element> + </optional> + </interleave> + +</element> + +</start> + +</grammar> Propchange: lenya/branches/trunk-rework-pubconf/src/webapp/lenya/resources/schemas/publication.rng ------------------------------------------------------------------------------ svn:eol-style = native Modified: lenya/branches/trunk-rework-pubconf/src/webapp/lenya/xslt/modules/modules2xinclude.xsl URL: http://svn.apache.org/viewvc/lenya/branches/trunk-rework-pubconf/src/webapp/lenya/xslt/modules/modules2xinclude.xsl?view=diff&rev=511575&r1=511574&r2=511575 ============================================================================== --- lenya/branches/trunk-rework-pubconf/src/webapp/lenya/xslt/modules/modules2xinclude.xsl (original) +++ lenya/branches/trunk-rework-pubconf/src/webapp/lenya/xslt/modules/modules2xinclude.xsl Sun Feb 25 11:06:22 2007 @@ -21,7 +21,7 @@ <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xi="http://www.w3.org/2001/XInclude" - xmlns:lenya="http://apache.org/cocoon/lenya/publication/1.0" + xmlns="http://apache.org/cocoon/lenya/publication/1.1" xmlns:dir="http://apache.org/cocoon/directory/2.0" xmlns:menu="http://apache.org/cocoon/lenya/menubar/1.0" > @@ -30,7 +30,7 @@ <xsl:template match="publication"> <menu:menu> - <xsl:apply-templates select="module"/> + <xsl:apply-templates select="modules/module"/> </menu:menu> </xsl:template> Added: lenya/branches/trunk-rework-pubconf/src/webapp/lenya/xslt/util/aggregate-publications.xsl URL: http://svn.apache.org/viewvc/lenya/branches/trunk-rework-pubconf/src/webapp/lenya/xslt/util/aggregate-publications.xsl?view=auto&rev=511575 ============================================================================== --- lenya/branches/trunk-rework-pubconf/src/webapp/lenya/xslt/util/aggregate-publications.xsl (added) +++ lenya/branches/trunk-rework-pubconf/src/webapp/lenya/xslt/util/aggregate-publications.xsl Sun Feb 25 11:06:22 2007 @@ -0,0 +1,49 @@ +<?xml version="1.0" encoding="iso-8859-1"?> +<!-- + 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. +--> + +<!-- $Id: xinclude.xsl 473861 2006-11-12 03:51:14Z gregor $ --> + +<xsl:stylesheet version="1.0" + xmlns:xsl="http://www.w3.org/1999/XSL/Transform" + xmlns:xi="http://www.w3.org/2001/XInclude" + xmlns:lenya="http://apache.org/cocoon/lenya/publication/1.1" + xmlns:dir="http://apache.org/cocoon/directory/2.0" + > + +<xsl:template match="/"> + <xsl:apply-templates select="dir:directory"/> +</xsl:template> + +<xsl:template match="dir:directory"> + <lenya:publications> + <xsl:for-each select="dir:directory"> + <lenya:publication dirname="{@name}"> + <xi:include + href="lenya/pubs/{@name}/config/publication.xconf" + xpointer="xpointer(/*/*)" + > + <xi:fallback> + <lenya:name name="{@name}"/> + </xi:fallback> + </xi:include> + </lenya:publication> + </xsl:for-each> + </lenya:publications> +</xsl:template> + +</xsl:stylesheet> Propchange: lenya/branches/trunk-rework-pubconf/src/webapp/lenya/xslt/util/aggregate-publications.xsl ------------------------------------------------------------------------------ svn:eol-style = native Added: lenya/branches/trunk-rework-pubconf/src/webapp/lenya/xslt/util/introduction.xsl URL: http://svn.apache.org/viewvc/lenya/branches/trunk-rework-pubconf/src/webapp/lenya/xslt/util/introduction.xsl?view=auto&rev=511575 ============================================================================== --- lenya/branches/trunk-rework-pubconf/src/webapp/lenya/xslt/util/introduction.xsl (added) +++ lenya/branches/trunk-rework-pubconf/src/webapp/lenya/xslt/util/introduction.xsl Sun Feb 25 11:06:22 2007 @@ -0,0 +1,180 @@ +<?xml version="1.0"?> +<!-- + 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. +--> + +<!-- $Id: publication.xsl 473861 2006-11-12 03:51:14Z gregor $ --> + +<xsl:stylesheet + xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0" + xmlns:lenya="http://apache.org/cocoon/lenya/publication/1.1" + xmlns:page="http://apache.org/cocoon/lenya/cms-page/1.0" + xmlns:xhtml="http://www.w3.org/1999/xhtml" + xmlns="http://www.w3.org/1999/xhtml" +> + + +<xsl:key name="workflows" match="lenya:resource-type" use="@workflow"/> + +<xsl:template match="/*"> +<page:page> + <page:title>Apache Lenya - <xsl:value-of select="lenya:publication/lenya:name"/></page:title> + <page:head/> + <page:body> + <div class="lenya-sidebar"> + <div class="lenya-sidebar-heading">This Publication</div> + <ul> + <li><a href="authoring/">Login as Editor</a></li> + <li><a href="live/">Live View</a></li> + </ul> + <div class="lenya-publication-item"><a href="../index.html">Other Publications</a></div> + <div class="lenya-publication-item"><a href="http://lenya.apache.org/docs/index.html">Documentation</a></div> + <div class="lenya-publication-item"><a href="http://wiki.apache.org/lenya">Wiki</a></div> + </div> + + <div class="lenya-frontpage"> + <h1>Publication properties:</h1> + <xsl:apply-templates select="lenya:publication"/> + <xsl:apply-templates select="page:page"/> + + </div> + </page:body> +</page:page> +</xsl:template> + +<xsl:template match="lenya:publication"> + <table> + <tr> + <th>Name</th> + <td><xsl:value-of select="lenya:name"/></td> + </tr> + <tr> + <th>Revision</th> + <td><xsl:value-of select="lenya:version"/></td> + </tr> + <tr> + <th>Description</th> + <td><xsl:value-of select="lenya:description"/></td> + </tr> + <tr> + <th>Available languages</th> + <td> + <xsl:for-each select="lenya:languages/lenya:language"> + <xsl:choose> + <xsl:when test="@default"> + <strong><xsl:value-of select="."/></strong> + </xsl:when> + <xsl:otherwise> + <xsl:value-of select="."/> + </xsl:otherwise> + </xsl:choose> + <xsl:text> </xsl:text> + </xsl:for-each> + </td> + </tr> + <tr> + <th>Available resource types</th> + <td> + <xsl:for-each + select="lenya:resource-types/lenya:resource-type[generate-id(.)=generate-id(key('workflows', @workflow)[1])]" + > + <xsl:sort select="@workflow"/> + <xsl:for-each select="key('workflows', @workflow)"> + <xsl:sort select="@name"/> + <xsl:value-of select="@name"/> + <xsl:if test="position() != last()"> + <xsl:text>, </xsl:text> + </xsl:if> + </xsl:for-each> + <xsl:text> (Workflow: </xsl:text> + <xsl:value-of select="@workflow"/> + <xsl:text>)</xsl:text> + <xsl:if test="position() != last()"> + <xsl:text>;</xsl:text><br /> + </xsl:if> + </xsl:for-each> + </td> + </tr> + <tr> + <th>Required Lenya version</th> + <td><xsl:value-of select="lenya:lenya-version"/></td> + </tr> + <tr> + <th>Required Lenya revision</th> + <td><xsl:value-of select="lenya:lenya-revision"/></td> + </tr> + <tr> + <th>Required Cocoon version</th> + <td><xsl:value-of select="lenya:cocoon-version"/></td> + </tr> + <tr> + <th>Modules used</th> + <td> + <xsl:for-each select="lenya:modules/lenya:module"> + <xsl:value-of select="@name"/> + <xsl:if test="position() != last()"> + <xsl:text>, </xsl:text> + </xsl:if> + </xsl:for-each> + </td> + </tr> + <tr> + <th>Templates used</th> + <td> + <xsl:for-each select="lenya:templates/lenya:template"> + <a href="../{@id}/introduction.html"> + <xsl:value-of select="@id"/> + </a> + <xsl:if test="position() != last()"> + <xsl:text>, </xsl:text> + </xsl:if> + </xsl:for-each> + </td> + </tr> + </table> +</xsl:template> + +<xsl:template match="page:page"> +<!-- FIXME: aggregate-fallback seems to return the last document twice. + The position predicate is just a quick workaround and needs to be fixed! --> + <xsl:for-each select="page:body[position() < last()]"> + <xsl:apply-templates select="*"/> + </xsl:for-each> +</xsl:template> + +<!-- we are aggretating into a new context: + (another good reason to move to xhtml2) --> +<xsl:template match="xhtml:h1"> + <h2><xsl:apply-templates select="@*|node()"/></h2> +</xsl:template> +<xsl:template match="xhtml:h2"> + <h3><xsl:apply-templates select="@*|node()"/></h3> +</xsl:template> +<xsl:template match="xhtml:h3"> + <h4><xsl:apply-templates select="@*|node()"/></h4> +</xsl:template> +<xsl:template match="xhtml:h4"> + <h5><xsl:apply-templates select="@*|node()"/></h5> +</xsl:template> +<xsl:template match="xhtml:h5|xhtml:h6"> + <h6><xsl:apply-templates select="@*|node()"/></h6> +</xsl:template> + +<xsl:template match="@*|node()"> + <xsl:copy><xsl:apply-templates select="@*|node()"/></xsl:copy> +</xsl:template> + +</xsl:stylesheet> Propchange: lenya/branches/trunk-rework-pubconf/src/webapp/lenya/xslt/util/introduction.xsl ------------------------------------------------------------------------------ svn:eol-style = native Modified: lenya/branches/trunk-rework-pubconf/src/webapp/lenya/xslt/util/welcome.xsl URL: http://svn.apache.org/viewvc/lenya/branches/trunk-rework-pubconf/src/webapp/lenya/xslt/util/welcome.xsl?view=diff&rev=511575&r1=511574&r2=511575 ============================================================================== --- lenya/branches/trunk-rework-pubconf/src/webapp/lenya/xslt/util/welcome.xsl (original) +++ lenya/branches/trunk-rework-pubconf/src/webapp/lenya/xslt/util/welcome.xsl Sun Feb 25 11:06:22 2007 @@ -19,49 +19,69 @@ <!-- $Id$ --> <xsl:stylesheet version="1.0" + xmlns:lenya="http://apache.org/cocoon/lenya/publication/1.1" + xmlns:page="http://apache.org/cocoon/lenya/cms-page/1.0" + xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" - xmlns:lenya="http://apache.org/cocoon/lenya/publication/1.0" xmlns="http://www.w3.org/1999/xhtml" - xmlns:xhtml="http://www.w3.org/1999/xhtml" - xmlns:page="http://apache.org/cocoon/lenya/cms-page/1.0" - > +> -<xsl:template match="lenya:lenya"> +<xsl:template match="/*"> <page:page> - - <page:title>Apache Lenya - Content Management System</page:title> - <page:head> - <xhtml:meta http-equiv="cache-control" content="no-cache"/> - <xhtml:meta http-equiv="pragma" content="no-cache"/> - </page:head> - <page:body> - <xsl:apply-templates select="xhtml:div[@class = 'lenya-frontpage']"/> - <xsl:apply-templates select="lenya:publications"/> - </page:body> + <page:title>Apache Lenya - Content Management System</page:title> + <page:head> + <xhtml:meta http-equiv="cache-control" content="no-cache"/> + <xhtml:meta http-equiv="pragma" content="no-cache"/> + </page:head> + <page:body> + <xsl:apply-templates select="lenya:publications"/> + <xsl:apply-templates select="page:page"/> + </page:body> </page:page> </xsl:template> <xsl:template match="lenya:publications"> -<div class="lenya-sidebar"> -<div class="lenya-sidebar-heading">Publications</div> + <div class="lenya-sidebar"> + <div class="lenya-sidebar-heading">Publications</div> <div class="lenya-publication-item"> <strong><a href="index.html?lenya.usecase=templating.createPublicationFromTemplate">New publication</a></strong> </div> -<xsl:for-each select="lenya:publication"> - <xsl:choose> - <xsl:when test="lenya:publication/@lenya:show = 'false'"> - <!-- do not list this publication. Might be a "template" publication --> - </xsl:when> - <xsl:otherwise> - <div class="lenya-publication-item"> - <a href="{@pid}/introduction.html"> - <xsl:value-of select="lenya:publication/lenya:name|lenya:publication/lenya:name/@name"/></a> - </div> - </xsl:otherwise> - </xsl:choose> -</xsl:for-each> -</div> + <!-- do not list publications with @show="false" + (can be used to hide template publications --> + <xsl:for-each select="lenya:publication[not(@show) or @show != 'false']"> + <div class="lenya-publication-item"> + <a> + <xsl:attribute name="href"><xsl:value-of select="@dirname"/><xsl:text>/introduction.html</xsl:text></xsl:attribute> + <xsl:attribute name="title"><xsl:value-of select="lenya:description"/></xsl:attribute> + <xsl:value-of select="lenya:name"/> + </a> + </div> + </xsl:for-each> + </div> +</xsl:template> + +<xsl:template match="page:page"> + <xsl:apply-templates select="page:body/*"/> </xsl:template> + +<!-- we are aggretating into a new context: + (another good reason to move to xhtml2) --> +<xsl:template match="xhtml:h1"> + <h2><xsl:apply-templates select="@*|node()"/></h2> +</xsl:template> +<xsl:template match="xhtml:h2"> + <h3><xsl:apply-templates select="@*|node()"/></h3> +</xsl:template> +<xsl:template match="xhtml:h3"> + <h4><xsl:apply-templates select="@*|node()"/></h4> +</xsl:template> +<xsl:template match="xhtml:h4"> + <h5><xsl:apply-templates select="@*|node()"/></h5> +</xsl:template> +<xsl:template match="xhtml:h5|xhtml:h6"> + <h6><xsl:apply-templates select="@*|node()"/></h6> +</xsl:template> + <xsl:template match="@*|node()"> <xsl:copy><xsl:apply-templates select="@*|node()"/></xsl:copy> Added: lenya/branches/trunk-rework-pubconf/src/webapp/readme.xml URL: http://svn.apache.org/viewvc/lenya/branches/trunk-rework-pubconf/src/webapp/readme.xml?view=auto&rev=511575 ============================================================================== --- lenya/branches/trunk-rework-pubconf/src/webapp/readme.xml (added) +++ lenya/branches/trunk-rework-pubconf/src/webapp/readme.xml Sun Feb 25 11:06:22 2007 @@ -0,0 +1,57 @@ +<?xml version="1.0"?> +<!-- + 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. +--> + +<!-- $Id: introduction.xml 473861 2006-11-12 03:51:14Z gregor $ --> + +<page:page + xmlns:page="http://apache.org/cocoon/lenya/cms-page/1.0" + xmlns="http://www.w3.org/1999/xhtml" +> + <page:head/> + <page:body> + <h1>README: Apache Lenya</h1> + <p> + <em>Note to developers:</em> Please use this file to inform users + about changes in the code or behaviour of Lenya. It is located under + <code>src/webapp/readme.xml</code>. Its contents will be shown on the global + welcome page, and also on the introduction page of every publication. + </p> + <p><strong><em>You need to update your custom publication.xconf files!</em></strong></p> + <p> + As of revision FIXME, the file <code>$YOURPUB/publication.xml</code> + is deprecated and no longer used. Its contents should be moved to + <code>$YOURPUB/config/publication.xconf.</code> + </p> + <p> + <em>Most important changes:</em> All elements in publication.xconf must now be + in the namespace <code>http://apache.org/cocoon/lenya/publication/1.1</code>, + and <code><module/></code>, <code><proxy/></code>, and + <code><resource-type></code> elements must now be grouped + in <code><modules/></code>, <code><proxies/></code>, + and <code><resource-types></code>. See the default publication + for an example.<br /> + You can use <code>webapp/lenya/resources/schemas/publication.rng</code> + to verify that your file is correct. + </p> + <p> + If you want to provide a custom README for your publication, you can + put it in <code>$YOURPUP/readme.xsl</code>. + Just copy this file over and modify to your needs. + </p> + </page:body> +</page:page> Propchange: lenya/branches/trunk-rework-pubconf/src/webapp/readme.xml ------------------------------------------------------------------------------ svn:eol-style = native
|
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | svn commit: r511563 - /lenya/branches/trunk-rework-pubconf/, nettings |
|---|---|
| Next by Date: | svn commit: r511765 - /lenya/trunk/src/pubs/default/config/publication.xconf, andreas |
| Previous by Thread: | svn commit: r511563 - /lenya/branches/trunk-rework-pubconf/, nettings |
| Next by Thread: | svn commit: r511765 - /lenya/trunk/src/pubs/default/config/publication.xconf, 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 |