Hello Christopher,

I mentioned it already before: I guess the error are "/password" and "/password2" as the values of the context attributes of the rule element. I have never been using Schematron in Cocoon, but as I used it offline a stylesheet was created from this schematron XML description and the rule's contexts were used in the match attribute of <xsl:template/>. The problem is then, that you need two root elements, to get true out of your test. But that's not possible in XML. So I guessed that you must change "/password" to "password" (the same for "password2").

Regards,

Joerg


Delis, Christopher E. wrote:
i take it back! it still doesn't work =-(

i keep getting "Passwords do not match!" errors...


-----Original Message-----
From: Delis, Christopher E. [mailto:[EMAIL PROTECTED]
Sent: Wednesday, March 26, 2003 11:20 AM
To: '[EMAIL PROTECTED]'
Subject: RE: XMLForm Schematron question


sheesh! turned out to be a stupid error on my part (i should've posted the
whole xml file and you probably would've found it right away). thanks for
helping! here's what works:


<?xml version="1.0" ?>
<schema ns="http://xml.apache.cocoon/xmlform";
xmlns="http://www.ascc.net/xml/schematron";>
<title>Schema for the Password Form</title>
<phase id="passwordView">
<p>For password information.</p>
<active pattern="password"/>
</phase>
<pattern name="Password Validation Pattern" id="password">
<rule context="/password">
<assert test="string-length(.) &gt; 3">Password
should be at least 4 characters.</assert>
<assert test="string-length(.) &lt; 60">Password
should be less
than 60 characters.</assert>
<assert
test="string(.)=string(../password2)">Passwords do not match!</assert>
</rule>
<rule context="/password2">
<assert test="string-length(.) &gt; 3">Password
should be at least 4 characters.</assert>
</rule>
</pattern>
</schema>


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to