Last modified: 2014-09-24 21:35:35 UTC
Summary from IRC discussion: | Parsoid will provide a way for clients to flag that they want a transclusion to be | substituted, subst=true – if this is set to true, then when VE (or other clients) | call Parsoid's parseFragment API it will drop the top-level transclusion's | typeof:mwTransclusion and about:#mw-t\d wrapper, and instead push it down to each | of the nested transclusions (if any exist). (Default assumption is set to false.) | | This will only implement subst: equivalence, not safesubst: yet, which is left for | future-us to worry about later.)
This specific approach doesn't work since Parsoid calls the MW API to get expanded wikitext => all nested transclusions are expanded. However, we can call the action=parse API with onlypst=true and process the result in the Parsoid pipeline normally.
We can also retrieve the template wikitext and then parse that with top-level parameters defined. Nested transclusions will then hit expandtemplates as usual.
Ah yes, that would work as well if we implement the arg-substitution logic for transclusions (or revive it from the codebase if we have since removed it). We should figure out which approach is simpler to implement/maintain. My gut sense is that the onlypst=true one is simpler. In either case, we hit the MW api + parse the result.