cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Konstantin Piroumian" <>
Subject Re: [Announcement] XMLForm 0.8.2 released
Date Thu, 16 May 2002 11:50:52 GMT

From: <>

I'd like to comment on this:

> Do you plan to support Schematron <report> element?  Would make it easier
> write rules like "/foo is invalid if it contains any of the following
> characters: #, &, *, %",  or "/foo may contain only digits 0-9 and decimal
> point".
> Is there any way to implement Schematron <name> and <value-of> elements?
> XMLForm validates against instance data rather than the entire form
> I don't see how it can retrieve this sort of context.  Still, it would be
> to be able to write rules like this:
>       <name ref="../xf:caption> cannot contain <value-of select
> ="/some/xpath/expression">
> to produce a violation like this:
>       "Street Name cannot contain a "$"

If we make ai18n-enabled form then this approach can be a problem as we
should have translations for all the possible cases and values. Haven't yet
time to investigate the possibilities better, but I think that one can use
dictionary keys instead of a real message, e.g.:

<rule context="/email">
    <assert test="contains( string(.),'@')">

and have a translation like this in dictionary:
<message key="">Wrong email format. Email should look
like {0}.</message>

then have this in the form:
    <i18n:text><xf:violation ref="/email"/></i18n:text>

The other problem here would be to know what are the needed params for a
particular case.


> Cheers,
> --Michael
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, email:

To unsubscribe, e-mail:
For additional commands, email:

View raw message