tcurdt      02/03/26 11:48:55

  Modified:    src/scratchpad/webapp/mount/precept/example2 i2html.xsl
               src/scratchpad/webapp/mount/precept/model easyrelax.xml
  Added:       src/scratchpad/webapp/mount/precept/example2 error.xml
                        thanks.xml view3.xml view4.xml
  Log:
  selectOnes are working
  
  Revision  Changes    Path
  1.3       +6 -2      
xml-cocoon2/src/scratchpad/webapp/mount/precept/example2/i2html.xsl
  
  Index: i2html.xsl
  ===================================================================
  RCS file: 
/home/cvs/xml-cocoon2/src/scratchpad/webapp/mount/precept/example2/i2html.xsl,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- i2html.xsl        25 Mar 2002 23:24:51 -0000      1.2
  +++ i2html.xsl        26 Mar 2002 19:48:55 -0000      1.3
  @@ -19,15 +19,19 @@
      </xsl:template>
   
      <xsl:template match="i:selectBoolean">
  -      [<xsl:value-of select="i:value/text()"/>]
         <input name="{@ref}" type="checkbox" value="true">
           <xsl:if test="i:value/text() = 'true'">
  -          <xsl:attribute name="selected"/>
  +          <xsl:attribute name="checked"/>
           </xsl:if>
         </input>
      </xsl:template>
   
      <xsl:template match="i:selectOne">
  +     <select name="{@ref}">
  +       <xsl:for-each select="i:contraint/*[@type = 'choice']/i:choice">
  +         <option value="{@value}"><xsl:value-of select="."/></option>
  +       </xsl:for-each>
  +     </select>
      </xsl:template>
   
      <xsl:template match="i:selectMany">
  
  
  
  1.1                  
xml-cocoon2/src/scratchpad/webapp/mount/precept/example2/error.xml
  
  Index: error.xml
  ===================================================================
  <?xml version="1.0" encoding="ISO-8859-1"?>
  <root xmlns:f="http://www.dff.st/dform";
        xmlns:r="http://www.dff.st/drender";
        xmlns:i="http://www.dff.st/ns/desire/instance/1.0";
        >
  
     Sorry, submit failed
     
  </root>
  
  
  
  1.1                  
xml-cocoon2/src/scratchpad/webapp/mount/precept/example2/thanks.xml
  
  Index: thanks.xml
  ===================================================================
  <?xml version="1.0" encoding="ISO-8859-1"?>
  <root xmlns:f="http://www.dff.st/dform";
        xmlns:r="http://www.dff.st/drender";
        xmlns:i="http://www.dff.st/ns/desire/instance/1.0";
        >
  
     Successfully submitted your data!
     
  </root>
  
  
  
  1.1                  
xml-cocoon2/src/scratchpad/webapp/mount/precept/example2/view3.xml
  
  Index: view3.xml
  ===================================================================
  <?xml version="1.0" ?>
  <root xmlns:i="http://www.dff.st/ns/desire/instance/1.0";>
    <errors>
      <i:insert-violations/>
    </errors>
  
    <i:instance id="form-feedback">
      <i:selectOne ref="cocoon-installation/system/os"/>
      <i:selectOne ref="cocoon-installation/system/processor"/>
      <i:textbox ref="cocoon-installation/system/ram"/>
      <i:selectOne ref="cocoon-installation/system/servlet-engine"/>
      <i:selectOne ref="cocoon-installation/system/java-version"/>
    </i:instance>
  
    <i:button method="prev2">
      <i:caption>Prev</i:caption>
    </i:button>
  
    <i:button method="next4">
      <i:caption>Next</i:caption>
    </i:button>
  </root>
  
  
  
  1.1                  
xml-cocoon2/src/scratchpad/webapp/mount/precept/example2/view4.xml
  
  Index: view4.xml
  ===================================================================
  <?xml version="1.0" ?>
  <root xmlns:i="http://www.dff.st/ns/desire/instance/1.0";>
    <errors>
      <i:insert-violations/>
    </errors>
  
    <i:instance id="form-feedback">
      <i:output ref="cocoon-installation/user/firstname"/>
      <i:output ref="cocoon-installation/user/lastname"/>
      <i:output ref="cocoon-installation/user/email"/>
  
      <i:output ref="cocoon-installation/number"/>
      <i:output ref="cocoon-installation/live-url"/>
      <i:output ref="cocoon-installation/publish"/>
  
      <i:output ref="cocoon-installation/system/os"/>
      <i:output ref="cocoon-installation/system/processor"/>
      <i:output ref="cocoon-installation/system/ram"/>
      <i:output ref="cocoon-installation/system/servlet-engine"/>
      <i:output ref="cocoon-installation/system/java-version"/>
    </i:instance>
  
    <i:button method="prev3">
      <i:caption>Prev</i:caption>
    </i:button>
  
    <i:button method="submit">
      <i:caption>Submit</i:caption>
    </i:button>
  </root>
  
  
  
  1.2       +10 -8     
xml-cocoon2/src/scratchpad/webapp/mount/precept/model/easyrelax.xml
  
  Index: easyrelax.xml
  ===================================================================
  RCS file: 
/home/cvs/xml-cocoon2/src/scratchpad/webapp/mount/precept/model/easyrelax.xml,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- easyrelax.xml     22 Mar 2002 17:46:41 -0000      1.1
  +++ easyrelax.xml     26 Mar 2002 19:48:55 -0000      1.2
  @@ -8,7 +8,7 @@
           <element name="firstname"/>
           <element name="lastname"/>
           <element name="email">
  -          <constraint type="regexpr">bla</constraint>
  +          <constraint type="regexpr" 
name="E_EMAIL">^[a-zA-Z0-9]+[a-zA-Z0-9-_.]*@[a-zA-Z0-9-]+(\.[a-zA-Z0-9-]+)+$</constraint>

           </element>
           <optional>
             <element name="age"/>
  @@ -34,24 +34,26 @@
             </constraint>
           </element>
           <element name="processor">
  -          <!--
  -          <constraint type="choice">
  +          <constraint type="choice" name="E_PROCESSOR">
               <choice value="intel">Intel</choice>
               <choice value="powerpc">PowerPC</choice>
             </constraint>
  -          -->
           </element>
           <element name="ram"/>
           <element name="servlet-engine">
  -          <!--
  -          <constraint type="choice">
  +          <constraint type="choice" name="E_ENGINE">
               <choice value="tc4">Tomcat 4</choice>
               <choice value="tc3">Tomcat 3</choice>
               <choice value="resin">Resin</choice>
             </constraint>
  -          -->
           </element>
  -        <element name="java-version"/>
  +        <element name="java-version">
  +          <constraint type="choice" name="E_JAVA">
  +            <choice value="1.2">JDK 1.2.x</choice>
  +            <choice value="1.3">JDK 1.3.x</choice>
  +            <choice value="1.4">JDK 1.4.x</choice>
  +          </constraint>
  +        </element>        
         </element>
       </element>
     </start>
  
  
  

----------------------------------------------------------------------
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