> From: "Mike Glover" <[EMAIL PROTECTED]>
>
> I beleive someone else asked this question a few weeks ago, but I
> never saw it answered. Why isn't OpenSRS using the WDDX DTD instead of
> rolling its own? It uses XML, it's *designed* for for moving data objects
> over the internet between possibly different languages, and there are
> parsers for it for a number of different languages already (Perl and Java
> I beleive are officially supported, PHP unofficially).
Short answer: what DTD you use shouldn't matter one whit if you're using an
XML parser. You merely supply the DTD along with the XML document and
either wait for events or walk the tree, depending on which type of parser
you use.
I realize that there are already numerous data movement protocols in
existence, such as WDDX, SOAP, etc... (BTW: for a comparative overview, go
see
http://www.w3.org/2000/03/29-XML-protocol-matrix) but it really doesn't
matter what you pick, unless your XML parser is so limited that it is
written for one DTD only.
At the moment, PHP does not have a generic XML parser (AFAIK). This limits
its use to WDDX, *for now*. In a year or so, it should have a real XML
parser that allows either events or tree-walking on arbitrary DTDs,
Namespaces, or Schemas.
WDDX has underlying data type representations for general use. OpenSRS'
application isn't "general use". Therefore by specifying a custom DTD, they
can control their own protocol much more closely and thus avoid errors.
There is presently no mechanism in WDDX for specifying, much less enforcing,
a protocol.
Now, what may be useful is for the OpenSRS DTD to encompass the WDDX
datatype specifications. (I'm shooting blind here - I still haven't gone
over the DTD.) I believe a DTD can include another DTD be reference...
any XML experts out there?
-Adam Thompson
Chief Technology Officer
Commerce Design Inc.
[EMAIL PROTECTED]