Manual:Preprocessor_DOM.php

From MediaWiki.org
Jump to: navigation, search
MediaWiki File: Preprocessor_DOM.php
Location: /includes/parser/
Source code:

HEAD1.19.0rc1
1.19.01.18.3

Classes: Preprocessor__DOM

[edit] Description

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 Extension:ExpandTemplates#XML parse tree).

Functions called from Parser.php include:

  • function preprocessToObj, which preprocesses wikitext and returns a document tree, also called DOM tree. It calls:
    • function preprocessToXml, which 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, which 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.

[edit] See also

[edit] External link

Personal tools
Namespaces

Variants
Actions
Navigation
Support
Download
Development
Communication
Print/export
Toolbox