On Nov 18, 4:25 am, Ralf Schmitt <[email protected]> wrote:
> Gero <[email protected]> writes:
> > I think that the expansion of the DPL tag (parser function and parser
> > tag, both are possible!)
> > should be handled by the php code of the DPL extension.
>
> > DPL has quite a lot of features and it would be very hard work to re-
> > implement all or even part of  its functionality
> > in another language.
>
> > Also, wIthin DPL some MW parser functions are called to process
> > transcluded content.
>
> > So I think Jeremy is absolutely right: The collection extension should
> > process a page after
> > DPL has done its job. If the mwlib can live with that sequence of
> > processing it should
> > be possible to enable DPL with reasonable effort. Otherwíse I see no
> > chance.
>
> > DPL's output is in principle standard WIKI syntax; in some cases (~
> > 10%) HTML tags will be found in the
> > output. These text portions are wrapped within HTML .. /HTML tags,
> > however, so they are also wiki-compatible.
>
> Only doing the DPL processing and not running the template expansion
> is not possible.
>
> We currently only handle the unprocessed wiki source and can't work with
> mediawiki's html output. We do have plans to parse mediawiki's
> output. However, nothing has can been coded so far.
>
> If I had to implement this now, I would use lxml's html parser and
> convert it's parse tree to our internal format as generated by
> mwlib.refine.
>
> - Ralf

Ralf, in reply to Gero, you wrote:

> Only doing the DPL processing and not running the template expansion
> is not possible.

It seems clear to me that one reason the collection extension needs to
be first in line for processing the wikitext is that you need to
filter out templates that should not be included in the printed
document. Is that the only reason?

For instance, would it be possible to process the wikitext in multiple
passes? In the first pass remove the templates that are not to be
printed but leave the result as wikitext. In the second pass give this
result to dpl and allow it to add the dynamic content, again resulting
in legal wikitext. Finally, in a third pass, allow mwlib to parse and
process the wikitext resulting from the dpl processing.

--

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=.


Reply via email to