[XML-SIG] XML to Object translation
Thu, 23 Nov 2000 11:50:18 -0700
> Rich Salz <email@example.com> writes:
> > > The idea is basically that when you have an XML document of a
> > > particular type (say RSS) you make a mapping file that describes
> > > how to create an object structure from the file. For RSS this
> > > might look as shown below.
> > I wonder if the syntax of that mapping file could be XSLT?
> XSLT would work very well as long as it can handle the full
> transformation. In the XSLT stylesheet, the "output schema" would
> follow a regular pattern, not unlike SOAP or WDDX, that can then
> easily be converted to objects.
> The one drawback to using XSLT is that many conversions to objects
> require a little bit more code to get things to work well, so XSLT +
> some embedded scripting would be even better.
I disagree. If we use a similar model as pickle, in most cases, all the user
needs to provide is the equivalent of __getinitargs__. I'd say the cases
where __setstate__ type function is required would be infrequent.
Given this, it could be handled by special XSLT extension arguments that use
its attributes to initialize the corresponding Python objects. I think we
still have this proposal floating somewhere on the Zope XMLObject Wiki. I'll
try to dig it up.
Uche Ogbuji Principal Consultant
firstname.lastname@example.org +1 303 583 9900 x 101
Fourthought, Inc. http://Fourthought.com
4735 East Walnut St, Ste. C, Boulder, CO 80301-2537, USA
Software-engineering, knowledge-management, XML, CORBA, Linux, Python