On Nov 18, 4:17 pm, Jan Schoonderbeek <[email protected]> wrote: > On Wed, Nov 18, 2009 at 6:43 PM, Jeremy <[email protected]> wrote: > > > On Nov 18, 11:07 am, Ralf Schmitt <[email protected]> wrote: > > > Heiko Hees <[email protected]> writes: > > > > IMHO the only solution to implement this feature with the current > > > > system would be to extend the API with an option that would return the > > > > wikitext of a page with the DPL-tag already expanded to markup. > > > > This won't work (as I have already written). One would have to do > > > template expansion in order to expand the dpl parser function. There is > > > no obvious representation for the result of such an expansion. mediawiki > > > markup may look like it is such a representation, but it is *not*. > > > I myself would like to see some resolution to this as my > > implementation is heavily dependent upon dpl. I would really have no > > need for mwlib if management wasnt so intent on having some way to > > export the documents. I hope sometime in the future when this > > implementation becomes widely adopted that needed will dissipate. > > Ralf, if you've already declared the following not possible, then my > apologies for not understanding this stuff properly. > > It looks to me like a possible solution to the problem of mwlib not > interpreting things like DPL and SMW might be the upcoming MW function > "expand templates", found e.g. > athttp://www.mediawiki.org/wiki/Special:ExpandTemplates > I could imagine the following construction (while knowing zilch about how > mwlib/Collection actually operate): > * I tell Collection that I want to render page Somepage > * Collection fetches the wikitext at Somepage > * Collection visits Special:ExpandTemplates on the originating wiki, feeds > the location Somepage and the fetched page content, and virtually presses OK > * Collection harvests the resulting expanded text, which now contains the > answers to all queries, expanded templates etc., and feeds ''that'' into > mwlib > * mwlib does not find any awkward {{#ask: or {{#dpl: code, but clean > freshly-generated wikitext where the queries originally were. Rendering goes > like usual. > Of course this also depends on people using MW1.16, as 1.15.x do not have > Expand Templates... > > -- > Jan S. > "I'm a stream of noughts and crosses in your R.A.M."- Hide quoted text - > > - Show quoted text -
actually expand templates is an extension available to versions prior to 1.16, i currently have it installed. how will mwlib access it, through the mw api? -- You received this message because you are subscribed to the Google Groups "mwlib" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/mwlib?hl=.
