Podręcznik:Preprocessor DOM.php

This page is a translated version of the page Manual:Preprocessor DOM.php and the translation is 29% complete.
Other languages:
English • ‎Türkçe • ‎dansk • ‎polski • ‎português do Brasil • ‎日本語


This file contains functions for recursively expanding variables, parser functions, templates, and template parameters. As an intermediate step it creates an XML DOM representation of the wikitext (see also Help:ExpandTemplates#XML parse tree).

Functions called from Parser.php include:

  • function preprocessToObj - preprocesses wikitext and returns a document tree, also called DOM tree. It calls:
    • function preprocessToXml - parses the wikitext with respect to double braces {{...}}, triple braces {{{...}}}, and double rectangular brackets [[...]], and also finds the pipes | and the equals signs =. The result is the DOM tree.
  • function expand - produces the expanded wikitext from the DOM tree. It performs double-brace expansion, calling function braceSubstitution in Parser.php, and triple-brace expansion, calling function argSubstitution in Parser.php.

Zobacz też

Link zewnętrzny