You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Derek Hohls <DH...@csir.co.za> on 2004/05/11 13:10:49 UTC

Forms Validation [Was Re: is it a cform field widget bug?]

Um, I think you're mixing up different kinds
of validation here - the schema part is simply
to check that you have a well constructed XML file
that adheres to a given grammar (in terms of what
is or is not allowed, and what must be there or 
what is optional).  Typically you would do this 
type of validation *before* releasing an application,
although you could be doing it at run-time as well, 
see:
http://www.xml.com/lpt/a/2003/11/12/cocoon-eai.html 

The other types of validation refer more to data that
is created by users during the running of the application
(and yes, sometimes the validation on the form is
"duplicating" the validation that might otherwise be
done by the database - simply to make things easier
and less frustrating for the end user).

I am not sure what a "central validation management"
might cover?

Derek

>>> johnson@soho.club.tw 2004/05/11 12:52:33 PM >>>
A schema just can do basic validation only!
In form defination , we set validate once,
custom validation the second,DBMS the third.
why we need so many and duplicated validation?
Is there and centra validation management skill?

Best Regards

johnson

----- Original Message ----- 
From: "Derek Hohls" <DH...@csir.co.za>
To: <us...@cocoon.apache.org>
Sent: Tuesday, May 11, 2004 6:21 PM
Subject: Re: is it a cform field widget bug?


> Well, maybe its just me, but I think *any* public XML
> document - particularly one thats going to be widely used
> (as we hope CForms is!) needs a Schema so it can
> be validated. 
> 
> >>> johnson@soho.club.tw 2004/05/11 11:44:29 AM >>>
> no schema in it,does cform need schema?
> 
> best regards
> 
> johnson
> 
> 
> ----- Original Message ----- 
> From: "Derek Hohls" <DH...@csir.co.za>
> To: <us...@cocoon.apache.org>
> Sent: Tuesday, May 11, 2004 4:04 PM
> Subject: Re: is it a cform field widget bug?
> 
> 
> > Hmm - a check with a schema would pick this up quickly -
> > does one exist?
> > 
> > >>> mpo@outerthought.org 2004/05/11 10:01:23 AM >>>
> > 
> > 
> > Johnson wrote:
> > > Hi!
> > > 
> > > I use field widget to represent a boolean field , like below
> > > 
> > >  <fd:field id="dc">
> > >       <fd:label><i18n:text key="dc">dc:</i18n:text></fd:label>
> > >       <fd:datatype base="boolean">
> > >       </fd:datatype>
> > >  <fd:selection-list>
> > >    <fd:item value="false">
> > >       <fd:label><i18n:text
> > key="single">single</i18n:text></fd:label>
> > >    </fd:item>
> > >    <fd:item value="ture">
> >                      ^^^^
> > 
> > you might want to try with 'true' in stead
> > 
> > -marc=
> > 
> > >       <fd:label><i18n:text
> > key="double">double</i18n:text></fd:label>
> > >    </fd:item>
> > >  </fd:selection-list>
> > >     </fd:field>
> > > 
> > > when I run the form,the source is below.
> > > 
> > > <select name="" id="dc" title=""><option
> > > value="false">single</option><option
> > value="false">double</option></select>
> > > 
> > > both the value is false!
> > > 
> > > is it a bug?
> > > 
> > > Best Regards
> > > 
> > > Johnson Hsu
> > > 
> > > 
> > > 
> > >
> >
>
---------------------------------------------------------------------
> > > To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org 
> > > For additional commands, e-mail: users-help@cocoon.apache.org 
> > > 
> > 
> > -- 
> > Marc Portier                            http://outerthought.org/ 
> > Outerthought - Open Source, Java & XML Competence Support Center
> > Read my weblog at                http://blogs.cocoondev.org/mpo/ 
> > mpo@outerthought.org                              mpo@apache.org 
> > 
> >
>
---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org 
> > For additional commands, e-mail: users-help@cocoon.apache.org 
> > 
> > 
> > -- 
> > This message has been scanned for viruses and
> > dangerous content by MailScanner, and is
> > believed to be clean.
> > MailScanner thanks transtec Computers for their support.
> > 
> > 
> >
>
---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org 
> > For additional commands, e-mail: users-help@cocoon.apache.org 
> 
> 
>
---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org 
> For additional commands, e-mail: users-help@cocoon.apache.org 
> 
> 
> -- 
> This message has been scanned for viruses and
> dangerous content by MailScanner, and is
> believed to be clean.
> MailScanner thanks transtec Computers for their support.
> 
> 
>
---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> For additional commands, e-mail: users-help@cocoon.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org 
For additional commands, e-mail: users-help@cocoon.apache.org 


-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
MailScanner thanks transtec Computers for their support.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Re: Forms Validation [Was Re: is it a cform field widget bug?

Posted by Johnson <jo...@soho.club.tw>.
Tks,my opinion is if there is a centra validation management,
Which can handle all kind of validation,both form and database,
Then we will benifit from it!
1.coding once.
2.easy maintain.
3.more structural view to the whole system.

 may be I'm dreaming.

Johnson

----- Original Message ----- 
From: "Derek Hohls" <DH...@csir.co.za>
To: <us...@cocoon.apache.org>
Sent: Tuesday, May 11, 2004 7:10 PM
Subject: Forms Validation [Was Re: is it a cform field widget bug?]


> Um, I think you're mixing up different kinds
> of validation here - the schema part is simply
> to check that you have a well constructed XML file
> that adheres to a given grammar (in terms of what
> is or is not allowed, and what must be there or 
> what is optional).  Typically you would do this 
> type of validation *before* releasing an application,
> although you could be doing it at run-time as well, 
> see:
> http://www.xml.com/lpt/a/2003/11/12/cocoon-eai.html 
> 
> The other types of validation refer more to data that
> is created by users during the running of the application
> (and yes, sometimes the validation on the form is
> "duplicating" the validation that might otherwise be
> done by the database - simply to make things easier
> and less frustrating for the end user).
> 
> I am not sure what a "central validation management"
> might cover?
> 
> Derek
> 
> >>> johnson@soho.club.tw 2004/05/11 12:52:33 PM >>>
> A schema just can do basic validation only!
> In form defination , we set validate once,
> custom validation the second,DBMS the third.
> why we need so many and duplicated validation?
> Is there and centra validation management skill?
> 
> Best Regards
> 
> johnson
> 
> ----- Original Message ----- 
> From: "Derek Hohls" <DH...@csir.co.za>
> To: <us...@cocoon.apache.org>
> Sent: Tuesday, May 11, 2004 6:21 PM
> Subject: Re: is it a cform field widget bug?
> 
> 
> > Well, maybe its just me, but I think *any* public XML
> > document - particularly one thats going to be widely used
> > (as we hope CForms is!) needs a Schema so it can
> > be validated. 
> > 
> > >>> johnson@soho.club.tw 2004/05/11 11:44:29 AM >>>
> > no schema in it,does cform need schema?
> > 
> > best regards
> > 
> > johnson
> > 
> > 
> > ----- Original Message ----- 
> > From: "Derek Hohls" <DH...@csir.co.za>
> > To: <us...@cocoon.apache.org>
> > Sent: Tuesday, May 11, 2004 4:04 PM
> > Subject: Re: is it a cform field widget bug?
> > 
> > 
> > > Hmm - a check with a schema would pick this up quickly -
> > > does one exist?
> > > 
> > > >>> mpo@outerthought.org 2004/05/11 10:01:23 AM >>>
> > > 
> > > 
> > > Johnson wrote:
> > > > Hi!
> > > > 
> > > > I use field widget to represent a boolean field , like below
> > > > 
> > > >  <fd:field id="dc">
> > > >       <fd:label><i18n:text key="dc">dc:</i18n:text></fd:label>
> > > >       <fd:datatype base="boolean">
> > > >       </fd:datatype>
> > > >  <fd:selection-list>
> > > >    <fd:item value="false">
> > > >       <fd:label><i18n:text
> > > key="single">single</i18n:text></fd:label>
> > > >    </fd:item>
> > > >    <fd:item value="ture">
> > >                      ^^^^
> > > 
> > > you might want to try with 'true' in stead
> > > 
> > > -marc=
> > > 
> > > >       <fd:label><i18n:text
> > > key="double">double</i18n:text></fd:label>
> > > >    </fd:item>
> > > >  </fd:selection-list>
> > > >     </fd:field>
> > > > 
> > > > when I run the form,the source is below.
> > > > 
> > > > <select name="" id="dc" title=""><option
> > > > value="false">single</option><option
> > > value="false">double</option></select>
> > > > 
> > > > both the value is false!
> > > > 
> > > > is it a bug?
> > > > 
> > > > Best Regards
> > > > 
> > > > Johnson Hsu
> > > > 
> > > > 
> > > > 
> > > >
> > >
> >
> ---------------------------------------------------------------------
> > > > To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org 
> > > > For additional commands, e-mail: users-help@cocoon.apache.org 
> > > > 
> > > 
> > > -- 
> > > Marc Portier                            http://outerthought.org/ 
> > > Outerthought - Open Source, Java & XML Competence Support Center
> > > Read my weblog at                http://blogs.cocoondev.org/mpo/ 
> > > mpo@outerthought.org                              mpo@apache.org 
> > > 
> > >
> >
> ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org 
> > > For additional commands, e-mail: users-help@cocoon.apache.org 
> > > 
> > > 
> > > -- 
> > > This message has been scanned for viruses and
> > > dangerous content by MailScanner, and is
> > > believed to be clean.
> > > MailScanner thanks transtec Computers for their support.
> > > 
> > > 
> > >
> >
> ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org 
> > > For additional commands, e-mail: users-help@cocoon.apache.org 
> > 
> > 
> >
> ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org 
> > For additional commands, e-mail: users-help@cocoon.apache.org 
> > 
> > 
> > -- 
> > This message has been scanned for viruses and
> > dangerous content by MailScanner, and is
> > believed to be clean.
> > MailScanner thanks transtec Computers for their support.
> > 
> > 
> >
> ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> > For additional commands, e-mail: users-help@cocoon.apache.org
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org 
> For additional commands, e-mail: users-help@cocoon.apache.org 
> 
> 
> -- 
> This message has been scanned for viruses and
> dangerous content by MailScanner, and is
> believed to be clean.
> MailScanner thanks transtec Computers for their support.
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> For additional commands, e-mail: users-help@cocoon.apache.org
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org