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: schematron
Date Tue, 17 Dec 2002 19:27:09 GMT
jtbamcai wrote:
 > Hi!
 > how can I validate a date like this "yyyy-mm-dd" with schematron?
 > thanks in advance.
 > iker.

Hello,

Schematron is XSLT, so you can use normal expressions.

Example:

<assert test="substring(date, 1, 4) > 2000 and substring(date, 1, 4) 
&lt; 2005">
</assert>

But XSLT has no date-specific functionality, it knows nothing about 
dates. So I think there is a better validator than schematron for dates.

Regards,

Joerg


---------------------------------------------------------------------
Please check that your question  has not already been answered in the
FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>

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