i jumped the gun again.  <assert test="string(.)=string(password2)"> doesn't
work either.  it is always invalid because password2 is not a child.  i'm
happy with simply validating from context="/" and be done with it! ;-)
again, thanks...

-----Original Message-----
From: Delis, Christopher E.
To: 'Joerg Heinicke '; '[EMAIL PROTECTED] '
Sent: 3/27/03 4:50 AM
Subject: RE: XMLForm Schematron question

thanks for inspiring me to continue... following-sibling and
preceding-sibling didn't work but the following did:

<assert test="string(.)=string(password2)">Passwords do not
match!</assert>

i thought they were siblings, but...

-----Original Message-----
From: Joerg Heinicke
To: [EMAIL PROTECTED]
Sent: 3/27/03 5:53 AM
Subject: Re: XMLForm Schematron question

Siblings? Try the following:

 > <rule context="/password">
 >    <assert test="string(.) = string(following-sibling::password2 | 
preceding-sibling::password2)">
 >      Passwords do not match.
 >    </assert>
 > </rule>

If you know password2 is always after password, you can remove 
preceding-sibling::password2.

It's only a further suggestion from the XML point of view ;-)

Joerg


Delis, Christopher E. wrote:
>  
> thanks, ugo.
> 
> i finally ended up doing the same exact thing as you.  i was just
hoping it
> would be possible to refer to other (sibling or ancestor) objects in
my
> validation assertion.  not a huge problem.  i simply edited my
> "xmlform-to-html.xsl" to reflect the fact that the error violation has
an
> attribute of ref='' instead of ref='/password'.
> 
> cheers,
> chris
> 
> -----Original Message-----
> From: Ugo Cei
> To: [EMAIL PROTECTED]
> Sent: 3/27/03 1:51 AM
> Subject: Re: XMLForm Schematron question
> 
> Delis, Christopher E. wrote:
> 
>>i take it back!  it still doesn't work =-(
>>
>>i keep getting "Passwords do not match!" errors...
> 
> 
> I'm currently using the following:
> 
> <rule context="/">
>    <assert test="string(password1) = string(password2)">
>      Passwords do not match.
>    </assert>
> </rule>
> 
> 

-- 

System Development
VIRBUS AG
Fon  +49(0)341-979-7419
Fax  +49(0)341-979-7409
[EMAIL PROTECTED]
www.virbus.de


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

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

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

Reply via email to