cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ugo Cei <u....@cbim.it>
Subject [XMLForm,Validation] Testing for equality
Date Mon, 13 Jan 2003 22:23:40 GMT
This must be something really stupid, but I tried to make it work for 
over an hour with no success.

I want to use the Schematron validator to validate a user registration 
form. Here's a snippet of the validating stylesheet:

<rule context="/password1">
   <assert test="string-length(.) &gt; 3">
     Password must be at least four characters long.
   </assert>
</rule>
<rule context="/password2">
   <assert test="string(.) = string(//password1)">
     Passwords do not match.
   </assert>
</rule>

This is just the latest in a series of permutations. The problem lies in 
the second rule. It either turns out to always validate, even if the 
passwords are different, or to never validate, even if the passwords are 
equal.

What's the correct way to write this rule?

	Thanks in Advance,

		Ugo


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


Mime
View raw message