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: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]

Reply via email to