You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Sebastian Gil <se...@insert.com.pl> on 2003/05/15 13:45:47 UTC

Xforms and Schematron

Hi there!

I've succesfully installed Cocoon 2.1 and decided to use super sexy XForms 
in
my app. So I have few questions:

1. Is possible to use regular expression in schematron assert test? Or 
anywhere
else in Shematron schema?
2. How to access other axis from a rule? For example:

<rule context="/postalCode1">
 <assert test="string-length(.) = 2 and floor(.) = number(.) and 
not(contains(.,'-'))
 and string-length(//postalCode2) = 3 and floor(//postalCode2) = 
number(//postalCode2) and not(contains(//postalCode2,'-'))"/>
</rule>

doesn't work

<rule context="/postalCode1">
 <assert test="string-length(.) = 2 and floor(.) = number(.) and 
not(contains(.,'-'))
 and string-length(parent::node()/postalCode2) = 3 and floor(parent::node() 
/postalCode2) = number(parent::node()/postalCode2) and 
not(contains(parent::node()/postalCode2,'-'))"/>
</rule>

doesn't work either.
So how it's possible to make a rule based on two or more attributes, for 
example for
password and password repeat comparation?

Regards and thanks in advance for any hints on Schematron subject.

Sebastian Gil

-- 
Jedynym sposobem na pozbycie sie pokusy, to uleganie jej.

mailto: create@insert.com.pl
http://create.e-informatyka.pl

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