[Zope-xml] XML Transform without predefined XML source (Re: XMLTransform interface alternatives)
Brad Clements
bkc at murkworks.com
Thu Sep 5 13:05:59 EDT 2002
On 4 Sep 2002 at 15:00, Igor Elbert wrote:
> I think it would be useful if XMLTransform allowed me to leave the Source
> ID field empty and assumed it's applied to an XML. For example I would like
> to be able to write: http://MyFolder/myZSQLmethod/asXML/transform and get a
> rendered page.
>
I made the following modification to XMLTransform.py
def transform(self, REQUEST,xmlContents=None):
"""
Generate result using transformer and return it as a string
"""
registry = self.findRegistry()
xslObject = registry.transformerObject(self.transformerName)
xslContents = xslObject(xslObject, REQUEST)
systemID = xslObject.absolute_url()
if xmlContents is None:
xmlContents = self.getContents(REQUEST)
So I can call it from a PythonScript. Not exactly what you want, but getting there.
I'd like to see caching of the prepared Stylesheet. I don't need the output cached since
it's all dynamic.
Brad Clements, bkc at murkworks.com (315)268-1000
http://www.murkworks.com (315)268-9812 Fax
AOL-IM: BKClements
More information about the Zope-xml
mailing list