cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joerg Heinicke <joerg.heini...@gmx.de>
Subject Re: XMLForm Schematron question
Date Wed, 26 Mar 2003 19:50:52 GMT
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:cedelis@uillinois.edu]
>>Sent: Wednesday, March 26, 2003 11:20 AM
>>To: 'cocoon-users@xml.apache.org'
>>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: cocoon-users-unsubscribe@xml.apache.org
For additional commands, e-mail: cocoon-users-help@xml.apache.org


Mime
View raw message