cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ivelin Ivanov" <ive...@apache.org>
Subject Re: Schematron question
Date Tue, 24 Sep 2002 05:07:43 GMT

How about:


 <rule context="/password">
             <assert test="string-length(.) &gt; 7">
                 The Password Should be @ least 8 character.
             </assert>
 </rule>
 <rule context="/passwordConfirm">
             <assert test="../password == .">
                 The Password Should be the same as before.
             </assert>
 </rule>

If this still doesn't work, try


 <rule context="/">
             <assert test="string-length(password) &gt; 7">
                 The Password Should be @ least 8 character.
             </assert>
             <assert test="password == passwordConfirm">
                 The Password Should be the same as before.
             </assert>
 </rule>



----- Original Message ----- 
From: "Mohamed El-Refaey" <m.refaey@imkenberg.de>
To: <cocoon-users@xml.apache.org>
Sent: Monday, September 23, 2002 6:42 PM
Subject: Schematron question


> Hi all
> 
> I have a question related to Schematron validation :
> How I can validate a 2 Text box in XMLForm values that they are 
> identical for example (a password should be entered twice by the user 
> and it must be identical in both field)
> 
> I tried to write the Rule in the schematron validation file as follow 
> but it didn't work well :
> 
> <rule context="/password">
>             <assert test="string-length(.) &gt; 7">
>                 The Password Should be @ least 8 character.
>             </assert>
>         </rule>
>         <rule context="/passwordConfirm">
>             <assert test="./password != .">
>                 The Password Should be the same as before.
>             </assert>
>         </rule>
> 
> also I tried :
>    
>             <rule context="/passwordConfirm">
>             <assert test="./password !=/passwordConfirm">
>                 The Password Should be the same as before.
>             </assert>
>         </rule>
> 
> but unfortunately I have no result ..
> 
> any body tried this before ?
> 
> Thanx in advance
> 
> 
> ---------------------------------------------------------------------
> Please check that your question  has not already been answered in the
> FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>
> 
> To unsubscribe, e-mail:     <cocoon-users-unsubscribe@xml.apache.org>
> For additional commands, e-mail:   <cocoon-users-help@xml.apache.org>
> 


---------------------------------------------------------------------
Please check that your question  has not already been answered in the
FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>

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


Mime
View raw message