AJim <[email protected]> writes:

>
> 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?
>

mwlib can only handle the unprocessed wikitext. that's the main reason.
filtering out templates could sure be done in php. as I've written in a
prior mail, there is no obvious representation to use for the result of
template expansion. One could define such a format (i.e wikitext still
containing those UNIQ strings and a mapping of all UNIQ strings to their
replacement is what mwlib internally uses). 

But why all this hassle? In the end we'd still had to parse wikitext.
I think the right thing to do here would be to work with mediawiki's
html output. It's a bit sad, as that would most likely annihilate
mwlib's mediawiki parser.

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

I think this is a rather hard problem.

--

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