Kjetil Kjernsmo wrote:

I've done a first reading of Kip's book now, (Great work, Kip!), and I noticed get_dom method for Providers. It has been mentioned on the list before, I noticed there is code for it in AxKit 1.6.2, but it is undocumented. Also, from the book, it seems like the trick is to make a magic implementation of get_strref as well, and looks from the code that it would call get_strref in many cases.

get_dom() is intended to provide an optimization for the cases where the Provider is returning an XML::LibXML::Document instance directly to a Language that knows what to do with one (i.e. Apache::AxKit::Language::LibXSLT).


However, if the first Language expects something else (like the raw XML data in a single string-- as is the case with XPathScript, for example) get_strref() will be called instead; so your Provider should always implement both unless you know for sure that you Language modules will only ask for a DOM instance.

Also, at this point, I'm not sure that the addition of get_dom() is reflected in the style-extraction logic in the default Provider's get_styles() so, I think get_strref() may get called anyway (if this is true, then its a bug, IMO).

That help at all?

-kip

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to