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 [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
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;
titleTesttitle
pattern name=GetAccountInfo
rule context=/Request/GetAccountInfo
assert test=@username and @passwordNo username and
password attributes/assert
report test=@username and @password
bean name=GetAccountInfo
attribute name=usernamevalue-of
select=@username/attribute
attribute name=passwordvalue-of
select=@password/attribute
attribute name=handleaccount_info.xspattribute
/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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
-
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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]