Re: Re: [Zope-xml] Is there an easy way of using DocBook documents in Zope yet?

Karl Anderson <[email protected]> 29 Aug 2002 17:28:44 -0700
Newsgroups gmane.comp.web.zope.parsed-xml
Organization Ape Mgt.
Message-ID <[email protected]>
Craeg K Strong <[email protected]> writes:

> See comments embedded below:
> 
> Karl Anderson wrote:
> > 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).
> 
> OK. Let me repeat back to you what I think I heard:
> 
> The Source ID should accept either a Zope ID
> 
> or a Python expression of the form "Zope ID".method()
> 
> So you could enter things like:
> 
> foo
> foo.index_html()
> bar.getDOMObj().serialize("ascii")

no way - you want this to be configurable TTW, and you don't want to
exec python code that can be gotten TTW, even if you think you're
secure.  Let people use a python script if they need to do that.

I recommend accepting an optional method name, having to write a
script skin to handle parameters isn't so bad for users.  It's just an
organizational issue, really.

You did crib off of XSLTemplate, right? ;)

> But I still have to put in "magic" such that if I get only a bare
> object ID ("foo" above) I have to append ".index_html()" to it.

Looking at my old cruft, what I did was str(source) if no method name
was given, which should work for ParsedXML.

-- 
Karl Anderson      [email protected]           http://www.monkey.org/~kra/