Re: [SOAP] XML Schmema parser / validator
| From: | Shane Caraveo | Date: | Mon, 27 May 2002 17:52:17 +0000 |
| Subject: | Re: [SOAP] XML Schmema parser / validator | ||
| References: | 1 | Groups: | php.soap |
| Request: | Send a blank email to php-soap+get-19@lists.php.net to get a copy of this message | ||
I think NuSOAP has a seperate XMLSchema class for parsing schema, but I'm not sure if it's entirely generic or if it still depends on some stuff defined for wsdl. It's certainly not a bad idea.
Shane
Ulf Wendel wrote:
Hi, since I've written my first line of code using the PEAR SOAP Server and Client code I'm dreaming of a standalone XML Schema parser / validator. Maybe I've been told to much Java or I'm making things much more complex but required, but... However: if I had a standalone XML Schema parser it would soon play an important role within my applications. Think of a set of pages looking almost the same: fetch data (list of orders) from a data source (database), present it, allow the user to edit a record and write the changes back to the data source. When writing back to the data source two tasks have to be performed: 1) check for valid data types and 2) - if using a relational database system - check relations. I'd like to handle 1) using a XML Schmema parser. This would reduce the amount of work the editing page requires: - writing some XML describing the form - writing some XML describing the data types of the form elements - writing a template to dump the form and finally: $login_bean = new login_bean(); $form = new template_form( new xml_form('form.xml'),new schmema_validator('datatypes.xml') );$form->setValues($login_bean->getRecord(13)); if ($form->isValid()) { $err = $login_bean->checkRelations($form->getValues()); if (!is_empty($err)) $form->setErrors($err); else$login_bean->save($form->getValues());} $form->show('form_template.html'); ... just some JAPHA dreams. Maybe someone reminds this when working on the SOAP stuff. ;-) Ulf