cziegeler 2004/03/10 02:32:57
Modified: src/webapp/samples/xsp/java logicsheet.xsp request.xsp
cookie.xsp cacheable.xsp response.xsp resolver.xsp
simple.xsp sessionpage.xsp upload.xsp hello.xsp
session.xsp
src/webapp/samples/xsp/logicsheets hello.xsl
src/webapp/samples/test sitemap.xmap
src/webapp/samples/stylesheets dynamic-page2html.xsl
src/webapp/samples/xsp/javascript simple.xsp hello.xsp
response.xsp request.xsp session.xsp
src/webapp/samples/sources/content dynamic.xsp simple.xml
simple.xsp
src/webapp/samples/stream sitemap.xmap
src/webapp/samples/xsp/python hello.xsp
src/webapp/samples/sources/style simple-page2html.xsp
dynamic-xsp2xsp.xsl
src/webapp/samples/xsp samples.xml sitemap.xmap
src/webapp/samples/xsp/stream OrderPage.xml
src/webapp/samples/sources sitemap.xmap samples.xml
Added: src/webapp/samples/text-wrap/xslt docwrap.xsl split.xsl
docsplit.xsl docraw.xsl docnbsp.xsl wrap2para.xsl
src/webapp/samples/test/internal-request sitemap.xmap
explain-test.xml a.xml
src/webapp/samples/text-wrap/data ascii-art.xml
with-word-boundaries.xml cdata-model-2.xml
without-word-boundaries.xml cdata-model.xml
src/webapp/samples/test/sendpage-redirect flow.js
sitemap.xmap explain-test.xml
src/webapp/samples/test dir-links.xsl index.xml
src/webapp/samples/sources/content upload.xml
src/webapp/samples/test/internal-request/mounted
sitemap.xmap c.xml
src/webapp/samples/text-wrap welcome.html sitemap.xmap
src/webapp/samples/test/reader-mime-type test10.html
sitemap.xmap explain-test.xml
Removed: src/webapp/samples/test a.xml
src/webapp/samples/test/simpletest-mounted c.xml
sitemap.xmap
Log:
Update license
Revision Changes Path
1.1 cocoon-2.2/src/webapp/samples/text-wrap/xslt/docwrap.xsl
Index: docwrap.xsl
===================================================================
<?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.
-->
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<!-- docwrap.xsl - text line wrapping
This stylesheet includes wrap2para.xsl to handle just <source> elements
that have PCDATA.
Any other type of source element is the reponsibility of the caller xslt.
-->
<xsl:include href="wrap2para.xsl"/>
<xsl:template match="document">
<html>
<head>
<title><xsl:value-of select="header/title"/></title>
</head>
<xsl:apply-templates/>
</html>
</xsl:template>
<xsl:template match="body">
<body>
<h1><xsl:value-of select="header/title"/></h1>
<p>Comment from stylesheet: Only <source> elements that did not
contain an xml content model, had their long
lines handled by the included wrap2para.xsl stylesheet.
</p>
<xsl:apply-templates/>
</body>
</xsl:template>
<xsl:template match="section">
<xsl:apply-templates/>
</xsl:template>
<xsl:template match="source">
<pre class="code">
<xsl:apply-templates/>
</pre>
</xsl:template>
<xsl:template match="source[not(*)]">
<div style="padding:4pt; margin-bottom:8pt; border-width:1px;
border-style:solid; border-color:#0086b2;">
<xsl:call-template name="format-source">
<xsl:with-param name="source" select="string(.)"/>
</xsl:call-template>
</div>
</xsl:template>
<xsl:template match="title">
<h2><xsl:apply-templates/></h2>
</xsl:template>
<xsl:template match="p">
<p><xsl:apply-templates/></p>
</xsl:template>
</xsl:stylesheet>
1.1 cocoon-2.2/src/webapp/samples/text-wrap/xslt/split.xsl
Index: split.xsl
===================================================================
<?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.
-->
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="1.0">
<!--
This stylesheet was taken from the XSLT FAQ http://www.dpawson.co.uk/xsl/
Comments and adaption to be used without normalize-space()
by Nicola Ken Barozzi [EMAIL PROTECTED]
-->
<!--
Input:
<doc>
<para>
123456 2345 343434 545454 43434 343
12345 343434 545454 43434 343
32345645 343434 545454 43434 343
3422222225 343434 545454 43434 343
llllllllllllllllllllllooooooooooooooonnnnnnnnnnnggggggggg
345 343434 545454 43434 343
</para>
</doc>
Output:
<HTML>
<BODY>
<PRE>123456 2345 343434 545454
43434 343 12345 343434 545454
43434 343 32345645 343434
545454 43434 343 3422222225
343434 545454 43434 343
lllllllllllllllllllllloooooooo
ooooooonnnnnnnnnnnggggggggg
345 343434 545454 43434
343
</PRE>
</BODY>
</HTML>
Fragment ised:
<xsl:template match="/doc">
<HTML><BODY><PRE>
<xsl:call-template name="format">
<xsl:with-param select="normalize-space(para)" name="txt" />
<xsl:with-param name="width">30</xsl:with-param>
</xsl:call-template>
</PRE></BODY></HTML>
</xsl:template>
-->
<xsl:template match="/body">
<body>
<xsl:call-template name="format">
<xsl:with-param select="source" name="txt" />
<xsl:with-param name="width">40</xsl:with-param>
</xsl:call-template>
</body>
</xsl:template>
<xsl:template name="format">
<xsl:param name="txt" />
<xsl:param name="width" />
<!-- if there is still text left -->
<xsl:if test="$txt">
<xsl:variable name = "pretxt" select = "substring($txt,0, $width)" />
<xsl:choose>
<xsl:when test="contains($pretxt, '
')">
<xsl:value-of select="substring-before($pretxt, '
')"/>
<xsl:text>
</xsl:text>
<xsl:call-template name="format">
<xsl:with-param name="txt" select="substring-after($txt,'
')"/>
<xsl:with-param select="$width" name="width" />
</xsl:call-template>
</xsl:when>
<xsl:otherwise>
<!-- get the width at which to break-->
<xsl:variable name="real-width">
<xsl:call-template name="tune-width">
<xsl:with-param select="$txt" name="txt" />
<xsl:with-param select="$width" name="width" />
<xsl:with-param select="$width" name="def" />
</xsl:call-template>
</xsl:variable>
<!-- output the first part of the broken string -->
<xsl:value-of select="substring($txt, 1, $real-width)" />
<!-- output a newline -->
<xsl:text>
</xsl:text>
<!-- call itself with the remaining part of the text -->
<xsl:call-template name="format">
<xsl:with-param select="substring($txt,$real-width + 1)" name="txt" />
<xsl:with-param select="$width" name="width" />
</xsl:call-template>
</xsl:otherwise>
</xsl:choose>
</xsl:if>
</xsl:template>
<!-- used by template "format", it calculates the width at the given def
It starts at def length and comes back till it finds a space -->
<xsl:template name="tune-width">
<xsl:param name="txt" />
<xsl:param name="width" />
<xsl:param name="def" />
<xsl:choose>
<xsl:when test="$width = 0">
<xsl:value-of select="$def" />
</xsl:when>
<xsl:when test="substring($txt, $width, 1 ) = ' '">
<xsl:value-of select="$width" />
</xsl:when>
<xsl:otherwise>
<!-- otherwise need to tune again, trying with $width - 1 -->
<xsl:call-template name="tune-width">
<xsl:with-param select="$width - 1" name="width" />
<xsl:with-param select="$txt" name="txt" />
<xsl:with-param select="$def" name="def" />
</xsl:call-template>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
</xsl:stylesheet>
1.1 cocoon-2.2/src/webapp/samples/text-wrap/xslt/docsplit.xsl
Index: docsplit.xsl
===================================================================
<?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.
-->
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<!-- docsplit.xsl - text line wrapping
This stylesheet includes split.xsl to handle all <source> elements.
-->
<xsl:include href="split.xsl"/>
<xsl:template match="document">
<html>
<head>
<title><xsl:value-of select="header/title"/></title>
</head>
<xsl:apply-templates/>
</html>
</xsl:template>
<xsl:template match="body">
<body>
<h1><xsl:value-of select="header/title"/></h1>
<p>Comment from stylesheet: All <source> elements had their long
lines split by the included split.xsl stylesheet.
</p>
<xsl:apply-templates/>
</body>
</xsl:template>
<xsl:template match="section">
<xsl:apply-templates/>
</xsl:template>
<xsl:template match="source">
<div style="padding:4pt; margin-bottom:8pt; border-width:1px;
border-style:solid; border-color:#0086b2;">
<pre class="code">
<xsl:call-template name="format">
<xsl:with-param select="." name="txt" />
<xsl:with-param name="width">72</xsl:with-param>
</xsl:call-template>
</pre>
</div>
</xsl:template>
<xsl:template match="title">
<h2><xsl:apply-templates/></h2>
</xsl:template>
<xsl:template match="p">
<p><xsl:apply-templates/></p>
</xsl:template>
</xsl:stylesheet>
1.1 cocoon-2.2/src/webapp/samples/text-wrap/xslt/docraw.xsl
Index: docraw.xsl
===================================================================
<?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.
-->
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<!-- doc.xsl - text line wrapping
This stylesheet does not do any line wrapping.
-->
<xsl:template match="document">
<html>
<head>
<title><xsl:value-of select="header/title"/></title>
</head>
<xsl:apply-templates/>
</html>
</xsl:template>
<xsl:template match="body">
<body>
<h1><xsl:value-of select="header/title"/></h1>
<p>Comment from stylesheet: No special handling was done for the
<source> elements. Note the long right-left scrollbar.
</p>
<xsl:apply-templates/>
</body>
</xsl:template>
<xsl:template match="section">
<xsl:apply-templates/>
</xsl:template>
<xsl:template match="source">
<div style="padding:4pt; margin-bottom:8pt; border-width:1px;
border-style:solid; border-color:#0086b2;">
<pre class="code">
<xsl:apply-templates/>
</pre>
</div>
</xsl:template>
<xsl:template match="title">
<h2><xsl:apply-templates/></h2>
</xsl:template>
<xsl:template match="p">
<p><xsl:apply-templates/></p>
</xsl:template>
</xsl:stylesheet>
1.1 cocoon-2.2/src/webapp/samples/text-wrap/xslt/docnbsp.xsl
Index: docnbsp.xsl
===================================================================
<?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.
-->
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:str="http://exslt.org/strings"
extension-element-prefixes="str">
<!-- doc2nbsp.xsl - text line wrapping
This stylesheet uses exslt extension for strings to add non-breaking spaces.
-->
<xsl:template match="document">
<html>
<head>
<title><xsl:value-of select="header/title"/></title>
</head>
<xsl:apply-templates/>
</html>
</xsl:template>
<xsl:template match="body">
<body>
<h1><xsl:value-of select="header/title"/></h1>
<p>Comment from stylesheet: sequences of two consecutive spaces are
replaced by a non-breaking space and a space.
This keeps indentation while allowing word wrapping.
</p>
<xsl:apply-templates/>
</body>
</xsl:template>
<xsl:template match="section">
<xsl:apply-templates/>
</xsl:template>
<xsl:template match="source">
<div style="padding:4pt; margin-bottom:8pt; border-width:1px;
border-style:solid; border-color:#0086b2;">
<!-- iterate over each line -->
<xsl:for-each select="str:split(string(.), ' ')">
<code>
<!-- replace each group of two spaces by a and a space to
allow line wrap while still
keeping indentation -->
<xsl:for-each select="str:split(string(.), ' ')">
<xsl:value-of select="."/><xsl:text>  </xsl:text>
</xsl:for-each>
</code>
<br/>
</xsl:for-each>
</div>
</xsl:template>
<xsl:template match="title">
<h2><xsl:apply-templates/></h2>
</xsl:template>
<xsl:template match="p">
<p><xsl:apply-templates/></p>
</xsl:template>
</xsl:stylesheet>
1.1
cocoon-2.2/src/webapp/samples/text-wrap/xslt/wrap2para.xsl
Index: wrap2para.xsl
===================================================================
<?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.
-->
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<!-- wrap2para.xsl - text line wrapping
This stylesheet handles just <source> elements that have PCDATA.
Any other type of source element is the reponsibility of the caller xslt.
-->
<!-- unstructured source is laid out as a sequence of paragraphs -->
<xsl:template name="format-source">
<xsl:param name="source"/>
<xsl:if test="normalize-space($source)">
<xsl:choose>
<xsl:when test="not(contains($source,' '))">
<xsl:call-template name="format-source-line">
<xsl:with-param name="line" select="$source"/>
</xsl:call-template>
</xsl:when>
<xsl:otherwise>
<xsl:call-template name="format-source-line">
<xsl:with-param name="line"
select="substring-before($source,' ')"/>
</xsl:call-template>
<xsl:call-template name="format-source">
<xsl:with-param name="source"
select="substring-after($source,' ')"/>
</xsl:call-template>
</xsl:otherwise>
</xsl:choose>
</xsl:if>
</xsl:template>
<xsl:template name="format-source-line">
<xsl:param name="line"/>
<xsl:variable name="text" select="normalize-space($line)"/>
<xsl:variable name="first-non-white-space-character"
select="substring($text,1,1)"/>
<xsl:variable name="leading-spaces"
select="string-length(substring-before($line,$first-non-white-space-character))"/>
<xsl:variable name="text-with-nbsp">
<xsl:call-template name="no-break-in-strings">
<xsl:with-param name="line" select="$text"/>
</xsl:call-template>
</xsl:variable>
<p
style="margin-top:2pt;margin-bottom:2pt;padding-left:{8+$leading-spaces*4}pt;text-indent:-8pt;font-size:smaller">
<xsl:value-of select="$text-with-nbsp"/>
</p>
</xsl:template>
<xsl:template name="no-break-in-strings">
<xsl:param name="line"/>
<xsl:variable name="quote">"</xsl:variable>
<xsl:choose>
<xsl:when test="contains($line,$quote)">
<xsl:value-of select="substring-before($line,$quote)"/>
<xsl:text>"</xsl:text>
<xsl:variable name="remainder" select="substring-after($line,$quote)"/>
<xsl:choose>
<xsl:when test="contains($remainder,$quote)">
<xsl:variable name="string"
select="substring-before($remainder,$quote)"/>
<xsl:value-of select="translate($string,' ',' ')"/>
<xsl:text>"</xsl:text>
<xsl:call-template name="no-break-in-strings">
<xsl:with-param name="line"
select="substring-after($remainder,$quote)"/>
</xsl:call-template>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="translate($remainder,' ',' ')"/>
</xsl:otherwise>
</xsl:choose>
</xsl:when>
<xsl:otherwise><xsl:value-of select="$line"/></xsl:otherwise>
</xsl:choose>
</xsl:template>
</xsl:stylesheet>
1.1
cocoon-2.2/src/webapp/samples/test/internal-request/sitemap.xmap
Index: sitemap.xmap
===================================================================
<?xml version="1.0" encoding="ISO-8859-1"?>
<!--
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.
-->
<map:sitemap xmlns:map="http://apache.org/cocoon/sitemap/1.0">
<map:pipelines>
<!-- used by the internalRequest anteater test -->
<map:pipeline>
<map:match pattern="simpletest-content/**">
<map:generate src="{1}"/>
<map:serialize type="xml"/>
</map:match>
<map:match pattern="simpletest-mounted/**">
<map:mount src="mounted/" uri-prefix="simpletest-mounted"/>
</map:match>
<map:match pattern="simpletest">
<map:generate src="cocoon:/simpletest-content/a.xml"/>
<map:transform type="cinclude"/>
<map:serialize type="xml"/>
</map:match>
</map:pipeline>
</map:pipelines>
</map:sitemap>
1.1
cocoon-2.2/src/webapp/samples/test/internal-request/explain-test.xml
Index: explain-test.xml
===================================================================
<?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.
-->
<!-- CVS $Id: explain-test.xml,v 1.1 2004/03/10 10:32:55 cziegeler Exp $ -->
<page>
<title>internal-request test pages</title>
<content>
<para>
This is used by the internalRequest anteater test
</para>
<para>
Test links:
<ul>
<li><link href="simpletest">simpletest</link></li>
<li><link
href="simpletest-mounted/includer">includer</link></li>
<li><link
href="simpletest-content/a.xml">simpletest-content/a.xml</link></li>
</ul>
</para>
</content>
</page>
1.1 cocoon-2.2/src/webapp/samples/test/internal-request/a.xml
Index: a.xml
===================================================================
<?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.
-->
<test file="a" xmlns:cinclude="http://apache.org/cocoon/include/1.0">
<note>Now i'm going to include something from a sitemap mounted below
here</note>
<cinclude:include src="cocoon:/simpletest-mounted/includer"/>
</test>
1.1
cocoon-2.2/src/webapp/samples/text-wrap/data/ascii-art.xml
Index: ascii-art.xml
===================================================================
<?xml version="1.0" encoding="UTF-8"?>
<!--
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.
-->
<!DOCTYPE document PUBLIC "-//APACHE//DTD Documentation V1.2//EN"
"document-v12.dtd">
<document>
<header>
<title>Ascii Art</title>
</header>
<body>
<section>
<title>Source element with specific ascii art</title>
<source>
_________1_________2_________3_________4_________5_________6_________7
12345678901234567890123456789012345678901234567890123456789012345678901234567890
[localhost:~/apache/xml-mysite]$ tree
.
|-- forrest-targets.ent
|-- forrest.properties
|-- src
| `-- documentation
| |-- README.txt
| |-- content
| | |-- hello.pdf
| | |-- test1.html
| | |-- test2.html
| | `-- xdocs
| | |-- index.xml
| | |-- samples
| | | |-- faq.xml
| | | |-- index.xml
| | | |-- subdir
| | | | `-- index.xml
| | | `--
silly-long-filename-that-demonstrates-text-wrapping-of-long-lines-silly-long-filename-that-demonstrates-text-wrapping-of-long-lines-silly-long-filename-that-demonstrates-text-wrapping-of-long-lines.xml
| | |-- site.xml
| | `-- tabs.xml
| |-- resources
| | `-- images
| | |-- group-logo.gif
| | |-- group.svg
| | |-- icon.png
| | |-- project-logo.gif
| | `-- project.svg
| `-- skinconf.xml
`-- status.xml
</source>
</section>
</body>
</document>
1.1
cocoon-2.2/src/webapp/samples/text-wrap/data/with-word-boundaries.xml
Index: with-word-boundaries.xml
===================================================================
<?xml version="1.0" encoding="UTF-8"?>
<!--
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.
-->
<!DOCTYPE document PUBLIC "-//APACHE//DTD Documentation V1.2//EN"
"document-v12.dtd">
<document>
<header>
<title>Long Line With Word Boundaries</title>
</header>
<body>
<section>
<title>Source element with plain text</title>
<source>
_________1_________2_________3_________4_________5_________6_________7
12345678901234567890123456789012345678901234567890123456789012345678901234567890
Long Line With Word Boundaries. Long Line With Word Boundaries. Long Line
With Word Boundaries. Long Line With Word Boundaries. Long Line With Word
Boundaries. Long Line With Word Boundaries. Long Line With Word Boundaries.
Long Line With Word Boundaries. Long Line With Word Boundaries. Long Line With
Word Boundaries. Long Line With Word Boundaries. Long Line With Word
Boundaries. Long Line With Word Boundaries. Long Line With Word Boundaries.
Long Line With Word Boundaries.
</source>
</section>
</body>
</document>
1.1
cocoon-2.2/src/webapp/samples/text-wrap/data/cdata-model-2.xml
Index: cdata-model-2.xml
===================================================================
<?xml version="1.0" encoding="UTF-8"?>
<!--
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.
-->
<!DOCTYPE document PUBLIC "-//APACHE//DTD Documentation V1.2//EN"
"document-v12.dtd">
<document>
<header>
<title>Deeply emebedded content model with long names</title>
</header>
<body>
<section>
<title>Source element with CDATA</title>
<source><![CDATA[
_________1_________2_________3_________4_________5_________6_________7
12345678901234567890123456789012345678901234567890123456789012345678901234567890
<deeeeeeeeeeppppppppppllllllllllyyyyyyyyyy-embedded-xml-elements-with-very-loooooooooonnnnnnnnnngggggggggg-names>
<deeeeeeeeeeppppppppppllllllllllyyyyyyyyyy-embedded-xml-elements-with-very-loooooooooonnnnnnnnnngggggggggg-names>
<deeeeeeeeeeppppppppppllllllllllyyyyyyyyyy-embedded-xml-elements-with-very-loooooooooonnnnnnnnnngggggggggg-names>
<deeeeeeeeeeppppppppppllllllllllyyyyyyyyyy-embedded-xml-elements-with-very-loooooooooonnnnnnnnnngggggggggg-names>
<deeeeeeeeeeppppppppppllllllllllyyyyyyyyyy-embedded-xml-elements-with-very-loooooooooonnnnnnnnnngggggggggg-names>
<deeeeeeeeeeppppppppppllllllllllyyyyyyyyyy-embedded-xml-elements-with-very-loooooooooonnnnnnnnnngggggggggg-names>
<deeeeeeeeeeppppppppppllllllllllyyyyyyyyyy-embedded-xml-elements-with-very-loooooooooonnnnnnnnnngggggggggg-names>
<deeeeeeeeeeppppppppppllllllllllyyyyyyyyyy-embedded-xml-elements-with-very-loooooooooonnnnnnnnnngggggggggg-names>
<deeeeeeeeeeppppppppppllllllllllyyyyyyyyyy-embedded-xml-elements-with-very-loooooooooonnnnnnnnnngggggggggg-names>
</deeeeeeeeeeppppppppppllllllllllyyyyyyyyyy-embedded-xml-elements-with-very-loooooooooonnnnnnnnnngggggggggg-names>
</deeeeeeeeeeppppppppppllllllllllyyyyyyyyyy-embedded-xml-elements-with-very-loooooooooonnnnnnnnnngggggggggg-names>
</deeeeeeeeeeppppppppppllllllllllyyyyyyyyyy-embedded-xml-elements-with-very-loooooooooonnnnnnnnnngggggggggg-names>
</deeeeeeeeeeppppppppppllllllllllyyyyyyyyyy-embedded-xml-elements-with-very-loooooooooonnnnnnnnnngggggggggg-names>
</deeeeeeeeeeppppppppppllllllllllyyyyyyyyyy-embedded-xml-elements-with-very-loooooooooonnnnnnnnnngggggggggg-names>
</deeeeeeeeeeppppppppppllllllllllyyyyyyyyyy-embedded-xml-elements-with-very-loooooooooonnnnnnnnnngggggggggg-names>
</deeeeeeeeeeppppppppppllllllllllyyyyyyyyyy-embedded-xml-elements-with-very-loooooooooonnnnnnnnnngggggggggg-names>
</deeeeeeeeeeppppppppppllllllllllyyyyyyyyyy-embedded-xml-elements-with-very-loooooooooonnnnnnnnnngggggggggg-names>
</deeeeeeeeeeppppppppppllllllllllyyyyyyyyyy-embedded-xml-elements-with-very-loooooooooonnnnnnnnnngggggggggg-names>
]]></source>
</section>
</body>
</document>
1.1
cocoon-2.2/src/webapp/samples/text-wrap/data/without-word-boundaries.xml
Index: without-word-boundaries.xml
===================================================================
<?xml version="1.0" encoding="UTF-8"?>
<!--
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.
-->
<!DOCTYPE document PUBLIC "-//APACHE//DTD Documentation V1.2//EN"
"document-v12.dtd">
<document>
<header>
<title>Long Line Without Word Boundaries</title>
</header>
<body>
<section>
<title>Source element with plain text</title>
<source>
_________1_________2_________3_________4_________5_________6_________7
12345678901234567890123456789012345678901234567890123456789012345678901234567890
LongLineWithoutWordBoundariesLongLineWithoutWordBoundariesLongLineWithoutWordBoundariesLongLineWithoutWordBoundariesLongLineWithoutWordBoundariesLongLineWithoutWordBoundariesLongLineWithoutWordBoundaries
Try this long URL (it is a real one from cocoon-2.1) ...
http://cocoon.apache.org/2.1/apidocs/org/apache/cocoon/transformation/helpers/ModifiableSourceIncludeCacheStorageProxy.html#hashCode()
</source>
</section>
</body>
</document>
1.1
cocoon-2.2/src/webapp/samples/text-wrap/data/cdata-model.xml
Index: cdata-model.xml
===================================================================
<?xml version="1.0" encoding="UTF-8"?>
<!--
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.
-->
<!DOCTYPE document PUBLIC "-//APACHE//DTD Documentation V1.2//EN"
"document-v12.dtd">
<document>
<header>
<title>Deeply emebedded content model</title>
</header>
<body>
<section>
<title>Source element with CDATA</title>
<source><![CDATA[
_________1_________2_________3_________4_________5_________6_________7
12345678901234567890123456789012345678901234567890123456789012345678901234567890
<deeply>
<embedded>
<xml>
<elements>
<deeply>
<embedded>
<xml>
<elements>
<deeply>
<embedded>
<xml>
<elements>
<deeply>
<embedded>
<xml>
<elements>
<deeply>
<embedded>
<xml>
<elements>
</elements>
</xml>
</embedded>
</deeply>
</elements>
</xml>
</embedded>
</deeply>
</elements>
</xml>
</embedded>
</deeply>
</elements>
</xml>
</embedded>
</deeply>
</elements>
</xml>
</embedded>
</deeply>
]]></source>
</section>
</body>
</document>
1.2 +16 -1 cocoon-2.2/src/webapp/samples/xsp/java/logicsheet.xsp
Index: logicsheet.xsp
===================================================================
RCS file: /home/cvs/cocoon-2.2/src/webapp/samples/xsp/java/logicsheet.xsp,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- logicsheet.xsp 7 Sep 2003 06:09:10 -0000 1.1
+++ logicsheet.xsp 10 Mar 2004 10:32:55 -0000 1.2
@@ -1,4 +1,19 @@
<?xml version="1.0" encoding="ISO-8859-1"?>
+<!--
+ 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.
+-->
<!-- CVS $Id$ -->
1.2 +16 -1 cocoon-2.2/src/webapp/samples/xsp/java/request.xsp
Index: request.xsp
===================================================================
RCS file: /home/cvs/cocoon-2.2/src/webapp/samples/xsp/java/request.xsp,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- request.xsp 7 Sep 2003 06:09:10 -0000 1.1
+++ request.xsp 10 Mar 2004 10:32:55 -0000 1.2
@@ -1,4 +1,19 @@
<?xml version="1.0" encoding="ISO-8859-1"?>
+<!--
+ 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.
+-->
<!-- CVS $Id$ -->
1.2 +16 -1 cocoon-2.2/src/webapp/samples/xsp/java/cookie.xsp
Index: cookie.xsp
===================================================================
RCS file: /home/cvs/cocoon-2.2/src/webapp/samples/xsp/java/cookie.xsp,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- cookie.xsp 7 Sep 2003 06:09:10 -0000 1.1
+++ cookie.xsp 10 Mar 2004 10:32:55 -0000 1.2
@@ -1,4 +1,19 @@
<?xml version="1.0" encoding="ISO-8859-1"?>
+<!--
+ 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.
+-->
<!-- CVS $Id$ -->
1.3 +16 -1 cocoon-2.2/src/webapp/samples/xsp/java/cacheable.xsp
Index: cacheable.xsp
===================================================================
RCS file: /home/cvs/cocoon-2.2/src/webapp/samples/xsp/java/cacheable.xsp,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- cacheable.xsp 18 Sep 2003 22:07:39 -0000 1.2
+++ cacheable.xsp 10 Mar 2004 10:32:55 -0000 1.3
@@ -1,4 +1,19 @@
<?xml version="1.0" encoding="ISO-8859-1"?>
+<!--
+ 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.
+-->
<!--
XSP caching sample.
1.2 +16 -1 cocoon-2.2/src/webapp/samples/xsp/java/response.xsp
Index: response.xsp
===================================================================
RCS file: /home/cvs/cocoon-2.2/src/webapp/samples/xsp/java/response.xsp,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- response.xsp 7 Sep 2003 06:09:10 -0000 1.1
+++ response.xsp 10 Mar 2004 10:32:55 -0000 1.2
@@ -1,4 +1,19 @@
<?xml version="1.0" encoding="ISO-8859-1"?>
+<!--
+ 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.
+-->
<!-- CVS $Id$ -->
1.3 +15 -0 cocoon-2.2/src/webapp/samples/xsp/java/resolver.xsp
Index: resolver.xsp
===================================================================
RCS file: /home/cvs/cocoon-2.2/src/webapp/samples/xsp/java/resolver.xsp,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- resolver.xsp 24 Oct 2003 11:02:40 -0000 1.2
+++ resolver.xsp 10 Mar 2004 10:32:55 -0000 1.3
@@ -1,4 +1,19 @@
<?xml version="1.0" encoding="ISO-8859-1"?>
+<!--
+ 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.
+-->
<xsp:page language="java" xmlns:xsp="http://apache.org/xsp"
xmlns:util="http://apache.org/xsp/util/2.0"
xmlns:xsp-request="http://apache.org/xsp/request/2.0">
1.2 +25 -2 cocoon-2.2/src/webapp/samples/xsp/java/simple.xsp
Index: simple.xsp
===================================================================
RCS file: /home/cvs/cocoon-2.2/src/webapp/samples/xsp/java/simple.xsp,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- simple.xsp 7 Sep 2003 06:09:10 -0000 1.1
+++ simple.xsp 10 Mar 2004 10:32:56 -0000 1.2
@@ -1,4 +1,19 @@
<?xml version="1.0" encoding="ISO-8859-1"?>
+<!--
+ 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.
+-->
<!-- CVS $Id$ -->
@@ -6,7 +21,8 @@
xmlns:xsp="http://apache.org/xsp"
xmlns:xsp-request="http://apache.org/xsp/request/2.0"
xmlns:log="http://apache.org/xsp/log/2.0"
- xmlns:capture="http://apache.org/cocoon/capture/1.0">
+ xmlns:capture="http://apache.org/cocoon/capture/1.0"
+ xmlns:input="http://apache.org/cocoon/xsp/input/1.0">
<page>
<log:logger name="xsp-sample" filename="xsp-sample.log"/>
@@ -80,6 +96,13 @@
Header "user-agent" as String:
<xsp-request:get-header name="user-agent"/>
</para>
+
+ <para>
+ Access to input modules configured in cocoon.xconf:
+ <input:get-attribute module="cocoon-properties" name="fullname"/>
+ <input:get-attribute module="cocoon-properties" name="version"/>
+ </para>
+
<xsp-request:get-header-names/>
1.2 +16 -1 cocoon-2.2/src/webapp/samples/xsp/java/sessionpage.xsp
Index: sessionpage.xsp
===================================================================
RCS file: /home/cvs/cocoon-2.2/src/webapp/samples/xsp/java/sessionpage.xsp,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- sessionpage.xsp 7 Sep 2003 06:09:10 -0000 1.1
+++ sessionpage.xsp 10 Mar 2004 10:32:56 -0000 1.2
@@ -1,4 +1,19 @@
<?xml version="1.0" encoding="iso-8859-1"?>
+<!--
+ 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.
+-->
<!-- CVS $Id$ -->
1.2 +16 -1 cocoon-2.2/src/webapp/samples/xsp/java/upload.xsp
Index: upload.xsp
===================================================================
RCS file: /home/cvs/cocoon-2.2/src/webapp/samples/xsp/java/upload.xsp,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- upload.xsp 7 Sep 2003 06:09:10 -0000 1.1
+++ upload.xsp 10 Mar 2004 10:32:56 -0000 1.2
@@ -1,4 +1,19 @@
<?xml version="1.0" encoding="ISO-8859-1"?>
+<!--
+ 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.
+-->
<!-- CVS $Id$ -->
1.2 +16 -1 cocoon-2.2/src/webapp/samples/xsp/java/hello.xsp
Index: hello.xsp
===================================================================
RCS file: /home/cvs/cocoon-2.2/src/webapp/samples/xsp/java/hello.xsp,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- hello.xsp 7 Sep 2003 06:09:10 -0000 1.1
+++ hello.xsp 10 Mar 2004 10:32:56 -0000 1.2
@@ -1,4 +1,19 @@
<?xml version="1.0" encoding="ISO-8859-1"?>
+<!--
+ 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.
+-->
<!-- CVS $Id$ -->
1.2 +16 -1 cocoon-2.2/src/webapp/samples/xsp/java/session.xsp
Index: session.xsp
===================================================================
RCS file: /home/cvs/cocoon-2.2/src/webapp/samples/xsp/java/session.xsp,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- session.xsp 7 Sep 2003 06:09:10 -0000 1.1
+++ session.xsp 10 Mar 2004 10:32:56 -0000 1.2
@@ -1,4 +1,19 @@
<?xml version="1.0" encoding="iso-8859-1"?>
+<!--
+ 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.
+-->
<!-- CVS $Id$ -->
1.1
cocoon-2.2/src/webapp/samples/test/sendpage-redirect/flow.js
Index: flow.js
===================================================================
/*
* 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.
*/
function sendPageWithRedirect() {
cocoon.sendPage("redirect",null)
}
1.1
cocoon-2.2/src/webapp/samples/test/sendpage-redirect/sitemap.xmap
Index: sitemap.xmap
===================================================================
<?xml version="1.0" encoding="UTF-8"?>
<!--
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.
-->
<map:sitemap xmlns:map="http://apache.org/cocoon/sitemap/1.0">
<map:flow language="javascript">
<map:script src="flow.js"/>
</map:flow>
<map:pipelines>
<map:pipeline>
<map:match pattern="test-good">
<map:redirect-to uri="sitemap"/>
</map:match>
<map:match pattern="test-bad">
<map:call function="sendPageWithRedirect"/>
</map:match>
<map:match pattern="redirect">
<map:redirect-to uri="sitemap"/>
</map:match>
<map:match pattern="sitemap">
<map:read src="sitemap.xmap"/>
</map:match>
</map:pipeline>
</map:pipelines>
</map:sitemap>
1.1
cocoon-2.2/src/webapp/samples/test/sendpage-redirect/explain-test.xml
Index: explain-test.xml
===================================================================
<?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.
-->
<!-- CVS $Id: explain-test.xml,v 1.1 2004/03/10 10:32:56 cziegeler Exp $ -->
<page>
<title>sendpage-redirect test</title>
<content>
<para>Test harness for
<a href="http://nagoya.apache.org/bugzilla/show_bug.cgi?id=26571">
bugzilla 26571
</a>, redirecting from within a flow-called pipeline fails.
</para>
<para>
Test links:
<ul>
<li><link href="test-good">test-good</link></li>
<li><link href="test-bad">test-bad</link></li>
</ul>
</para>
</content>
</page>
1.2 +16 -1 cocoon-2.2/src/webapp/samples/xsp/logicsheets/hello.xsl
Index: hello.xsl
===================================================================
RCS file: /home/cvs/cocoon-2.2/src/webapp/samples/xsp/logicsheets/hello.xsl,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- hello.xsl 27 Mar 2003 17:55:47 -0000 1.1
+++ hello.xsl 10 Mar 2004 10:32:56 -0000 1.2
@@ -1,4 +1,19 @@
<?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.
+-->
<!--
* Hello World logicsheet for the Java language
1.3 +87 -24 cocoon-2.2/src/webapp/samples/test/sitemap.xmap
Index: sitemap.xmap
===================================================================
RCS file: /home/cvs/cocoon-2.2/src/webapp/samples/test/sitemap.xmap,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- sitemap.xmap 26 Nov 2003 06:47:58 -0000 1.2
+++ sitemap.xmap 10 Mar 2004 10:32:56 -0000 1.3
@@ -1,27 +1,90 @@
<?xml version="1.0" encoding="ISO-8859-1"?>
+<!--
+ 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.
+-->
<map:sitemap xmlns:map="http://apache.org/cocoon/sitemap/1.0">
- <map:components>
- <map:generators default="file"/>
- <map:transformers default="xslt"/>
- <map:readers default="resource"/>
- <map:serializers default="html"/>
- <map:selectors default="browser"/>
- <map:matchers default="wildcard"/>
- </map:components>
- <map:pipelines>
- <map:pipeline>
- <map:match pattern="simpletest-content/**">
- <map:generate src="{1}"/>
- <map:serialize type="xml"/>
- </map:match>
- <map:match pattern="simpletest-mounted/**">
- <map:mount src="simpletest-mounted/"
uri-prefix="simpletest-mounted"/>
- </map:match>
- <map:match pattern="simpletest">
- <map:generate src="cocoon:/simpletest-content/a.xml"/>
- <map:transform type="cinclude"/>
- <map:serialize type="xml"/>
- </map:match>
- </map:pipeline>
- </map:pipelines>
+
+ <map:pipelines>
+
+ <!-- used by the internalRequest anteater test -->
+ <map:pipeline>
+ <map:match pattern="simpletest-content/**">
+ <map:generate src="{1}"/>
+ <map:serialize type="xml"/>
+ </map:match>
+ <map:match pattern="simpletest-mounted/**">
+ <map:mount src="simpletest-mounted/"
uri-prefix="simpletest-mounted"/>
+ </map:match>
+ <map:match pattern="simpletest">
+ <map:generate src="cocoon:/simpletest-content/a.xml"/>
+ <map:transform type="cinclude"/>
+ <map:serialize type="xml"/>
+ </map:match>
+ </map:pipeline>
+
+ <!-- explain what this is -->
+ <map:pipeline>
+ <map:match pattern="">
+ <map:redirect-to uri="index.html"/>
+ </map:match>
+
+ <map:match pattern="directory.xml">
+ <map:generate type="directory" src=".">
+ <depth>1</depth>
+ </map:generate>
+ <map:serialize type="xml"/>
+ </map:match>
+
+ <map:match pattern="index.html">
+ <map:aggregate element="combo">
+ <map:part src="index.xml"/>
+ <map:part src="cocoon:/directory.xml"/>
+ </map:aggregate>
+ <map:transform src="dir-links.xsl"/>
+ <map:transform
src="context://samples/common/style/xsl/html/simple-page2html.xsl">
+ <map:parameter name="servletPath"
value="{request:servletPath}"/>
+ <map:parameter name="sitemapURI"
value="{request:sitemapURI}"/>
+ <map:parameter name="contextPath"
value="{request:contextPath}"/>
+ <map:parameter name="file" value="{1}/{2}.xml"/>
+ <map:parameter name="remove" value="{0}"/>
+ </map:transform>
+ <map:serialize type="html"/>
+ </map:match>
+
+ <!-- process the explain-test page for subdirectories -->
+ <map:match pattern="**/">
+ <map:redirect-to uri="explain-test.html"/>
+ </map:match>
+ <map:match pattern="**/explain-test.html">
+ <map:generate src="{1}/explain-test.xml"/>
+ <map:transform
src="context://samples/common/style/xsl/html/simple-page2html.xsl">
+ <map:parameter name="servletPath"
value="{request:servletPath}"/>
+ <map:parameter name="sitemapURI"
value="{request:sitemapURI}"/>
+ <map:parameter name="contextPath"
value="{request:contextPath}"/>
+ <map:parameter name="file" value="{1}/{2}.xml"/>
+ <map:parameter name="remove" value="{0}"/>
+ </map:transform>
+ <map:serialize type="html"/>
+ </map:match>
+
+ <!-- mount subdirectories to contain tests -->
+ <map:match pattern="*/**">
+ <map:mount check-reload="yes" src="{1}/" uri-prefix="{1}"/>
+ </map:match>
+
+ </map:pipeline>
+
+ </map:pipelines>
</map:sitemap>
1.1 cocoon-2.2/src/webapp/samples/test/dir-links.xsl
Index: dir-links.xsl
===================================================================
<?xml version="1.0" encoding="UTF-8"?>
<!--
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.
-->
<!--
Add links to subdirectories to index.xml
CVS $Id: dir-links.xsl,v 1.1 2004/03/10 10:32:56 cziegeler Exp $
-->
<xsl:stylesheet
version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:dir="http://apache.org/cocoon/directory/2.0"
xmlns="http://www.w3.org/1999/xhtml"
>
<!-- by default copy everything -->
<xsl:template match="*">
<xsl:copy>
<xsl:copy-of select="@*"/>
<xsl:apply-templates/>
</xsl:copy>
</xsl:template>
<xsl:template match="combo">
<xsl:apply-templates select="page"/>
</xsl:template>
<!-- insert links to subdirectories -->
<xsl:template match="insert-directories">
<ul>
<xsl:apply-templates select="//dir:directory/dir:directory"
mode="links"/>
</ul>
</xsl:template>
<!-- ignore directory listing -->
<xsl:template match="dir:directory"/>
<!-- generate link to subdirectory -->
<xsl:template match="dir:directory" mode="links">
<li>
<a href="{concat(@name,'/')}"><xsl:value-of select="@name"/></a>
</li>
</xsl:template>
</xsl:stylesheet>
1.1 cocoon-2.2/src/webapp/samples/test/index.xml
Index: index.xml
===================================================================
<?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.
-->
<!-- CVS $Id: index.xml,v 1.1 2004/03/10 10:32:56 cziegeler Exp $ -->
<page>
<title>Test pages</title>
<content>
<para>
Stuff found in and under this directory is meant for automated
anteater tests.
</para>
<para>
To run tests used the <em>anteater-tests</em> build target.
</para>
<para>
To create a new test set, create a new subdirectory here and add
an <em>explain-test.xml</em>
document into it.
</para>
<para>
<b>Available tests</b>:
<insert-directories/>
</para>
</content>
</page>
1.3 +15 -0
cocoon-2.2/src/webapp/samples/stylesheets/dynamic-page2html.xsl
Index: dynamic-page2html.xsl
===================================================================
RCS file:
/home/cvs/cocoon-2.2/src/webapp/samples/stylesheets/dynamic-page2html.xsl,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- dynamic-page2html.xsl 27 Mar 2003 17:55:47 -0000 1.2
+++ dynamic-page2html.xsl 10 Mar 2004 10:32:56 -0000 1.3
@@ -1,4 +1,19 @@
<?xml version="1.0" encoding="ISO-8859-1"?>
+<!--
+ 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.
+-->
<xsl:stylesheet
version="1.0"
1.2 +16 -1 cocoon-2.2/src/webapp/samples/xsp/javascript/simple.xsp
Index: simple.xsp
===================================================================
RCS file: /home/cvs/cocoon-2.2/src/webapp/samples/xsp/javascript/simple.xsp,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- simple.xsp 7 Sep 2003 06:09:10 -0000 1.1
+++ simple.xsp 10 Mar 2004 10:32:56 -0000 1.2
@@ -1,4 +1,19 @@
<?xml version="1.0" encoding="ISO-8859-1"?>
+<!--
+ 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.
+-->
<!-- CVS $Id$ -->
1.2 +16 -1 cocoon-2.2/src/webapp/samples/xsp/javascript/hello.xsp
Index: hello.xsp
===================================================================
RCS file: /home/cvs/cocoon-2.2/src/webapp/samples/xsp/javascript/hello.xsp,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- hello.xsp 7 Sep 2003 06:09:10 -0000 1.1
+++ hello.xsp 10 Mar 2004 10:32:56 -0000 1.2
@@ -1,4 +1,19 @@
<?xml version="1.0" encoding="ISO-8859-1"?>
+<!--
+ 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.
+-->
<!-- CVS $Id$ -->
1.2 +16 -1 cocoon-2.2/src/webapp/samples/xsp/javascript/response.xsp
Index: response.xsp
===================================================================
RCS file:
/home/cvs/cocoon-2.2/src/webapp/samples/xsp/javascript/response.xsp,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- response.xsp 7 Sep 2003 06:09:10 -0000 1.1
+++ response.xsp 10 Mar 2004 10:32:56 -0000 1.2
@@ -1,4 +1,19 @@
<?xml version="1.0" encoding="ISO-8859-1"?>
+<!--
+ 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.
+-->
<!-- CVS $Id$ -->
1.2 +16 -1 cocoon-2.2/src/webapp/samples/xsp/javascript/request.xsp
Index: request.xsp
===================================================================
RCS file: /home/cvs/cocoon-2.2/src/webapp/samples/xsp/javascript/request.xsp,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- request.xsp 7 Sep 2003 06:09:10 -0000 1.1
+++ request.xsp 10 Mar 2004 10:32:56 -0000 1.2
@@ -1,4 +1,19 @@
<?xml version="1.0" encoding="ISO-8859-1"?>
+<!--
+ 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.
+-->
<!-- CVS $Id$ -->
1.2 +16 -1 cocoon-2.2/src/webapp/samples/xsp/javascript/session.xsp
Index: session.xsp
===================================================================
RCS file: /home/cvs/cocoon-2.2/src/webapp/samples/xsp/javascript/session.xsp,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- session.xsp 7 Sep 2003 06:09:10 -0000 1.1
+++ session.xsp 10 Mar 2004 10:32:56 -0000 1.2
@@ -1,4 +1,19 @@
<?xml version="1.0" encoding="iso-8859-1"?>
+<!--
+ 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.
+-->
<!-- CVS $Id$ -->
1.2 +16 -1 cocoon-2.2/src/webapp/samples/sources/content/dynamic.xsp
Index: dynamic.xsp
===================================================================
RCS file:
/home/cvs/cocoon-2.2/src/webapp/samples/sources/content/dynamic.xsp,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- dynamic.xsp 7 May 2003 04:57:15 -0000 1.1
+++ dynamic.xsp 10 Mar 2004 10:32:56 -0000 1.2
@@ -1,4 +1,19 @@
<?xml version="1.0" encoding="ISO-8859-1"?>
+<!--
+ 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.
+-->
<!-- CVS $Id$ -->
1.2 +16 -1 cocoon-2.2/src/webapp/samples/sources/content/simple.xml
Index: simple.xml
===================================================================
RCS file: /home/cvs/cocoon-2.2/src/webapp/samples/sources/content/simple.xml,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- simple.xml 7 May 2003 04:57:15 -0000 1.1
+++ simple.xml 10 Mar 2004 10:32:56 -0000 1.2
@@ -1,4 +1,19 @@
<?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.
+-->
<!-- CVS $Id$ -->
1.2 +16 -1 cocoon-2.2/src/webapp/samples/sources/content/simple.xsp
Index: simple.xsp
===================================================================
RCS file: /home/cvs/cocoon-2.2/src/webapp/samples/sources/content/simple.xsp,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- simple.xsp 7 May 2003 04:57:15 -0000 1.1
+++ simple.xsp 10 Mar 2004 10:32:56 -0000 1.2
@@ -1,4 +1,19 @@
<?xml version="1.0" encoding="ISO-8859-1"?>
+<!--
+ 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.
+-->
<!-- CVS $Id$ -->
1.1 cocoon-2.2/src/webapp/samples/sources/content/upload.xml
Index: upload.xml
===================================================================
<?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.
-->
<!-- CVS $Id: upload.xml,v 1.1 2004/03/10 10:32:56 cziegeler Exp $ -->
<page>
<title>Demonstrate file upload as source</title>
<content>
<para>
Hi there! I'm a simple static page read from a file, but that's not the
interesting part of this sample. Select any xml file from your local
drive, and upload it. The resulting page will display that xml
transformed
by a stylesheet (which could also be provided via upload).
</para>
<para>
You must have configured enable-uploads as true in web.xml or built
Cocoon
with the config.enable-uploads=true property set for this sample to
work.
</para>
<para>
<form method="post" enctype="multipart/form-data"
action="xml-upload-post" >
File: <input type="file" name="formFieldOne" size="50" />
<p>
<input type="submit" value="Upload File" />
</p>
</form>
</para>
</content>
</page>
1.1
cocoon-2.2/src/webapp/samples/test/internal-request/mounted/sitemap.xmap
Index: sitemap.xmap
===================================================================
<?xml version="1.0" encoding="ISO-8859-1"?>
<!--
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.
-->
<map:sitemap xmlns:map="http://apache.org/cocoon/sitemap/1.0">
<map:pipelines>
<map:pipeline>
<map:match pattern="includer">
<map:generate src="c.xml"/>
<map:serialize type="xml"/>
</map:match>
</map:pipeline>
</map:pipelines>
</map:sitemap>
1.1
cocoon-2.2/src/webapp/samples/test/internal-request/mounted/c.xml
Index: c.xml
===================================================================
<?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.
-->
<test file="c">
<note>This is c.xml served from the sitemap mounted below</note>
</test>
1.1 cocoon-2.2/src/webapp/samples/text-wrap/welcome.html
Index: welcome.html
===================================================================
<html>
<head>
<title>Various methods to handle long lines of text</title>
</head>
<body>
<h1>Various methods to handle long lines of text</h1>
<p>
Sometimes the lines inside <source> elements are too wide,
which can make the resulting pages too wide to view on screen or to print.
The width of the long source line causes the whole page layout to be that
same width. A web page that is wider than the screen is a complete bastard to
read - you have to scroll right and left all the time. And printing in
landscape orientation is not very nice either.
(See Bugzilla report
<a href="http://nagoya.apache.org/bugzilla/show_bug.cgi?id=23796">23796</a>.)
</p>
<p>
If everyone followed code conventions for Java and XML then this
would not happen. However, there is no way to guarantee that.
</p>
<p>
Of course, there is the workaround solution to edit the offending source
elements to specifically break long lines. Not good for automated solutions
or separation of concerns.
</p>
<p>
We need to find a way to consistently split lines that are too wide.
Here are demonstrations of various solutions. Each one has pros and cons.
Please help to enhance these solutions so that one can soon be implemented.
(See <a href="#notes">Notes</a> below.)
</p>
<p>
The following examples are deliberately extreme to ensure that the issues
are triggered.
</p>
<h2>Using no special handling</h2>
<p>No special handling was done for the
<source> elements. The content is wrapped with a <pre> element.
Note the long right-left scrollbar.
</p>
<ul>
<li>
<a href="raw/with-word-boundaries">Long Line With Word Boundaries</a>
</li>
<li>
<a href="raw/without-word-boundaries">Long Line Without Word Boundaries</a>
</li>
<li>
<a href="raw/cdata-model">CDATA and deeply embedded xml content model</a>
</li>
<li>
<a href="raw/cdata-model-2">CDATA and deeply embedded xml content model with
long names</a>
</li>
</ul>
<h2>Using the "split.xsl" stylesheet</h2>
<p>All <source> elements had their long lines wrapped at a defined
width (72) by the included split.xsl stylesheet. Lines with no whitespace
(such as long URLs) are forcefully split at 72 characters.
The content is wrapped with a <pre> element.
</p>
<p>Note: In past Cocoons this stylesheet has been reported to be a memory
hog on certain JVMs. How does it go for you?
</p>
<ul>
<li>
<a href="split/with-word-boundaries">Long Line With Word Boundaries</a>
</li>
<li>
<a href="split/without-word-boundaries">Long Line Without Word Boundaries</a>
</li>
<li>
<a href="split/cdata-model">CDATA and deeply embedded xml content model</a>
</li>
<li>
<a href="split/cdata-model-2">CDATA and deeply embedded xml content model
with long names</a>
</li>
</ul>
<h2>Using the "wrap2para.xsl" stylesheet</h2>
<p>Only <source> elements that contain an xml content model had their
lines handled by the included wrap2para.xsl stylesheet. It does not intend to
address all cases of source, only type=xml source.
Lines are each wrapped with a styled <p> element.
</p>
<ul>
<li>
<a href="wrap2para/cdata-model">CDATA and deeply embedded xml content
model</a>
</li>
<li>
<a href="wrap2para/cdata-model-2">CDATA and deeply embedded xml content model
with long names</a>
</li>
</ul>
<h2>Using the "docnbsp.xsl" stylesheet</h2>
<p>
Sequences of two consecutive spaces are replaced by a non-breaking space
and a regular space.
Each line is encased in a <code><br/>
This method keeps the text indentation that would be obtained with a
<pre>
while still allowing line wrapping by the browser.
This utilises the <a href="http://exslt.org/">exslt extension</a> for strings.
</p>
<ul>
<li>
<a href="nbsp/with-word-boundaries">Long Line With Word Boundaries</a>
</li>
<li>
<a href="nbsp/without-word-boundaries">Long Line Without Word Boundaries</a>
</li>
<li>
<a href="nbsp/cdata-model">CDATA and deeply embedded xml content model</a>
</li>
<li>
<a href="nbsp/cdata-model-2">CDATA and deeply embedded xml content model with
long names</a>
</li>
</ul>
<a name="notes" />
<h2>Other notes</h2>
<p>
Suggested enhancements include: using the @type attribute; "content sniff";
...
</p>
<p>
There may be some other solutions. Suggestions include the Chaperon Block
and maybe the Slop Block.
</p>
<p>
See the Bugzilla report
(<a href="http://nagoya.apache.org/bugzilla/show_bug.cgi?id=23796">23796</a>)
and the links to the cocoon-dev and forrest-dev mail discussion.
</p>
<p>
Some testcase documents ...
</p>
<ul>
<li><a href="http://xml.apache.org/forrest/your-project.html">Using
Forrest</a></li>
<li><a
href="http://cocoon.apache.org/2.1/userdocs/concepts/modules.html">Modules</a></li>
</ul>
</body>
</html>
1.1 cocoon-2.2/src/webapp/samples/text-wrap/sitemap.xmap
Index: sitemap.xmap
===================================================================
<?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.
-->
<!-- CVS $Id: sitemap.xmap,v 1.3 2004/03/06 02:26:19 antonio Exp $ -->
<map:sitemap xmlns:map="http://apache.org/cocoon/sitemap/1.0">
<map:pipelines>
<map:pipeline>
<map:match pattern="">
<map:redirect-to uri="welcome"/>
</map:match>
<map:match pattern="index.html">
<map:redirect-to uri="welcome"/>
</map:match>
<map:match pattern="welcome">
<map:read src="welcome.html"/>
<map:serialize/>
</map:match>
<map:match pattern="raw/*">
<map:generate src="data/{1}.xml"/>
<map:transform src="xslt/docraw.xsl"/>
<map:serialize type="html"/>
</map:match>
<map:match pattern="split/*">
<map:generate src="data/{1}.xml"/>
<map:transform src="xslt/docsplit.xsl"/>
<map:serialize type="html"/>
</map:match>
<map:match pattern="wrap2para/*">
<map:generate src="data/{1}.xml"/>
<map:transform src="xslt/docwrap.xsl"/>
<map:serialize type="html"/>
</map:match>
<map:match pattern="nbsp/*">
<map:generate src="data/{1}.xml"/>
<map:transform src="xslt/docnbsp.xsl"/>
<map:serialize type="html"/>
</map:match>
</map:pipeline>
</map:pipelines>
</map:sitemap>
1.6 +16 -1 cocoon-2.2/src/webapp/samples/stream/sitemap.xmap
Index: sitemap.xmap
===================================================================
RCS file: /home/cvs/cocoon-2.2/src/webapp/samples/stream/sitemap.xmap,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- sitemap.xmap 6 Mar 2004 14:34:40 -0000 1.5
+++ sitemap.xmap 10 Mar 2004 10:32:56 -0000 1.6
@@ -1,4 +1,19 @@
<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ 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.
+-->
<!-- CVS $Id$ -->
1.2 +15 -0 cocoon-2.2/src/webapp/samples/xsp/python/hello.xsp
Index: hello.xsp
===================================================================
RCS file: /home/cvs/cocoon-2.2/src/webapp/samples/xsp/python/hello.xsp,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- hello.xsp 7 Sep 2003 06:09:10 -0000 1.1
+++ hello.xsp 10 Mar 2004 10:32:56 -0000 1.2
@@ -1,4 +1,19 @@
<?xml version="1.0" encoding="ISO-8859-1"?>
+<!--
+ 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.
+-->
<xsp:page language="python" xmlns:xsp="http://apache.org/xsp">
<page>
1.1
cocoon-2.2/src/webapp/samples/test/reader-mime-type/test10.html
Index: test10.html
===================================================================
<html>
<body>
This should have the text/html mime type.
</body>
</html>
1.1
cocoon-2.2/src/webapp/samples/test/reader-mime-type/sitemap.xmap
Index: sitemap.xmap
===================================================================
<?xml version="1.0" encoding="ISO-8859-1"?>
<!--
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.
-->
<map:sitemap xmlns:map="http://apache.org/cocoon/sitemap/1.0">
<map:pipelines>
<map:pipeline>
<map:match pattern="test10.html">
<map:read src="test10.html"/>
</map:match>
<map:match pattern="test20.html">
<map:read src="cocoon:/test10.html"/>
</map:match>
<map:match pattern="test30">
<map:read src="test10.html"/>
</map:match>
</map:pipeline>
<map:pipeline>
<map:match pattern="test40.html">
<map:read src="cocoon:/test10.html"/>
</map:match>
</map:pipeline>
<map:pipeline>
<map:match pattern="test50.html">
<map:read src="cocoon:/test30"/>
</map:match>
</map:pipeline>
<map:pipeline>
<map:match pattern="test60.html">
<map:read src="cocoon:/test10.html" mime-type="text/html"/>
</map:match>
</map:pipeline>
<map:pipeline>
<map:match pattern="test70.html">
<map:read src="cocoon:/test30" mime-type="text/html"/>
</map:match>
</map:pipeline>
</map:pipelines>
</map:sitemap>
1.1
cocoon-2.2/src/webapp/samples/test/reader-mime-type/explain-test.xml
Index: explain-test.xml
===================================================================
<?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.
-->
<!-- CVS $Id: explain-test.xml,v 1.1 2004/03/10 10:32:56 cziegeler Exp $ -->
<page>
<title>reader-mime-type test</title>
<content>
<para>Test harness for
<a href="http://nagoya.apache.org/bugzilla/show_bug.cgi?id=25121">
bugzilla 25212
</a>, test mime-types on map:reader.
</para>
<para>
Test links:
<ul>
<li><link href="test10.html">test10.html</link></li>
<li><link href="test20.html">test20.html</link></li>
<li><link href="test30">test30</link></li>
<li><link href="test40.html">test40.html</link></li>
<li><link href="test50.html">test50.html</link></li>
<li><link href="test60.html">test60.html</link></li>
<li><link href="test70.html">test70.html</link></li>
</ul>
</para>
</content>
</page>
1.2 +16 -1
cocoon-2.2/src/webapp/samples/sources/style/simple-page2html.xsp
Index: simple-page2html.xsp
===================================================================
RCS file:
/home/cvs/cocoon-2.2/src/webapp/samples/sources/style/simple-page2html.xsp,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- simple-page2html.xsp 7 May 2003 04:57:15 -0000 1.1
+++ simple-page2html.xsp 10 Mar 2004 10:32:56 -0000 1.2
@@ -1,4 +1,19 @@
<?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.
+-->
<!-- CVS $Id$ -->
1.2 +16 -1
cocoon-2.2/src/webapp/samples/sources/style/dynamic-xsp2xsp.xsl
Index: dynamic-xsp2xsp.xsl
===================================================================
RCS file:
/home/cvs/cocoon-2.2/src/webapp/samples/sources/style/dynamic-xsp2xsp.xsl,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- dynamic-xsp2xsp.xsl 7 May 2003 04:57:15 -0000 1.1
+++ dynamic-xsp2xsp.xsl 10 Mar 2004 10:32:56 -0000 1.2
@@ -1,4 +1,19 @@
<?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.
+-->
<!-- CVS $Id$ -->
1.5 +16 -1 cocoon-2.2/src/webapp/samples/xsp/samples.xml
Index: samples.xml
===================================================================
RCS file: /home/cvs/cocoon-2.2/src/webapp/samples/xsp/samples.xml,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- samples.xml 7 Sep 2003 06:09:10 -0000 1.4
+++ samples.xml 10 Mar 2004 10:32:56 -0000 1.5
@@ -1,4 +1,19 @@
<?xml version="1.0" encoding="iso-8859-1"?>
+<!--
+ 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.
+-->
<!-- CVS $Id$ -->
1.5 +15 -0 cocoon-2.2/src/webapp/samples/xsp/sitemap.xmap
Index: sitemap.xmap
===================================================================
RCS file: /home/cvs/cocoon-2.2/src/webapp/samples/xsp/sitemap.xmap,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- sitemap.xmap 7 Sep 2003 06:09:10 -0000 1.4
+++ sitemap.xmap 10 Mar 2004 10:32:56 -0000 1.5
@@ -1,4 +1,19 @@
<?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.
+-->
<map:sitemap xmlns:map="http://apache.org/cocoon/sitemap/1.0">
1.3 +16 -0 cocoon-2.2/src/webapp/samples/xsp/stream/OrderPage.xml
Index: OrderPage.xml
===================================================================
RCS file: /home/cvs/cocoon-2.2/src/webapp/samples/xsp/stream/OrderPage.xml,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- OrderPage.xml 13 Aug 2003 22:51:30 -0000 1.2
+++ OrderPage.xml 10 Mar 2004 10:32:57 -0000 1.3
@@ -1,3 +1,19 @@
+<?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.
+-->
<page>
<title>B2B processing</title>
<content>
1.3 +33 -0 cocoon-2.2/src/webapp/samples/sources/sitemap.xmap
Index: sitemap.xmap
===================================================================
RCS file: /home/cvs/cocoon-2.2/src/webapp/samples/sources/sitemap.xmap,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- sitemap.xmap 29 Jul 2003 03:15:47 -0000 1.2
+++ sitemap.xmap 10 Mar 2004 10:32:57 -0000 1.3
@@ -1,4 +1,19 @@
<?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.
+-->
<map:sitemap xmlns:map="http://apache.org/cocoon/sitemap/1.0">
@@ -189,6 +204,24 @@
<map:parameter name="remove" value="{0}"/>
<map:parameter name="file" value="content/simple.xsp"/>
</map:transform>
+ <map:serialize/>
+ </map:match>
+
+ <!-- Uploaded xml as source. Beware: Very cool! -->
+ <map:match pattern="xml-upload">
+ <map:generate src="content/upload.xml"/>
+ <map:transform
src="context://samples/common/style/xsl/html/simple-page2html.xsl">
+ <map:parameter name="servletPath" value="{request:servletPath}"/>
+ <map:parameter name="sitemapURI" value="{request:sitemapURI}"/>
+ <map:parameter name="contextPath" value="{request:contextPath}"/>
+ <map:parameter name="remove" value="xml-upload"/>
+ <map:parameter name="file" value="content/simple.xml"/>
+ </map:transform>
+ <map:serialize/>
+ </map:match>
+ <map:match pattern="xml-upload-post">
+ <map:generate src="upload://formFieldOne"/>
+ <map:transform src="context://stylesheets/system/xml2html.xslt"/>
<map:serialize/>
</map:match>
1.3 +22 -1 cocoon-2.2/src/webapp/samples/sources/samples.xml
Index: samples.xml
===================================================================
RCS file: /home/cvs/cocoon-2.2/src/webapp/samples/sources/samples.xml,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- samples.xml 2 Oct 2003 04:30:06 -0000 1.2
+++ samples.xml 10 Mar 2004 10:32:57 -0000 1.3
@@ -1,4 +1,19 @@
<?xml version="1.0" encoding="iso-8859-1"?>
+<!--
+ 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.
+-->
<!-- CVS $Id$ -->
@@ -65,6 +80,12 @@
Combines last XSP sample with last XSL sample: XSP is obtained via
Cocoon
source cocoon:/xsp-dynamic-source, and processed by XSL obtained via
Cocoon
source cocoon:/xsl-dynamic-source.
+ </sample>
+ </group>
+
+ <group name="Uploaded XML through Static XSL">
+ <sample name="Uploaded XML" href="xml-upload">
+ Demonstrates use of upload:// pseudo-protocol.
</sample>
</group>
</samples>