Thanks for your answers....
So basically you're saying that for no wikitag the templates that are
enclosed by it are guaranteed to be expanded ? Or is it just for <ref> and a
few other wikitags ? Or is it rather for specific combinations of wikitags
and templates ? I'm sorry for keep asking this but unfortunately i couldn't
find anything in the documentation that could make it clear for me. I'm
experimenting now with the Special:ExpandTemplates page but i still can't
reach a definite conclusion.
On Fri, Oct 15, 2010 at 1:47 PM, Conrad Irwin <conrad.irwin(a)gmail.com>wrote;wrote:
The parser converts tags to __UNIQ__ tokens while
parsing and then expands
these (either to original input, or to extension output) right at the end.
Because you are doing expandtemplates, the __UNIQ__ tokens are expanded to
the original wikitext instead of the rendered contents.
Tag extension output is arbitrary HTML, so putting the rendered contents
would not be correct for just "expandtemplates" in many cases. Adding
another mechanism to the tag hooks API so that they can opt to return "this
is the wikitext I would have rendered" would be possible, if confusing (we'd
then have some tag hooks returning input wikitext if they didn't, or
couldn't realistically, support the new API).
Conrad
On 15 October 2010 11:07, Bryan Tong Minh <bryan.tongminh(a)gmail.com>wrote;wrote:
On Thu, Oct 14, 2010 at 4:52 PM, Gabriel Sandor
<gabi.t.sandor(a)gmail.com>
wrote:
However, i soon found out that not all of the
templates are actually
expanded, the exception being those templates enclosed in wiki tags,
which
are left unexpanded (perhaps the most common
example being {{cite ...}}
templates inside <ref></ref> tags).
It appears to be that this happens indeed for <ref> tags. These tags
are part of extension Cite. Cite normally takes those tags, removes
them an relocates them to the location of the <references /> tag.
I'm guessing here, but what I think happens is that extension Cite
only does this in the parsing stage, so in the preprocessing stage
nothing is processed. Perhaps somebody with parser and Cite knowledge
can elaborate a bit more on this?
Bryan
_______________________________________________
Mediawiki-api mailing list
Mediawiki-api(a)lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-api
_______________________________________________
Mediawiki-api mailing list
Mediawiki-api(a)lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-api
_______________________________________________
Mediawiki-api mailing list
Mediawiki-api(a)lists.wikimedia.org