cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From reinh...@apache.org
Subject svn commit: r673203 - in /cocoon/whiteboard/corona/trunk: corona-sample-webapp/src/test/java/org/apache/cocoon/corona/it/ParameterPassing.java corona-sample/src/main/resources/COB-INF/sitemap.xmap corona-sitemap/src/main/resources/corona-sitemap-1.0.xsd
Date Tue, 01 Jul 2008 20:50:58 GMT
Author: reinhard
Date: Tue Jul  1 13:50:57 2008
New Revision: 673203

URL: http://svn.apache.org/viewvc?rev=673203&view=rev
Log:
. improve schema by using an attribute group for test values
. comment unsupported test

Modified:
    cocoon/whiteboard/corona/trunk/corona-sample-webapp/src/test/java/org/apache/cocoon/corona/it/ParameterPassing.java
    cocoon/whiteboard/corona/trunk/corona-sample/src/main/resources/COB-INF/sitemap.xmap
    cocoon/whiteboard/corona/trunk/corona-sitemap/src/main/resources/corona-sitemap-1.0.xsd

Modified: cocoon/whiteboard/corona/trunk/corona-sample-webapp/src/test/java/org/apache/cocoon/corona/it/ParameterPassing.java
URL: http://svn.apache.org/viewvc/cocoon/whiteboard/corona/trunk/corona-sample-webapp/src/test/java/org/apache/cocoon/corona/it/ParameterPassing.java?rev=673203&r1=673202&r2=673203&view=diff
==============================================================================
--- cocoon/whiteboard/corona/trunk/corona-sample-webapp/src/test/java/org/apache/cocoon/corona/it/ParameterPassing.java
(original)
+++ cocoon/whiteboard/corona/trunk/corona-sample-webapp/src/test/java/org/apache/cocoon/corona/it/ParameterPassing.java
Tue Jul  1 13:50:57 2008
@@ -19,18 +19,17 @@
 /**
  * Test passing parameters.
  */
-public class ParameterPassing extends CoronaHtmlUnitTestCase {
+public class ParameterPassing { // extends CoronaHtmlUnitTestCase {
 
     /**
      * Passing parameters from a matcher to the sitemap.
      */
-    public void testPassingParamatersFromMatcherToSitemap() throws Exception {
-        this.loadXmlPage("parameter-passing/working");
-        assertTrue(this.response.getStatusCode() == 200);
-        assertEquals("text/xml", this.response.getContentType());
-        this.assertXPath("/simple", "simple-text");
-    }
-
+    // public void testPassingParamatersFromMatcherToSitemap() throws Exception {
+    // this.loadXmlPage("parameter-passing/working");
+    // assertTrue(this.response.getStatusCode() == 200);
+    // assertEquals("text/xml", this.response.getContentType());
+    // this.assertXPath("/simple", "simple-text");
+    // }
     // /**
     // * Passing null from a matcher to the sitemap (-> doesn't match)
     // */
@@ -39,5 +38,4 @@
     // this.loadResponse("parameter-passing/failing");
     // assertTrue(this.response.getStatusCode() == 404);
     // }
-
 }

Modified: cocoon/whiteboard/corona/trunk/corona-sample/src/main/resources/COB-INF/sitemap.xmap
URL: http://svn.apache.org/viewvc/cocoon/whiteboard/corona/trunk/corona-sample/src/main/resources/COB-INF/sitemap.xmap?rev=673203&r1=673202&r2=673203&view=diff
==============================================================================
--- cocoon/whiteboard/corona/trunk/corona-sample/src/main/resources/COB-INF/sitemap.xmap (original)
+++ cocoon/whiteboard/corona/trunk/corona-sample/src/main/resources/COB-INF/sitemap.xmap Tue
Jul  1 13:50:57 2008
@@ -238,6 +238,7 @@
     </map:pipeline>
 
     <!-- ~~~~~~~~~~~~~~~~ matcher: parameter passing ~~~~~~~~~~~~~~~ -->
+    <!--  
     <map:pipeline>
       <map:match pattern="parameter-passing/failing">
         <map:match type="parameter-passing">
@@ -252,6 +253,7 @@
         </map:match>
       </map:match>
     </map:pipeline>
+    -->
 
     <!-- ~~~~~~~~~~~~~~~~ object model ~~~~~~~~~~~~~~~ -->
     <map:pipeline>

Modified: cocoon/whiteboard/corona/trunk/corona-sitemap/src/main/resources/corona-sitemap-1.0.xsd
URL: http://svn.apache.org/viewvc/cocoon/whiteboard/corona/trunk/corona-sitemap/src/main/resources/corona-sitemap-1.0.xsd?rev=673203&r1=673202&r2=673203&view=diff
==============================================================================
--- cocoon/whiteboard/corona/trunk/corona-sitemap/src/main/resources/corona-sitemap-1.0.xsd
(original)
+++ cocoon/whiteboard/corona/trunk/corona-sitemap/src/main/resources/corona-sitemap-1.0.xsd
Tue Jul  1 13:50:57 2008
@@ -6,9 +6,9 @@
   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
-
+  
+  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.
@@ -17,7 +17,8 @@
 -->
 <!-- $Id$ -->
 <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" targetNamespace="http://apache.org/cocoon/corona/sitemap"
-  xmlns:tns="http://apache.org/cocoon/corona/sitemap" xmlns="http://apache.org/cocoon/corona/sitemap"
elementFormDefault="qualified">
+  xmlns:tns="http://apache.org/cocoon/corona/sitemap" xmlns="http://apache.org/cocoon/corona/sitemap"
+  elementFormDefault="qualified">
 
   <xsd:element name="sitemap">
     <xsd:annotation>
@@ -81,17 +82,21 @@
         <xsd:group ref="pipeline-content" />
       </xsd:sequence>
       <xsd:attribute name="value" type="xsd:string" use="optional" />      
-      <xsd:attribute name="type" type="xsd:string" use="optional" />
-      <xsd:attribute name="pattern" type="xsd:string" use="optional" />
-      <xsd:attribute name="regexp" type="xsd:string" use="optional" />
-      <xsd:attribute name="wildcard" type="xsd:string" use="optional" />
-      <xsd:attribute name="equals" type="xsd:string" use="optional" />
-      <xsd:attribute name="contains" type="xsd:string" use="optional" />
-      <xsd:attribute name="starts-with" type="xsd:string" use="optional" />
-      <xsd:attribute name="ends-with" type="xsd:string" use="optional" />
+      <xsd:attributeGroup ref="test-attrs" />
     </xsd:complexType>
   </xsd:element>
 
+  <xsd:attributeGroup name="test-attrs">
+    <xsd:attribute name="pattern" type="xsd:string" use="optional" />
+    <xsd:attribute name="regexp" type="xsd:string" use="optional" />
+    <xsd:attribute name="wildcard" type="xsd:string" use="optional" />
+    <xsd:attribute name="equals" type="xsd:string" use="optional" />
+    <xsd:attribute name="contains" type="xsd:string" use="optional" />
+    <xsd:attribute name="starts-with" type="xsd:string" use="optional" />
+    <xsd:attribute name="ends-with" type="xsd:string" use="optional" />
+
+  </xsd:attributeGroup>
+
   <xsd:element name="generate">
     <xsd:complexType>
       <xsd:sequence>
@@ -150,14 +155,7 @@
       <xsd:sequence>
         <xsd:group ref="pipeline-content" />
       </xsd:sequence>
-      <xsd:attribute name="value" type="xsd:string" use="optional" />
-      <xsd:attribute name="pattern" type="xsd:string" use="optional" />
-      <xsd:attribute name="regexp" type="xsd:string" use="optional" />
-      <xsd:attribute name="wildcard" type="xsd:string" use="optional" />
-      <xsd:attribute name="equals" type="xsd:string" use="optional" />
-      <xsd:attribute name="contains" type="xsd:string" use="optional" />
-      <xsd:attribute name="starts-with" type="xsd:string" use="optional" />
-      <xsd:attribute name="ends-with" type="xsd:string" use="optional" />
+      <xsd:attributeGroup ref="test-attrs" />
     </xsd:complexType>
   </xsd:element>
 



Mime
View raw message