Re: [Zope-xml] Is there an easy way of using DocBook documents in Zope yet?
Craeg K Strong <[email protected]> Thu, 29 Aug 2002 15:17:36 -0400
| Newsgroups | gmane.comp.web.zope.parsed-xml |
|---|---|
| Organization | Ariel Partners LLC |
| Message-ID | <[email protected]> |
Christopher N. Deckard wrote: > On Thu, 29 Aug 2002 13:03:50 -0400, Craeg K Strong spoke forth: > > >>I don't yet know how to grab an entire well-formed XML document as >>a string from a ParsedXML object, but maybe others can enlighten >>me... > > > The 'index_html' method of ParsedXML returns the XML as a string. > Have you tried that? > > -Chris > I just did, and you are quite right! 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. I will update the README file accordingly. Thanks, --Craeg