Author: reinhard Date: Mon Jan 24 09:26:45 2005 New Revision: 126303 URL: http://svn.apache.org/viewcvs?view=rev&rev=126303 Log: adjust global repository; support HTML documents; add eclipse project file Added: cocoon/whiteboard/doc-repos/.project cocoon/whiteboard/doc-repos/2.2/src/documentation/content/xdocs/getting-started/content_en.html cocoon/whiteboard/doc-repos/global/src/documentation/content/xdocs/community/ cocoon/whiteboard/doc-repos/global/src/documentation/content/xdocs/community/comments_en.xml cocoon/whiteboard/doc-repos/global/src/documentation/content/xdocs/community/content_en.xml cocoon/whiteboard/doc-repos/global/src/documentation/content/xdocs/community/meta.xml cocoon/whiteboard/doc-repos/global/src/documentation/content/xdocs/index/ cocoon/whiteboard/doc-repos/global/src/documentation/content/xdocs/index/comments_en.xml cocoon/whiteboard/doc-repos/global/src/documentation/content/xdocs/index/content_en.xml cocoon/whiteboard/doc-repos/global/src/documentation/content/xdocs/index/meta.xml cocoon/whiteboard/doc-repos/global/src/documentation/resources/stylesheets/correct-img-links.xsl Removed: cocoon/whiteboard/doc-repos/2.2/src/documentation/content/xdocs/getting-started/content_en.xml cocoon/whiteboard/doc-repos/global/src/documentation/content/xdocs/1.meta.xml cocoon/whiteboard/doc-repos/global/src/documentation/content/xdocs/1.xml cocoon/whiteboard/doc-repos/global/src/documentation/content/xdocs/2.meta.xml cocoon/whiteboard/doc-repos/global/src/documentation/content/xdocs/2.xml Modified: cocoon/whiteboard/doc-repos/2.2/src/documentation/content/xdocs/site.xml cocoon/whiteboard/doc-repos/2.2/src/documentation/sitemap.xmap cocoon/whiteboard/doc-repos/global/src/documentation/content/xdocs/site.xml cocoon/whiteboard/doc-repos/global/src/documentation/content/xdocs/tabs.xml cocoon/whiteboard/doc-repos/global/src/documentation/sitemap.xmap
Added: cocoon/whiteboard/doc-repos/.project Url: http://svn.apache.org/viewcvs/cocoon/whiteboard/doc-repos/.project?view=auto&rev=126303 ============================================================================== --- (empty file) +++ cocoon/whiteboard/doc-repos/.project Mon Jan 24 09:26:45 2005 @@ -0,0 +1,11 @@ +<?xml version="1.0" encoding="UTF-8"?> +<projectDescription> + <name>Cocoon - New docs</name> + <comment></comment> + <projects> + </projects> + <buildSpec> + </buildSpec> + <natures> + </natures> +</projectDescription> Added: cocoon/whiteboard/doc-repos/2.2/src/documentation/content/xdocs/getting-started/content_en.html Url: http://svn.apache.org/viewcvs/cocoon/whiteboard/doc-repos/2.2/src/documentation/content/xdocs/getting-started/content_en.html?view=auto&rev=126303 ============================================================================== --- (empty file) +++ cocoon/whiteboard/doc-repos/2.2/src/documentation/content/xdocs/getting-started/content_en.html Mon Jan 24 09:26:45 2005 @@ -0,0 +1,111 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" + "http://www.w3.org/TR/html4/loose.dtd"> +<!-- + Copyright 2002-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. +--> +<html> +<head> + <title>Interpreted HTML (ihtml) demonstration page</title> +</head> +<body> + +<h1><a name="intro" />Interpreted HTML (ihtml) demonstration page</h1> + +<p>This HTML document is used as the source for this page, and translated +to the intermediate Apache Forrest xdocs document structure. The sitemap then +does the normal aggregation with the navigation content and application of +the skin. +</p> + +<p> +Note that this source file has the .ihtml filename extension. All requests to +the sitemap for *.html are served by looking for matching *.ihtml source, +or by the +<a href="http://forrest.apache.org/faq.html#link_raw">"raw content"</a> +method, or by the normal processing of structured xml xdocs format, or by +other specialised xml processing. +</p> + +<p> +The ihtml is being interpreted by Forrest and transformed to the +intermediate Apache xdocs document structure. That stylesheet cannot deal +with every possibility in unstructured html, so it tries to guess how to +build <section> elements and such. +It needs <h1> (<h2> etc.) headings in the source ihtml +(and the page must start with a h1 element). Patches are welcome to enhance +that transformer. +</p> + +<p> +You can still take advantage of Forrest's +<a href="http://forrest.apache.org/docs/linking.html">"<b>site:<b>" +method of linking</a>, for example: +<a href="site:index"><a href="site:index"></a> +</p> + +<hr> +<p><b>Note:</b> XHTML can also be used, but it is just treated as interpreted +html. Future versions of Forrest will take much more advantage of XHTML. +</p> +<hr> + +<h1><a name="examples" />Some example uses of ihtml</h1> +<p> +There are situations when the Apache Forrest xdocs DTD is not sufficient. +This interpreted html enables such extra capabilities. +</p> + +<h2><a name="js" />Embedded applets and Javascript</h2> + +<p> +See the +<a href="javascript:alert('Opened with Javascript via the body of the source html.')">Javascript alert pop-up</a> +</p> + +<h2><a name="forms" />HTML forms for user interaction</h2> +<p> +Search the Forrest website via Google: +<!-- Search Google --> +<form target="_blank" action="http://www.google.com/search" method="get"> +<input value="forrest.apache.org" name="as_sitesearch" type="hidden"> +<input type=hidden name=ie value=UTF-8> +<input type=hidden name=oe value=UTF-8> +<a href="http://www.google.com/"> +<img src="http://www.google.com/logos/Logo_40wht.gif" +border="0" alt="Google Search" align="middle" width="150" height="55"></a> +<input type="text" name="as_q" size="25" maxlength="255" value="ihtml"> + +<input type="submit" name="btnG" value="Google Search"> +</form> +<!-- Search Google --> +</p> + +<p> +See a demonstration of "ihtml" and "html forms" with our +<a href="http://forrest.apache.org/mirrors.cgi">Forrest download mirror</a> +facility and the +<a href="http://forrest.apache.org/howto/howto-asf-mirror.html">explanation</a> howto document. +</p> + +<h2><a name="invalid" />Invalid HTML</h2> +<p> +This paragraph has a missing closing tag for the <p> element. + +<h2><a name="blink" />Other non-standard html-type abilities</h2> +<p> +Use other HTML <blink>delights and tricks</blink>. +</p> +</body> +</html> Deleted: /cocoon/whiteboard/doc-repos/2.2/src/documentation/content/xdocs/getting-started/content_en.xml Url: http://svn.apache.org/viewcvs/cocoon/whiteboard/doc-repos/2.2/src/documentation/content/xdocs/getting-started/content_en.xml?view=auto&rev=126302 ============================================================================== Modified: cocoon/whiteboard/doc-repos/2.2/src/documentation/content/xdocs/site.xml Url: http://svn.apache.org/viewcvs/cocoon/whiteboard/doc-repos/2.2/src/documentation/content/xdocs/site.xml?view=diff&rev=126303&p1=cocoon/whiteboard/doc-repos/2.2/src/documentation/content/xdocs/site.xml&r1=126302&p2=cocoon/whiteboard/doc-repos/2.2/src/documentation/content/xdocs/site.xml&r2=126303 ============================================================================== --- cocoon/whiteboard/doc-repos/2.2/src/documentation/content/xdocs/site.xml (original) +++ cocoon/whiteboard/doc-repos/2.2/src/documentation/content/xdocs/site.xml Mon Jan 24 09:26:45 2005 @@ -18,7 +18,7 @@ <site label="Apache Cocoon" href="" xmlns="http://apache.org/forrest/linkmap/1.0" tab="docs"> <docs label="Documentation" href="" tab="docs"> - <doc label="Overview" href="index.html"/> + <index label="Overview" href="index.html"/> <doc label="Core Technologies"> <doc label="Concepts" href="concepts.html"/> <doc label="Sitemap"> Modified: cocoon/whiteboard/doc-repos/2.2/src/documentation/sitemap.xmap Url: http://svn.apache.org/viewcvs/cocoon/whiteboard/doc-repos/2.2/src/documentation/sitemap.xmap?view=diff&rev=126303&p1=cocoon/whiteboard/doc-repos/2.2/src/documentation/sitemap.xmap&r1=126302&p2=cocoon/whiteboard/doc-repos/2.2/src/documentation/sitemap.xmap&r2=126303 ============================================================================== --- cocoon/whiteboard/doc-repos/2.2/src/documentation/sitemap.xmap (original) +++ cocoon/whiteboard/doc-repos/2.2/src/documentation/sitemap.xmap Mon Jan 24 09:26:45 2005 @@ -15,11 +15,26 @@ limitations under the License. --> <map:sitemap xmlns:map="http://apache.org/cocoon/sitemap/1.0"> + <map:components> + <map:generators default="file"> + <map:generator name="local-html" src="org.apache.cocoon.generation.HTMLGenerator"> + <jtidy-config>context:/WEB-INF/jtidy.properties</jtidy-config> + </map:generator> + </map:generators> + </map:components> <map:pipelines> <map:pipeline internal-only="true"> <map:match pattern="html2document/*"> - <map:generate src="{project:content.xdocs}{1}/content_en.xml"/> - <map:transform src="{defaults:stylesheets}/html2document.xsl"/> + <map:select type="exists"> + <map:when test="{project:content.xdocs}{1}/content_en.xml"> + <map:generate src="{project:content.xdocs}{1}/content_en.xml"/> + <map:transform src="{defaults:stylesheets}/html2document.xsl"/> + </map:when> + <map:otherwise> + <map:generate src="{project:content.xdocs}{1}/content_en.html" type="local-html"/> + <map:transform src="{forrest:stylesheets}/html2document.xsl" /> + </map:otherwise> + </map:select> <map:serialize/> </map:match> <map:match pattern="comments/*"> Deleted: /cocoon/whiteboard/doc-repos/global/src/documentation/content/xdocs/1.meta.xml Url: http://svn.apache.org/viewcvs/cocoon/whiteboard/doc-repos/global/src/documentation/content/xdocs/1.meta.xml?view=auto&rev=126302 ============================================================================== Deleted: /cocoon/whiteboard/doc-repos/global/src/documentation/content/xdocs/1.xml Url: http://svn.apache.org/viewcvs/cocoon/whiteboard/doc-repos/global/src/documentation/content/xdocs/1.xml?view=auto&rev=126302 ============================================================================== Deleted: /cocoon/whiteboard/doc-repos/global/src/documentation/content/xdocs/2.meta.xml Url: http://svn.apache.org/viewcvs/cocoon/whiteboard/doc-repos/global/src/documentation/content/xdocs/2.meta.xml?view=auto&rev=126302 ============================================================================== Deleted: /cocoon/whiteboard/doc-repos/global/src/documentation/content/xdocs/2.xml Url: http://svn.apache.org/viewcvs/cocoon/whiteboard/doc-repos/global/src/documentation/content/xdocs/2.xml?view=auto&rev=126302 ============================================================================== Added: cocoon/whiteboard/doc-repos/global/src/documentation/content/xdocs/community/comments_en.xml Url: http://svn.apache.org/viewcvs/cocoon/whiteboard/doc-repos/global/src/documentation/content/xdocs/community/comments_en.xml?view=auto&rev=126303 ============================================================================== --- (empty file) +++ cocoon/whiteboard/doc-repos/global/src/documentation/content/xdocs/community/comments_en.xml Mon Jan 24 09:26:45 2005 @@ -0,0 +1,6 @@ +<?xml version="1.0"?> +<comments> + <comment name="Reinhard Poetz" by="http://www.poetz.cc" subject="the first comment"> + my first comment + </comment> +</comments> Added: cocoon/whiteboard/doc-repos/global/src/documentation/content/xdocs/community/content_en.xml Url: http://svn.apache.org/viewcvs/cocoon/whiteboard/doc-repos/global/src/documentation/content/xdocs/community/content_en.xml?view=auto&rev=126303 ============================================================================== --- (empty file) +++ cocoon/whiteboard/doc-repos/global/src/documentation/content/xdocs/community/content_en.xml Mon Jan 24 09:26:45 2005 @@ -0,0 +1,9 @@ +<?xml version="1.0"?> +<html> + <head> + <title>Community</title> + </head> + <body> + <h1>Community</h1> + </body> +</html> Added: cocoon/whiteboard/doc-repos/global/src/documentation/content/xdocs/community/meta.xml Url: http://svn.apache.org/viewcvs/cocoon/whiteboard/doc-repos/global/src/documentation/content/xdocs/community/meta.xml?view=auto&rev=126303 ============================================================================== --- (empty file) +++ cocoon/whiteboard/doc-repos/global/src/documentation/content/xdocs/community/meta.xml Mon Jan 24 09:26:45 2005 @@ -0,0 +1,6 @@ +<?xml version="1.0"?> +<meta> + <authors> + <author contact="http://www.poetz.cc">Reinhard Poetz</author> + </authors> +</meta> Added: cocoon/whiteboard/doc-repos/global/src/documentation/content/xdocs/index/comments_en.xml Url: http://svn.apache.org/viewcvs/cocoon/whiteboard/doc-repos/global/src/documentation/content/xdocs/index/comments_en.xml?view=auto&rev=126303 ============================================================================== --- (empty file) +++ cocoon/whiteboard/doc-repos/global/src/documentation/content/xdocs/index/comments_en.xml Mon Jan 24 09:26:45 2005 @@ -0,0 +1,6 @@ +<?xml version="1.0"?> +<comments> + <comment name="Reinhard Poetz" by="http://www.poetz.cc" subject="the first comment"> + my first comment + </comment> +</comments> Added: cocoon/whiteboard/doc-repos/global/src/documentation/content/xdocs/index/content_en.xml Url: http://svn.apache.org/viewcvs/cocoon/whiteboard/doc-repos/global/src/documentation/content/xdocs/index/content_en.xml?view=auto&rev=126303 ============================================================================== --- (empty file) +++ cocoon/whiteboard/doc-repos/global/src/documentation/content/xdocs/index/content_en.xml Mon Jan 24 09:26:45 2005 @@ -0,0 +1,9 @@ +<?xml version="1.0"?> +<html> + <head> + <title>Cocoon global docs</title> + </head> + <body> + <h1>Global docs</h1> + </body> +</html> Added: cocoon/whiteboard/doc-repos/global/src/documentation/content/xdocs/index/meta.xml Url: http://svn.apache.org/viewcvs/cocoon/whiteboard/doc-repos/global/src/documentation/content/xdocs/index/meta.xml?view=auto&rev=126303 ============================================================================== --- (empty file) +++ cocoon/whiteboard/doc-repos/global/src/documentation/content/xdocs/index/meta.xml Mon Jan 24 09:26:45 2005 @@ -0,0 +1,6 @@ +<?xml version="1.0"?> +<meta> + <authors> + <author contact="http://www.poetz.cc">Reinhard Poetz</author> + </authors> +</meta> Modified: cocoon/whiteboard/doc-repos/global/src/documentation/content/xdocs/site.xml Url: http://svn.apache.org/viewcvs/cocoon/whiteboard/doc-repos/global/src/documentation/content/xdocs/site.xml?view=diff&rev=126303&p1=cocoon/whiteboard/doc-repos/global/src/documentation/content/xdocs/site.xml&r1=126302&p2=cocoon/whiteboard/doc-repos/global/src/documentation/content/xdocs/site.xml&r2=126303 ============================================================================== --- cocoon/whiteboard/doc-repos/global/src/documentation/content/xdocs/site.xml (original) +++ cocoon/whiteboard/doc-repos/global/src/documentation/content/xdocs/site.xml Mon Jan 24 09:26:45 2005 @@ -19,7 +19,7 @@ <about label="Project" tab="project"> <index label="News"> - <index label="Latest" href="1.html"/> + <index label="Latest" href="index.html"/> <index label="Archive"/> </index> <index label="Download"/> @@ -28,7 +28,7 @@ </about> <docs label="Community" tab="community"> - <doc label="Who we are?" href="2.html"/> + <doc label="Who we are?" href="community.html"/> <doc label="Wiki docs"/> <doc label="Contributing"/> <doc label="Committer Tips"/> Modified: cocoon/whiteboard/doc-repos/global/src/documentation/content/xdocs/tabs.xml Url: http://svn.apache.org/viewcvs/cocoon/whiteboard/doc-repos/global/src/documentation/content/xdocs/tabs.xml?view=diff&rev=126303&p1=cocoon/whiteboard/doc-repos/global/src/documentation/content/xdocs/tabs.xml&r1=126302&p2=cocoon/whiteboard/doc-repos/global/src/documentation/content/xdocs/tabs.xml&r2=126303 ============================================================================== --- cocoon/whiteboard/doc-repos/global/src/documentation/content/xdocs/tabs.xml (original) +++ cocoon/whiteboard/doc-repos/global/src/documentation/content/xdocs/tabs.xml Mon Jan 24 09:26:45 2005 @@ -32,9 +32,9 @@ be displayed when their parent tab is selected. --> - <tab id="project" label="Project" dir="" indexfile="1.html"/> - <tab id="community" label="Community" dir="" indexfile="2.html"/> - <tab id="getting-started" label="Getting started" href="http://apache.org/~reinhard/cocoon/2.2/2.html"/> - <tab id="docs" label="Documentation" href="http://apache.org/~reinhard/cocoon/2.2/1.html"/> + <tab id="project" label="Project" dir="" indexfile="index.html"/> + <tab id="community" label="Community" dir="" indexfile="community.html"/> + <tab id="getting-started" label="Getting started" href="http://brutus.apache.org/~crossley/build/cocoon-doco-2-2/2.2/getting-started.html"/> + <tab id="docs" label="Documentation" href="http://brutus.apache.org/~crossley/build/cocoon-doco-2-2/index.html"/> </tabs> Added: cocoon/whiteboard/doc-repos/global/src/documentation/resources/stylesheets/correct-img-links.xsl Url: http://svn.apache.org/viewcvs/cocoon/whiteboard/doc-repos/global/src/documentation/resources/stylesheets/correct-img-links.xsl?view=auto&rev=126303 ============================================================================== --- (empty file) +++ cocoon/whiteboard/doc-repos/global/src/documentation/resources/stylesheets/correct-img-links.xsl Mon Jan 24 09:26:45 2005 @@ -0,0 +1,29 @@ +<?xml version="1.0" encoding="UTF-8"?> +<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"> + <xsl:param name="docid"/> + + <xsl:template match="img"> + <img> + <xsl:for-each select="@*"> + <xsl:choose> + <xsl:when test="name(.) = 'src'"> + <xsl:attribute name="{name(.)}"> + <xsl:value-of select="$docid"/>/<xsl:value-of select="."/> + </xsl:attribute> + </xsl:when> + <xsl:otherwise> + <xsl:attribute name="{name(.)}"> + <xsl:value-of select="."/> + </xsl:attribute> + </xsl:otherwise> + </xsl:choose> + </xsl:for-each> + </img> + </xsl:template> + + <xsl:template match="@*|node()" priority="-2"> + <xsl:copy> + <xsl:apply-templates select="@*|node()"/> + </xsl:copy> + </xsl:template> +</xsl:stylesheet> \ No newline at end of file Modified: cocoon/whiteboard/doc-repos/global/src/documentation/sitemap.xmap Url: http://svn.apache.org/viewcvs/cocoon/whiteboard/doc-repos/global/src/documentation/sitemap.xmap?view=diff&rev=126303&p1=cocoon/whiteboard/doc-repos/global/src/documentation/sitemap.xmap&r1=126302&p2=cocoon/whiteboard/doc-repos/global/src/documentation/sitemap.xmap&r2=126303 ============================================================================== --- cocoon/whiteboard/doc-repos/global/src/documentation/sitemap.xmap (original) +++ cocoon/whiteboard/doc-repos/global/src/documentation/sitemap.xmap Mon Jan 24 09:26:45 2005 @@ -15,36 +15,61 @@ limitations under the License. --> <map:sitemap xmlns:map="http://apache.org/cocoon/sitemap/1.0"> + <map:components> + <map:generators default="file"> + <map:generator name="local-html" src="org.apache.cocoon.generation.HTMLGenerator"> + <jtidy-config>context:/WEB-INF/jtidy.properties</jtidy-config> + </map:generator> + </map:generators> + </map:components> <map:pipelines> - <map:pipeline> + <map:pipeline internal-only="true"> <map:match pattern="html2document/*"> - <map:generate src="{project:content.xdocs}{1}.xml"/> - <map:transform src="{defaults:stylesheets}/html2document.xsl"/> + <map:select type="exists"> + <map:when test="{project:content.xdocs}{1}/content_en.xml"> + <map:generate src="{project:content.xdocs}{1}/content_en.xml"/> + <map:transform src="{defaults:stylesheets}/html2document.xsl"/> + </map:when> + <map:otherwise> + <map:generate src="{project:content.xdocs}{1}/content_en.html" type="local-html"/> + <map:transform src="{forrest:stylesheets}/html2document.xsl" /> + </map:otherwise> + </map:select> <map:serialize/> </map:match> <map:match pattern="comments/*"> - <map:select type="exists"> - <map:when test="{project:content.xdocs}{1}.comments.xml"> - <map:generate src="{project:content.xdocs}{1}.comments.xml"/> + <map:select type="exists"> + <map:when test="{project:content.xdocs}{1}/comments_en.xml"> + <map:generate src="{project:content.xdocs}{1}/comments_en.xml"/> </map:when> <map:otherwise> - <map:generate src="{project:content}no-comments.xml"/> - </map:otherwise> - </map:select> - <map:serialize/> + <map:generate src="{project:content}no-comments.xml"/> + </map:otherwise> + </map:select> + <map:serialize/> </map:match> + </map:pipeline> + <!-- ******************************************************************************** --> + <map:pipeline> <map:match pattern="*.xml"> - <map:select type="exists"> - <map:when test="{project:content.xdocs}{1}.meta.xml"> - <map:aggregate element="aggregate"> - <map:part src="cocoon:/html2document/{1}" element="content"/> - <map:part src="{project:content.xdocs}{1}.meta.xml"/> - <map:part src="cocoon:/comments/{1}"/> - </map:aggregate> - <map:transform src="{project:resources.stylesheets}doc-aggregate2v12.xsl"/> - <map:serialize type="xml-document"/> - </map:when> - </map:select> + <map:select type="exists"> + <map:when test="{project:content.xdocs}{1}/meta.xml"> + <map:aggregate element="aggregate"> + <map:part src="cocoon:/html2document/{1}" element="content"/> + <map:part src="{project:content.xdocs}{1}/meta.xml"/> + <map:part src="cocoon:/comments/{1}"/> + </map:aggregate> + <map:transform src="{project:resources.stylesheets}doc-aggregate2v12.xsl"/> + <map:transform src="{project:resources.stylesheets}correct-img-links.xsl"> + <map:parameter name="docid" value="{1}"/> + </map:transform> + <map:serialize type="xml-document"/> + </map:when> + </map:select> + </map:match> + <!-- ******************************************************************************** --> + <map:match pattern="*/files/*.*"> + <map:read src="{project:content.xdocs}{1}/files/{2}.{3}" mime-type="image/{3}"/> </map:match> </map:pipeline> </map:pipelines>
