cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ivelin Ivanov" <ive...@apache.org>
Subject Re: Using Schematron for XML request validation
Date Wed, 17 Jul 2002 11:40:16 GMT
XMLForm will populate JavaBeans, DOM nodes or mixed.

Schematron is simple to use and powerful in what it does.
I wouldn't put extra burden on it.

My suggestions is to either use plain Java code to populate your fields or
write a specialized transformer.


Ivelin



----- Original Message -----
From: "Alexander Smirnoff" <asmirnoff@vistar.ca>
To: <cocoon-users@xml.apache.org>
Sent: Tuesday, July 16, 2002 10:25 AM
Subject: Using Schematron for XML request validation


> Hi all,
>
> I'm considering to use SchematronValidator for validation of XML
> requests (embedded in the body of HTTP requests). Since XML
> Forms validation is dealing with forms and validation of JavaBeans,
> I have a different problem.
>
> The question I have is somewhat general.
>
> I would like to use schema for populating some report object in
> the case the validation succeeds. Probably it should be a different
> procedure, but does it looks more natural to have it there?
>
> <schema xmlns:sch="http://www.ascc.net/xml/schematron" >
>     <title>Test<title>
>     <pattern name="GetAccountInfo">
>         <rule context="/Request/GetAccountInfo">
>             <assert test="@username and @password">No username and
password attributes</assert>
>             <report  test="@username and @password">
>                 <bean name="GetAccountInfo">
>                     <attribute name="username"><value-of
select="@username"></attribute>
>                     <attribute name="password"><value-of
select="@password"></attribute>
>                     <attribute name="handle">account_info.xsp<attribute>
>                 </bean>
>             </report>
>         <rule>
>     <pattern>
> </schema>
>
> Then I can pass it to specific hanle or even redirect the request.
> Would it be a violation of Schematron schema and if not, how could I
implement this?
>
> Thanks,
> Alex.
>
>
>
> ---------------------------------------------------------------------
> 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>
>


---------------------------------------------------------------------
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