You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cocoon.apache.org by Jeroen Cranendonk <j....@emaxx.nl> on 2003/03/13 16:50:22 UTC
more xmlforms + schematron, why ?
Looking at xmlforms and schematron more closely, I'm starting to
wonder why this combination was chosen anyways? from the examples
it seems the purpose of schematrons is to validate input fields, but checking
something simple as if a field is only alpha characters seems to be near
impossible or atleast really hard with schematron (or am I missing something
here ? )
Isn't schematron intended for checking document structure, not validity of
single fields/elements ?
Could someone eleborate on this ? please ? :)
and if anyone does have a simple idea of how to do a simple check with
schematron for alpha or non alpha strings ( 'test' is good, 'test1' or
'test#' is bad ) I'd be very gratefull for that too :)
Many thanks in advance,
Jeroen Cranendonk
Re: more xmlforms + schematron, why ?
Posted by ivelin <iv...@apache.org>.
Schematron is just one of the implementations of the Validator interface.
You can choose to not use any external Validator in which case the Action
might do the validation and use Form.addViolation().
-=Ivelin=-
----- Original Message -----
From: "Jeremy Quinn" <je...@media.demon.co.uk>
To: <co...@xml.apache.org>
Sent: Thursday, March 13, 2003 11:34 AM
Subject: Re: more xmlforms + schematron, why ?
>
> On Thursday, March 13, 2003, at 04:50 PM, Torsten Curdt wrote:
>
> >
> >> and if anyone does have a simple idea of how to do a simple check
> >> with schematron for alpha or non alpha strings ( 'test' is good,
> >> 'test1' or 'test#' is bad ) I'd be very gratefull for that too :)
> >
> > Sorry, I personally dislike schematron and don't use it - so I don't
> > have anything at hand :) But you might wanna have a look into the
> > "translate" function
> >
>
> Is Schematron the only Schema language you can use with XMLForms?
>
> regards Jeremy
Re: more xmlforms + schematron, why ?
Posted by Jeremy Quinn <je...@media.demon.co.uk>.
On Thursday, March 13, 2003, at 04:50 PM, Torsten Curdt wrote:
>
>> and if anyone does have a simple idea of how to do a simple check
>> with schematron for alpha or non alpha strings ( 'test' is good,
>> 'test1' or 'test#' is bad ) I'd be very gratefull for that too :)
>
> Sorry, I personally dislike schematron and don't use it - so I don't
> have anything at hand :) But you might wanna have a look into the
> "translate" function
>
Is Schematron the only Schema language you can use with XMLForms?
regards Jeremy
Re: more xmlforms + schematron, why ?
Posted by Jeremy Quinn <je...@media.demon.co.uk>.
On Thursday, March 13, 2003, at 04:50 PM, Torsten Curdt wrote:
>
>> and if anyone does have a simple idea of how to do a simple check
>> with schematron for alpha or non alpha strings ( 'test' is good,
>> 'test1' or 'test#' is bad ) I'd be very gratefull for that too :)
>
> Sorry, I personally dislike schematron and don't use it - so I don't
> have anything at hand :) But you might wanna have a look into the
> "translate" function
>
Is Schematron the only Schema language you can use with XMLForms?
regards Jeremy
Re: more xmlforms + schematron, why ?
Posted by Torsten Curdt <tc...@dff.st>.
> Looking at xmlforms and schematron more closely, I'm starting to
> wonder why this combination was chosen anyways? from the examples
> it seems the purpose of schematrons is to validate input fields, but checking
> something simple as if a field is only alpha characters seems to be near
> impossible or atleast really hard with schematron (or am I missing something
> here ? )
There have been heavy discussions. You might find some in the archives.
> Isn't schematron intended for checking document structure, not validity of
> single fields/elements ?
Well, you can use it for both. But you have to use XSLT functions for
content validity. See the XSLT pages/mailing list for help on the
functions.
> and if anyone does have a simple idea of how to do a simple check with
> schematron for alpha or non alpha strings ( 'test' is good, 'test1' or
> 'test#' is bad ) I'd be very gratefull for that too :)
Sorry, I personally dislike schematron and don't use it - so I don't
have anything at hand :) But you might wanna have a look into the
"translate" function
--
Torsten
Re: more xmlforms + schematron, why ?
Posted by Christopher Oliver <re...@verizon.net>.
It may not help you at the moment because its still under development,
but with the current XMLForm integration with the Cocoon flow layer, you
can also do validation in JavaScript, meaning you have regular
expressions, String operations, etc, the full power of JavaScript and
Java, if you need it.
Thanks to somebody (not sure who), the XMLForm samples now seem to be
working, so you can now play with the XMLForm FeedBack Wizard driven by
the flow layer:
http://localhost:8888/samples/xmlform/overview.html
Regards,
Chris
Guido Casper wrote:
> I agree, that the lack of support for regular expressions is the biggest
> obstacle to schematron use.
>
> I wonder if anybody is already working on a second validator for XMLForm
> with support for regular expressions.
>
> Guido
>
> ----- Original Message -----
> From: "Jeroen Cranendonk" <j....@emaxx.nl>
> To: <co...@xml.apache.org>
> Sent: Thursday, March 13, 2003 4:50 PM
> Subject: more xmlforms + schematron, why ?
>
>
>
>>Looking at xmlforms and schematron more closely, I'm starting to
>>wonder why this combination was chosen anyways? from the examples
>>it seems the purpose of schematrons is to validate input fields, but
>
> checking
>
>>something simple as if a field is only alpha characters seems to be near
>>impossible or atleast really hard with schematron (or am I missing
>
> something
>
>>here ? )
>>Isn't schematron intended for checking document structure, not validity of
>>single fields/elements ?
>>
>>Could someone eleborate on this ? please ? :)
>>and if anyone does have a simple idea of how to do a simple check with
>>schematron for alpha or non alpha strings ( 'test' is good, 'test1' or
>>'test#' is bad ) I'd be very gratefull for that too :)
>>
>>Many thanks in advance,
>>Jeroen Cranendonk
>
>
>
Re: more xmlforms + schematron, why ?
Posted by Guido Casper <gc...@s-und-n.de>.
I agree, that the lack of support for regular expressions is the biggest
obstacle to schematron use.
I wonder if anybody is already working on a second validator for XMLForm
with support for regular expressions.
Guido
----- Original Message -----
From: "Jeroen Cranendonk" <j....@emaxx.nl>
To: <co...@xml.apache.org>
Sent: Thursday, March 13, 2003 4:50 PM
Subject: more xmlforms + schematron, why ?
> Looking at xmlforms and schematron more closely, I'm starting to
> wonder why this combination was chosen anyways? from the examples
> it seems the purpose of schematrons is to validate input fields, but
checking
> something simple as if a field is only alpha characters seems to be near
> impossible or atleast really hard with schematron (or am I missing
something
> here ? )
> Isn't schematron intended for checking document structure, not validity of
> single fields/elements ?
>
> Could someone eleborate on this ? please ? :)
> and if anyone does have a simple idea of how to do a simple check with
> schematron for alpha or non alpha strings ( 'test' is good, 'test1' or
> 'test#' is bad ) I'd be very gratefull for that too :)
>
> Many thanks in advance,
> Jeroen Cranendonk