cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeremy Quinn <je...@media.demon.co.uk>
Subject Re: [announce] XMLForm - a new project using Xerces, Xalan, & JTidy
Date Mon, 06 Mar 2000 11:37:25 GMT
On 5/3/00 at 10:35 pm, balld@webslingerZ.com (Donald Ball) wrote:

><page>
> <xmlform:template name="news">
>  <news>
>   <title><xmlform:input type="text"/></title>
>   <datestamp><xmlform:input type="text" datatype="date"/></datestamp>
>   <body><xmlform:input type="textarea" datatype="html"/></body>
>  </news>
> </xmlform:template>
></page>
>
>I think that this approach might ease some of the suggested security flaws
>with my XMLForm - at the cost of having the form automatically generated
>rather than crafted by hand. It's a tradeoff, but it might be worthwhile.
>Whaddy'all think?

I think this is the way to go

I'd probably want to add extra info as in my message dated 28 Feb ...

Though some of this may be mixing "contracts" .... I guess default values ought
to go in the XSL that renders the form, or maybe collected from entities?

<page>
 <form:template name="news">
  
  <form:store 
        transform="optional_transform_before_store.xsl">
   <!-- either something like -->
       <file path="/blah.xml"
            xpath="news[position()=last()]"/>
   <!-- or -->
       <file method="org.jerm.cocoon.calculatePath"
            xpath="news[position()=last()]"/>
   <!-- or -->  
       <connectiondefs>
        [...]
       </connectiondefs> 
  </form:store>
  
  <form:session authorisation="blah"/>
  
  <form:chain>
        <!-- 
        How do we describe a series of chained forms
        that a user has to work their way through?
        Maybe we should have multiple <form:template/>s
         -->
  </form:chain>
  
  <form:response>
        <!-- 
        How do we describe (the optional alternative) where 
        to go to get an appropriate response?
        This should probably be encoded into "form:chain"
         -->
  </form:response>
  
  <form:content>
      <news>
       <title>
        <form:input 
            type="text" minlen="1" maxlen="64"/>
       </title>
       <datestamp>
        <form:input 
            type="text" datatype="date"  minval="19911231" maxval="20010522"/>
       </datestamp>
       <body>
        <form:input type="textarea" datatype="html"/>
       </body>
       <link>
        <form:input 
            type="text" datatype="url" minlen="7" verify="true"/>
       </link>
      </news>
  </form:content>
 </form:template>
</page>

So "news" is the name of the top element, "title", "body" etc, are the names of
the formfields and the corresponding XML elements, right?

I guess attributes like "minlen" and "maxval" would be dependant on the
"datatype" so may require a different structure ...

So apart from the fact this obviously needs needs further work :)
What else is missing?

>Oh, btw, there's a newer version of XMLForm available on my web site -
>including a working example! It adds, edits, and removes nodes. It uses
>XSP to generate the 'choose' and edit forms. A little kludgy but
>effective. Check it out at
>
>http://www.webslingerZ.com/balld/xmlform/

I'll check it out ...


regards Jeremy

      ____________________________________________________________________

      Jeremy Quinn                                             media.demon
                                                           webSpace Design
     <mailto:jeremy@media.demon.co.uk>       <http://www.media.demon.co.uk>
      <phone:+44.[0].207.737.6831>          <pager:jermq@sms.genie.co.uk>




Mime
View raw message