OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

 


 

   Re: [xml-dev] Challenge

[ Lists Home | Date Index | Thread Index ]

On 5/11/03 16:01, "Didier PH Martin" <martind@netfolder.com> wrote:

> Hi,
> 
> 
> 
> As usual, in this list there is a lot of talk and very little walk. Here is a
> challenge I am proposing to the member of this list and particularly to the
> people who think great application can be done with a browser technology and
> W3C frameworks.
> 
> 

Well, I don't know if it is the sort of thing you had in mind, but I just
"threw together" a simple XForm which can be used to do what you ask:

I tried it out with the open-source, server-side implementation Chiba
(actually I reworked one of the demo forms that comes with Chiba). Chiba can
be set up to either do all validation server-side or to do some client-side
validation. XForms doesn't impose one or other approach.


All the best

Mark

<?xml version="1.0" encoding="ISO-8859-1"?>
<html xmlns:chiba="http://chiba.sourceforge.net/2003/08/xforms";
    xmlns:xforms="http://www.w3.org/2002/xforms";
    xmlns:xlink="http://www.w3.org/1999/xlink";
    xml:base="http://localhost:8080/chiba-0.9.2/";
    >
    <head>
    <xforms:model>
        <xforms:submission id="debug" xforms:replace="all"
xforms:action="jsp/debug-instance.jsp" xforms:method="post"/>
     <xforms:instance id="msg">
          <demo xmlns="">
             <version/>
       <author>    
        <name/>
        <email/>
       </author>
       <description/>
    </demo>
      </xforms:instance>
      <xforms:bind nodeset="/demo">
          <xforms:bind nodeset="author">
      <xforms:bind id="name" nodeset="name"/>
      <xforms:bind id="email" nodeset="email"/>
    </xforms:bind>
    <xforms:bind id="description" nodeset="description"/>
    <xforms:bind id="version" nodeset="version" constraint=". = '1.0'"/>
      </xforms:bind>
    </xforms:model>
   </head>
   <body>
    <xforms:group>
        <xforms:input bind="version">
            <xforms:label>Version</xforms:label>
        </xforms:input>
        <h2>Author</h2>
        <xforms:input bind="name">
            <xforms:label>Name:</xforms:label>
        </xforms:input>
        <xforms:input bind="email">
            <xforms:label>E-mail:</xforms:label>
        </xforms:input>
        <xforms:textarea bind="description">
            <xforms:label>Description:</xforms:label>
        </xforms:textarea>
        <xforms:group>
            <xforms:trigger id="sendit">
                <xforms:label>Debug</xforms:label>
                <xforms:action>
                    <xforms:send id="submit" submission="debug"/>
                    </xforms:action>
                </xforms:trigger>
            <xforms:trigger id="reset-btn">
                <xforms:label>Reset</xforms:label>
                <xforms:action>
                    <xforms:reset id="reset"/>
                </xforms:action>
            </xforms:trigger>
        </xforms:group>
         </xforms:group>
   </body>
</html>


  • References:
    • Challenge
      • From: "Didier PH Martin" <martind@netfolder.com>



 

News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 2001 XML.org. This site is hosted by OASIS