List Info

Thread: re: midgard replicator class




re: midgard replicator class
user name
2006-09-15 12:34:13
Hi!

>The XML format used for replication must be documented,
and must have a validateable DTD or Schema

I think I got good idea about xml validation.
What about implementing get_schema method for replicator
class?

_string_ __get_schema(_string_ classname);__

Returned string is a valid XSD file.

Advantages:

 * core parses xml file while unserializing object in
MgdSchema type content
 * external aplication's developer get flexible way to
define MgdSchema object without need to learn about
MgdSchema internals and use standardized schema format.
 * Midgard applications devlopers doesn't have to take care
about writing valid xsd schema files.

So , in practice , one should be able to send xsd file to
subscriber if data should be exchanged. Subscriber can be
even another pure PHP application running on the same host.

For those who want to ask about difference between MgdSchema
xml file and XSD one:

If application developer creates new type , core's
MgdSchema parser can not complain about "foo"
property, because it developer's need. But created XSD
schema file describes already defined type and
"materialize" MgdSchema type definition for the
rest of the world.

Piotras

-----------
This message has been sent to the Midgard Forums on http://www
.midgard-project.org/discussion/

DO NOT reply to this message by email. If you want to reply
to it, go to https://ww
w.midgard-project.org/discussion/developer-forum/reply/74b2a
54b80aafa39552a31b8632f74dd.html

Go to h
ttps://www.midgard-project.org/discussion/account/ to
update your contact details or click https://www.midgard-project.org/discussion/subscriptions/
campaign/unsubscribe/25eded291764e251a0b57d1cb42d6c4d.html to unsubscribe.
[1]

about | contact  Other archives ( Real Estate discussion Medical topics )