cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From reinh...@apache.org
Subject svn commit: r614036 - in /cocoon/whiteboard/micro/misc/cocoon-micro-it-block/src/main/resources/COB-INF: ./ demo/ read/ sax-pipeline/
Date Mon, 21 Jan 2008 22:59:21 GMT
Author: reinhard
Date: Mon Jan 21 14:59:19 2008
New Revision: 614036

URL: http://svn.apache.org/viewvc?rev=614036&view=rev
Log:
add samples for integration tests:
 - sax pipelines
 - readers
 - error handling

Added:
    cocoon/whiteboard/micro/misc/cocoon-micro-it-block/src/main/resources/COB-INF/404.xml
  (with props)
    cocoon/whiteboard/micro/misc/cocoon-micro-it-block/src/main/resources/COB-INF/overview.html
  (with props)
    cocoon/whiteboard/micro/misc/cocoon-micro-it-block/src/main/resources/COB-INF/read/
    cocoon/whiteboard/micro/misc/cocoon-micro-it-block/src/main/resources/COB-INF/read/javascript-resource
    cocoon/whiteboard/micro/misc/cocoon-micro-it-block/src/main/resources/COB-INF/read/javascript-resource.js
  (with props)
    cocoon/whiteboard/micro/misc/cocoon-micro-it-block/src/main/resources/COB-INF/sax-pipeline/
    cocoon/whiteboard/micro/misc/cocoon-micro-it-block/src/main/resources/COB-INF/sax-pipeline/simple.xml
  (with props)
    cocoon/whiteboard/micro/misc/cocoon-micro-it-block/src/main/resources/COB-INF/sax-pipeline/simple.xslt
  (with props)
    cocoon/whiteboard/micro/misc/cocoon-micro-it-block/src/main/resources/COB-INF/sax-pipeline/unauthorized.xml
  (with props)
Removed:
    cocoon/whiteboard/micro/misc/cocoon-micro-it-block/src/main/resources/COB-INF/demo/
Modified:
    cocoon/whiteboard/micro/misc/cocoon-micro-it-block/src/main/resources/COB-INF/sitemap.xmap

Added: cocoon/whiteboard/micro/misc/cocoon-micro-it-block/src/main/resources/COB-INF/404.xml
URL: http://svn.apache.org/viewvc/cocoon/whiteboard/micro/misc/cocoon-micro-it-block/src/main/resources/COB-INF/404.xml?rev=614036&view=auto
==============================================================================
--- cocoon/whiteboard/micro/misc/cocoon-micro-it-block/src/main/resources/COB-INF/404.xml
(added)
+++ cocoon/whiteboard/micro/misc/cocoon-micro-it-block/src/main/resources/COB-INF/404.xml
Mon Jan 21 14:59:19 2008
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You under the Apache License, Version 2.0
+  (the "License"); you may not use this file except in compliance with
+  the License.  You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+-->
+<html>
+  <head>
+    <title>404 Resource Not Available (Integration Tests)</title>
+  </head>
+  <body>404 Resource Not Available (Integration Tests)</body>
+</html>

Propchange: cocoon/whiteboard/micro/misc/cocoon-micro-it-block/src/main/resources/COB-INF/404.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: cocoon/whiteboard/micro/misc/cocoon-micro-it-block/src/main/resources/COB-INF/404.xml
------------------------------------------------------------------------------
    svn:keywords = Id

Propchange: cocoon/whiteboard/micro/misc/cocoon-micro-it-block/src/main/resources/COB-INF/404.xml
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Added: cocoon/whiteboard/micro/misc/cocoon-micro-it-block/src/main/resources/COB-INF/overview.html
URL: http://svn.apache.org/viewvc/cocoon/whiteboard/micro/misc/cocoon-micro-it-block/src/main/resources/COB-INF/overview.html?rev=614036&view=auto
==============================================================================
--- cocoon/whiteboard/micro/misc/cocoon-micro-it-block/src/main/resources/COB-INF/overview.html
(added)
+++ cocoon/whiteboard/micro/misc/cocoon-micro-it-block/src/main/resources/COB-INF/overview.html
Mon Jan 21 14:59:19 2008
@@ -0,0 +1,39 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You under the Apache License, Version 2.0
+  (the "License"); you may not use this file except in compliance with
+  the License.  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+-->
+<html>
+  <head>
+    <title>Micro Cocoon Integration Tests: Overview</title>
+	<base target="_blank"/>
+  </head>
+  <body>
+  	<h1>Micro Cocoon Integration Tests</h1>
+	<h2>map:read</h2>
+	<ul>
+		<li><a href="read/javascript-resource-explicit">Javascript Resource</a>:
Test explicit setting of mime-type.</li>
+		<li><a href="read/javascript-resource-implicit">Javascript Resource</a>:
Test automatic setting of mime-type.</li>
+	</ul>
+	<h2>SAX Pipelines</h2>
+	<ul>
+		<li><a href="sax-pipeline/simple">SAX Pipeline</a>: Simplest possible
pipeline that has a generator, transformer and serializer.</li>
+		<li><a href="sax-pipeline/simple-xhtml">SAX Pipeline</a>: Same as before
but creates XHTML as output format.</li>
+		<li><a href="sax-pipeline/simple-xml">SAX Pipeline</a>: Same as before
but creates XML as output format.</li>
+		<li><a href="sax-pipeline/unauthorized">Status code</a>: Set status code
'401' at pipeline.</li>
+		<li><a href="123456789123456789">Error handling</a>: The error handler
catches all exceptions, in this case no matcher matches.</li>
+	</ul>
+  </body>
+</html>

Propchange: cocoon/whiteboard/micro/misc/cocoon-micro-it-block/src/main/resources/COB-INF/overview.html
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: cocoon/whiteboard/micro/misc/cocoon-micro-it-block/src/main/resources/COB-INF/overview.html
------------------------------------------------------------------------------
    svn:mime-type = text/html

Added: cocoon/whiteboard/micro/misc/cocoon-micro-it-block/src/main/resources/COB-INF/read/javascript-resource
URL: http://svn.apache.org/viewvc/cocoon/whiteboard/micro/misc/cocoon-micro-it-block/src/main/resources/COB-INF/read/javascript-resource?rev=614036&view=auto
==============================================================================
--- cocoon/whiteboard/micro/misc/cocoon-micro-it-block/src/main/resources/COB-INF/read/javascript-resource
(added)
+++ cocoon/whiteboard/micro/misc/cocoon-micro-it-block/src/main/resources/COB-INF/read/javascript-resource
Mon Jan 21 14:59:19 2008
@@ -0,0 +1,20 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+function x() {
+  alert('x');
+}
\ No newline at end of file

Added: cocoon/whiteboard/micro/misc/cocoon-micro-it-block/src/main/resources/COB-INF/read/javascript-resource.js
URL: http://svn.apache.org/viewvc/cocoon/whiteboard/micro/misc/cocoon-micro-it-block/src/main/resources/COB-INF/read/javascript-resource.js?rev=614036&view=auto
==============================================================================
--- cocoon/whiteboard/micro/misc/cocoon-micro-it-block/src/main/resources/COB-INF/read/javascript-resource.js
(added)
+++ cocoon/whiteboard/micro/misc/cocoon-micro-it-block/src/main/resources/COB-INF/read/javascript-resource.js
Mon Jan 21 14:59:19 2008
@@ -0,0 +1,20 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+function x() {
+  alert('x');
+}

Propchange: cocoon/whiteboard/micro/misc/cocoon-micro-it-block/src/main/resources/COB-INF/read/javascript-resource.js
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: cocoon/whiteboard/micro/misc/cocoon-micro-it-block/src/main/resources/COB-INF/read/javascript-resource.js
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: cocoon/whiteboard/micro/misc/cocoon-micro-it-block/src/main/resources/COB-INF/sax-pipeline/simple.xml
URL: http://svn.apache.org/viewvc/cocoon/whiteboard/micro/misc/cocoon-micro-it-block/src/main/resources/COB-INF/sax-pipeline/simple.xml?rev=614036&view=auto
==============================================================================
--- cocoon/whiteboard/micro/misc/cocoon-micro-it-block/src/main/resources/COB-INF/sax-pipeline/simple.xml
(added)
+++ cocoon/whiteboard/micro/misc/cocoon-micro-it-block/src/main/resources/COB-INF/sax-pipeline/simple.xml
Mon Jan 21 14:59:19 2008
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You under the Apache License, Version 2.0
+  (the "License"); you may not use this file except in compliance with
+  the License.  You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+-->
+<simple>simple-text</simple>

Propchange: cocoon/whiteboard/micro/misc/cocoon-micro-it-block/src/main/resources/COB-INF/sax-pipeline/simple.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: cocoon/whiteboard/micro/misc/cocoon-micro-it-block/src/main/resources/COB-INF/sax-pipeline/simple.xml
------------------------------------------------------------------------------
    svn:keywords = Id

Propchange: cocoon/whiteboard/micro/misc/cocoon-micro-it-block/src/main/resources/COB-INF/sax-pipeline/simple.xml
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Added: cocoon/whiteboard/micro/misc/cocoon-micro-it-block/src/main/resources/COB-INF/sax-pipeline/simple.xslt
URL: http://svn.apache.org/viewvc/cocoon/whiteboard/micro/misc/cocoon-micro-it-block/src/main/resources/COB-INF/sax-pipeline/simple.xslt?rev=614036&view=auto
==============================================================================
--- cocoon/whiteboard/micro/misc/cocoon-micro-it-block/src/main/resources/COB-INF/sax-pipeline/simple.xslt
(added)
+++ cocoon/whiteboard/micro/misc/cocoon-micro-it-block/src/main/resources/COB-INF/sax-pipeline/simple.xslt
Mon Jan 21 14:59:19 2008
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You under the Apache License, Version 2.0
+  (the "License"); you may not use this file except in compliance with
+  the License.  You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+-->
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <xsl:param name="myParam"/>
+
+  <xsl:template match="/">
+    <html>
+      <head>
+        <title>Simple Pipeline</title>
+      </head>
+      <body>
+        <h1>Simple Pipeline</h1>
+        <p><xsl:value-of select="$myParam"/></p>
+      </body>
+    </html>
+  </xsl:template>
+
+</xsl:stylesheet>

Propchange: cocoon/whiteboard/micro/misc/cocoon-micro-it-block/src/main/resources/COB-INF/sax-pipeline/simple.xslt
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: cocoon/whiteboard/micro/misc/cocoon-micro-it-block/src/main/resources/COB-INF/sax-pipeline/simple.xslt
------------------------------------------------------------------------------
    svn:keywords = Id

Propchange: cocoon/whiteboard/micro/misc/cocoon-micro-it-block/src/main/resources/COB-INF/sax-pipeline/simple.xslt
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Added: cocoon/whiteboard/micro/misc/cocoon-micro-it-block/src/main/resources/COB-INF/sax-pipeline/unauthorized.xml
URL: http://svn.apache.org/viewvc/cocoon/whiteboard/micro/misc/cocoon-micro-it-block/src/main/resources/COB-INF/sax-pipeline/unauthorized.xml?rev=614036&view=auto
==============================================================================
--- cocoon/whiteboard/micro/misc/cocoon-micro-it-block/src/main/resources/COB-INF/sax-pipeline/unauthorized.xml
(added)
+++ cocoon/whiteboard/micro/misc/cocoon-micro-it-block/src/main/resources/COB-INF/sax-pipeline/unauthorized.xml
Mon Jan 21 14:59:19 2008
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You under the Apache License, Version 2.0
+  (the "License"); you may not use this file except in compliance with
+  the License.  You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+-->
+<html>
+  <head>
+    <title>Unauthorized</title>
+  </head>
+  <body>Unauthorized</body>
+</html>

Propchange: cocoon/whiteboard/micro/misc/cocoon-micro-it-block/src/main/resources/COB-INF/sax-pipeline/unauthorized.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: cocoon/whiteboard/micro/misc/cocoon-micro-it-block/src/main/resources/COB-INF/sax-pipeline/unauthorized.xml
------------------------------------------------------------------------------
    svn:keywords = Id

Propchange: cocoon/whiteboard/micro/misc/cocoon-micro-it-block/src/main/resources/COB-INF/sax-pipeline/unauthorized.xml
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Modified: cocoon/whiteboard/micro/misc/cocoon-micro-it-block/src/main/resources/COB-INF/sitemap.xmap
URL: http://svn.apache.org/viewvc/cocoon/whiteboard/micro/misc/cocoon-micro-it-block/src/main/resources/COB-INF/sitemap.xmap?rev=614036&r1=614035&r2=614036&view=diff
==============================================================================
--- cocoon/whiteboard/micro/misc/cocoon-micro-it-block/src/main/resources/COB-INF/sitemap.xmap
(original)
+++ cocoon/whiteboard/micro/misc/cocoon-micro-it-block/src/main/resources/COB-INF/sitemap.xmap
Mon Jan 21 14:59:19 2008
@@ -16,17 +16,58 @@
   limitations under the License.
 -->
 <map:sitemap xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://apache.org/cocoon/sitemap/1.0 http://cocoon.apache.org/schema/sitemap/cocoon-sitemap-1.0.xsd"
- xmlns:map="http://apache.org/cocoon/sitemap/1.0">
+  xsi:schemaLocation="http://apache.org/cocoon/sitemap/1.0 http://cocoon.apache.org/schema/sitemap/cocoon-sitemap-1.0.xsd"
+  xmlns:map="http://apache.org/cocoon/sitemap/1.0">
 
   <map:pipelines>
-    <map:pipeline id="demo">
+    <!-- ~~~~~~~~~~~~~~~~ map:read ~~~~~~~~~~~~~~~ -->
+    <map:pipeline>
       <map:match pattern="">
-        <map:generate src="demo/welcome.xml"/>
-        <map:transform src="demo/welcome.xslt"/>
+        <map:read src="overview.html"/>
+      </map:match>
+      <map:match pattern="read/javascript-resource-explicit">
+        <map:read src="read/javascript-resource" mime-type="text/javascript"/>
+      </map:match>
+      <map:match pattern="read/javascript-resource-implicit">
+        <map:read src="read/javascript-resource.js"/>
+      </map:match>
+    </map:pipeline>
+
+    <!-- ~~~~~~~~~~~~~~~~ sax pipelines ~~~~~~~~~~~~~~~ -->
+    <map:pipeline>
+      <map:match pattern="sax-pipeline/simple">
+        <map:generate src="sax-pipeline/simple.xml"/>
+        <map:transform src="sax-pipeline/simple.xslt">
+          <map:parameter name="myParam" value="1"/>
+        </map:transform>
+        <map:serialize/>
+      </map:match>
+      <map:match pattern="sax-pipeline/simple-xhtml">
+        <map:generate src="sax-pipeline/simple.xml"/>
+        <map:transform src="sax-pipeline/simple.xslt">
+          <map:parameter name="myParam" value="2"/>
+        </map:transform>
         <map:serialize type="xhtml"/>
       </map:match>
+      <map:match pattern="sax-pipeline/simple-xml">
+        <map:generate src="sax-pipeline/simple.xml"/>
+        <map:transform src="sax-pipeline/simple.xslt">
+          <map:parameter name="myParam" value="3"/>
+        </map:transform>
+        <map:serialize type="xml"/>
+      </map:match>
+      <map:match pattern="sax-pipeline/unauthorized">
+        <map:generate src="sax-pipeline/unauthorized.xml"/>
+        <map:serialize type="xhtml" status-code="401"/>
+      </map:match>
     </map:pipeline>
+
+    <!-- ~~~~~~~~~~~~~~~~ error handling ~~~~~~~~~~~~~~~ -->
+    <map:handle-errors>
+      <map:generate src="404.xml"/>
+      <map:serialize type="xhtml" status-code="404"/>
+    </map:handle-errors>
+
   </map:pipelines>
 
 </map:sitemap>



Mime
View raw message