Re: Re: [Zope-xml] Is there an easy way of using DocBook documents in Zope yet?
Karl Anderson <[email protected]> 29 Aug 2002 14:51:24 -0700
| Newsgroups | gmane.comp.web.zope.parsed-xml |
|---|---|
| Organization | Ape Mgt. |
| Message-ID | <[email protected]> |
Craeg K Strong <[email protected]> writes: > So if your docbook format XML document was contained in > a ParsedXML object called foo, you would create a DTMLDocument > called, for example, bar with the contents: > > <dtml-var expr="foo.index_html()"> > > And then list "bar" as the sourceID of the XMLTransform. > > A bit clunky, but it works! I am hoping the authors of > ParsedXML add a __call__() method in their next release > that does the same thing as index_html() > which would obviate the extra DTMLDocument step. Well, to be Zopish, XSLTransform should try index_html if __call__ isn't there (actually, before __call__). And to be flexible, XSLTransform should let you specify the method used to get XML from the source and sheet object(s), so you can feed it objects for which XML isn't their main reason for living (ZDOM, StructuredText, whatever). Anyway, unless you're caching, you don't want to render the top ParsedXML object if you're using it in plumbing, because that's expensive. You want to get the proxied DOM object with getDOMObj() and render that. -- Karl Anderson [email protected] http://www.monkey.org/~kra/