You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by jtbamcai <jt...@bipt106.bi.ehu.es> on 2002/12/17 19:58:35 UTC

schematron

Hi!
how can I validate a date like this "yyyy-mm-dd" with schematron? 
thanks in advance.
iker.




---------------------------------------------------------------------
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:     <co...@xml.apache.org>
For additional commands, e-mail:   <co...@xml.apache.org>


Re: schematron

Posted by Ivelin Ivanov <iv...@apache.org>.
Joerg's response is correct, although a technical detail is that Schematron
is based on XPath, not XSTL (which uses XPath itself).


----- Original Message -----
From: "Joerg Heinicke" <jo...@gmx.de>
To: <co...@xml.apache.org>
Sent: Tuesday, December 17, 2002 1:27 PM
Subject: Re: schematron


> 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:     <co...@xml.apache.org>
> For additional commands, e-mail:   <co...@xml.apache.org>
>


---------------------------------------------------------------------
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:     <co...@xml.apache.org>
For additional commands, e-mail:   <co...@xml.apache.org>


Re: schematron

Posted by Joerg Heinicke <jo...@gmx.de>.
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:     <co...@xml.apache.org>
For additional commands, e-mail:   <co...@xml.apache.org>


DataBase Action and date format

Posted by Marco Taiuti <ma...@plangroup.it>.
Hi!
how can I set a date format like this "dd/mm/yyyy" with Database Action? 
thanks in advance.
iker.



---------------------------------------------------------------------
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:     <co...@xml.apache.org>
For additional commands, e-mail:   <co...@xml.apache.org>