ivelin      02/05/23 06:39:47

  Modified:    src/documentation/xdocs/developing book.xml
               src/java/org/apache/cocoon/components/validation/schematron
                        SchematronFactory.java
               src/webapp/WEB-INF/db cocoondb.data cocoondb.properties
                        cocoondb.script
               src/webapp/samples/xmlform sitemap.xmap
               src/webapp/samples/xmlform/schematron
                        wizard-xmlform-sch-report.xml
  Log:
  added XMLForm HOWTO from Heidi
  Applied SchematronFactory patch from Michael
  
  Revision  Changes    Path
  1.8       +2 -0      xml-cocoon2/src/documentation/xdocs/developing/book.xml
  
  Index: book.xml
  ===================================================================
  RCS file: /home/cvs/xml-cocoon2/src/documentation/xdocs/developing/book.xml,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- book.xml  23 Apr 2002 10:25:32 -0000      1.7
  +++ book.xml  23 May 2002 13:39:46 -0000      1.8
  @@ -22,6 +22,7 @@
     <menu label="Webapps">
       <menu-item label="Session Contexts" href="session.html"/>
       <menu-item label="Authentication" href="authentication.html"/>
  +     <menu-item label="Form Handling" href="../xmlform/index.html"/>
       <menu-item label="Portal" href="portal.html"/>
     </menu>
   
  @@ -30,5 +31,6 @@
     </menu>
   
   </book>
  +
   
   
  
  
  
  1.2       +8 -5      
xml-cocoon2/src/java/org/apache/cocoon/components/validation/schematron/SchematronFactory.java
  
  Index: SchematronFactory.java
  ===================================================================
  RCS file: 
/home/cvs/xml-cocoon2/src/java/org/apache/cocoon/components/validation/schematron/SchematronFactory.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- SchematronFactory.java    20 May 2002 07:19:25 -0000      1.1
  +++ SchematronFactory.java    23 May 2002 13:39:47 -0000      1.2
  @@ -1,7 +1,7 @@
   /*
  - * $Header: 
/home/cvs/xml-cocoon2/src/java/org/apache/cocoon/components/validation/schematron/SchematronFactory.java,v
 1.1 2002/05/20 07:19:25 ivelin Exp $
  - * $Revision: 1.1 $
  - * $Date: 2002/05/20 07:19:25 $
  + * $Header: 
/home/cvs/xml-cocoon2/src/java/org/apache/cocoon/components/validation/schematron/SchematronFactory.java,v
 1.2 2002/05/23 13:39:47 ivelin Exp $
  + * $Revision: 1.2 $
  + * $Date: 2002/05/23 13:39:47 $
    *
    * ====================================================================
    * The Apache Software License, Version 1.1
  @@ -257,6 +257,10 @@
         logger.debug( "Rule context :  " + rule.getContext());
   
         bindAsserts( rule, rulePrefix, jxpContext );
  +     
  +      // Patch to make reports work in schematron
  +      // Note change to name of bindRerports [sic] function
  +      bindReports( rule, rulePrefix, jxpContext );
         
         pattern.addRule( rule );
       }
  @@ -299,7 +303,7 @@
         logger.debug( "Assert diagnostics :  " + assert.getDiagnostics());
         jxpContext.setLenient(false);
   
  -      String message = (String) jxpContext.getValue ( assertPrefix, String.class ); 
  +      String message = (String) jxpContext.getValue ( assertPrefix, String.class );
         assert.setMessage( message );
         logger.debug( "Assert message :  " + assert.getMessage());
   
  @@ -309,7 +313,7 @@
     
     
     /**
  -   * populates the assert elements for a rule
  +   * populates the report elements for a rule
      * from the dom tree
      *
      * @param rule 
  @@ -317,7 +321,7 @@
      * @param jxpContext JXPathContext
      */
   
  -  protected void bindRerports( Rule rule, String pathPrefix, JXPathContext 
jxpContext)
  +  protected void bindReports( Rule rule, String pathPrefix, JXPathContext 
jxpContext)
     {
       // ensure that mandatory elements which are not found
       // will result in Exception
  @@ -343,7 +347,6 @@
         report.setDiagnostics( diagnostics );
         logger.debug( "Report diagnostics :  " + report.getDiagnostics());
         jxpContext.setLenient(false);
  -
   
         String message = (String) jxpContext.getValue ( assertPrefix, String.class ); 
         report.setMessage( message );
  
  
  
  1.4       +1 -1      xml-cocoon2/src/webapp/WEB-INF/db/cocoondb.data
  
        <<Binary file>>
  
  
  1.5       +1 -1      xml-cocoon2/src/webapp/WEB-INF/db/cocoondb.properties
  
  Index: cocoondb.properties
  ===================================================================
  RCS file: /home/cvs/xml-cocoon2/src/webapp/WEB-INF/db/cocoondb.properties,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- cocoondb.properties       20 May 2002 13:33:49 -0000      1.4
  +++ cocoondb.properties       23 May 2002 13:39:47 -0000      1.5
  @@ -1,4 +1,4 @@
   #HSQL database
  -#Mon May 20 08:21:25 CDT 2002
  +#Wed May 22 22:39:57 CDT 2002
   version=1.6
   modified=yes
  
  
  
  1.6       +7 -3      xml-cocoon2/src/webapp/WEB-INF/db/cocoondb.script
  
  Index: cocoondb.script
  ===================================================================
  RCS file: /home/cvs/xml-cocoon2/src/webapp/WEB-INF/db/cocoondb.script,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- cocoondb.script   20 May 2002 13:33:49 -0000      1.5
  +++ cocoondb.script   23 May 2002 13:39:47 -0000      1.6
  @@ -4,8 +4,8 @@
   CREATE TABLE GROUPS(GID INTEGER IDENTITY PRIMARY KEY,GNAME VARCHAR,UNIQUE(GNAME))
   CREATE TABLE USER_GROUPS(UID INTEGER,GID INTEGER,UNIQUE(UID,GID),FOREIGN 
KEY(UID)REFERENCES USER(UID),FOREIGN KEY(GID)REFERENCES GROUPS(GID))
   CREATE TABLE STATE_TAX(CATEGORY VARCHAR NOT NULL,GROSSTAX_COLLECTED DOUBLE NOT 
NULL,NETTAX_COLLECTED DOUBLE NOT NULL,YEAR INTEGER NOT NULL)
  -GRANT ALL ON CLASS "java.lang.Math" TO PUBLIC
   GRANT ALL ON CLASS "org.hsqldb.Library" TO PUBLIC
  +GRANT ALL ON CLASS "java.lang.Math" TO PUBLIC
   CREATE USER SA PASSWORD "" ADMIN
   CREATE ALIAS DAYNAME FOR "org.hsqldb.Library.dayname"
   CREATE ALIAS SPACE FOR "org.hsqldb.Library.space"
  @@ -115,5 +115,9 @@
   INSERT INTO STATE_TAX VALUES('Horse Racing',1.7921198E7,1.7321198E7,2001)
   INSERT INTO STATE_TAX VALUES('Severance',7981539.0,7967438.0,2001)
   INSERT INTO STATE_TAX VALUES('School District 
Income',1.61257059E8,1.53238001E8,2001)
  -/*C3*/CONNECT USER sa PASSWORD ""
  -/*C4*/CONNECT USER sa PASSWORD ""
  +/*C1*/CONNECT USER sa PASSWORD ""
  +/*C2*/CONNECT USER sa PASSWORD ""
  +CONNECT USER sa PASSWORD ""
  +/*C5*/CONNECT USER sa PASSWORD ""
  +/*C6*/CONNECT USER sa PASSWORD ""
  +/*C8*/CONNECT USER sa PASSWORD ""
  
  
  
  1.2       +3 -0      xml-cocoon2/src/webapp/samples/xmlform/sitemap.xmap
  
  Index: sitemap.xmap
  ===================================================================
  RCS file: /home/cvs/xml-cocoon2/src/webapp/samples/xmlform/sitemap.xmap,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- sitemap.xmap      20 May 2002 13:33:50 -0000      1.1
  +++ sitemap.xmap      23 May 2002 13:39:47 -0000      1.2
  @@ -19,6 +19,7 @@
     </map:components>
   
     <!-- =========================== Resources ================================= -->
  +
     <map:resources>
     </map:resources>
   
  @@ -53,3 +54,5 @@
     </map:pipelines> 
   </map:sitemap>
   <!-- end of file -->
  +
  +
  
  
  
  1.2       +2 -2      
xml-cocoon2/src/webapp/samples/xmlform/schematron/wizard-xmlform-sch-report.xml
  
  Index: wizard-xmlform-sch-report.xml
  ===================================================================
  RCS file: 
/home/cvs/xml-cocoon2/src/webapp/samples/xmlform/schematron/wizard-xmlform-sch-report.xml,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- wizard-xmlform-sch-report.xml     20 May 2002 13:33:50 -0000      1.1
  +++ wizard-xmlform-sch-report.xml     23 May 2002 13:39:47 -0000      1.2
  @@ -37,7 +37,7 @@
       
        <pattern name="User Info Validation Pattern" id="user">
                <rule context="/firstName">
  -                     <assert  test="string-length(.) &gt; 3" diagnostics="dname 
dcount">
  +                     <assert  test="string-length(.) &gt; 3">
           First name should be at least 4 characters.
         </assert>
                        <assert  test="string-length(.) &lt; 20">
  @@ -45,7 +45,7 @@
         </assert>
                </rule>
                <rule context="/lastName">
  -                     <assert  test="string-length(.) &gt; 3" diagnostics="dname 
dcount">
  +                     <assert  test="string-length(.) &gt; 3">
           Last name should be at least 4 characters.
         </assert>
                        <assert  test="string-length(.) &lt; 20">
  
  
  

----------------------------------------------------------------------
In case of troubles, e-mail:     [EMAIL PROTECTED]
To unsubscribe, e-mail:          [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to