API:Parsing wikitext/ja

以下のAPIモジュールによって再処理とレンダリングのためにパーサーを呼び出すことができます.

Retrieving just the raw source wikitext can be done through prop=revisions.

expandtemplates
前処理したウィキテキスト (コメントを削除、テンプレートを展開、など) を返す

パラメーター

 * : 前処理するウィキテキスト
 * : 指定したページ上のウィキテキストであるかのように振る舞う (既定値: )
 * This only really matters when parsing links to the page itself or links to subpages, or when using マジックワード like.

起こり得るエラー
なし.

構文解析
構文解析されたウィキテキストを返す

パラメーター

 * – Disable the PP Report from the parser output. Type: bool
 * – Parse the content of this revision. Overrides  and  . Type: string
 * – Only do a pre-save transform (PST) on the input, don't parse it. Type: bool
 * Returns the same wikitext, after a PST has been applied. Ignored if,   or   is used. Type: bool
 * – Parse the content of this page. Cannot be used together with  and  . Type: string
 * – Parse the content of this page. Overrides . Type: string
 * – Which pieces of information to get. A pipe character  separated list containing one or more of the following options:
 * – Gives the parsed text of the wikitext.
 * – Gives the langlinks the parsed wikitext.
 * – Gives the categories of the parsed wikitext.
 * – Gives the html version of the categories.
 * – Gives the html version of the languagelinks.
 * – Gives the internal links in the parsed wikitext.
 * – Gives the templates in the parsed wikitext.
 * – Gives the images in the parsed wikitext.
 * – Gives the external links in the parsed wikitext.
 * – Gives the sections in the parsed wikitext (TOC, table of contents).
 * – If  was used, specify the ID of the revision parsed.
 * – Adds the title of the parsed wikitext.
 * – Gives items to put in the of the page.
 * – Gives parsed of the page.
 * – Gives interwiki links in the parsed wikitext.
 * NOTE: Section tree is only generated if there are more than 4 sections, if the keyword is present, or if   is explicitly requested and the page contains headings/sub-headings (overrides  ).
 * Type: string


 * – Do a pre-save transform (PST) on the input before parsing it (makes  work properly, expands tildes to signatures, etc.). Ignored if ,   or   is used. Type: bool
 * – If the  parameter is set to a redirect, resolve it. Type: bool
 * – Only retrieve the content of this section number. Type: string
 * – Retrieve the page's TOC (if any exists). Type: string
 * – Summary to parse. Type: string
 * – Wikitext to parse. Type: string
 * – Act like the wikitext is on this page (default: ). Type: string
 * This only really matters when parsing links to the page itself or subpages, or when using マジックワード like.
 * – 構文解析すべきテキストまたはページの言語の言語コード (英語は "en"、フランス語は "fr"、など). 型: 文字列
 * This is useful for language-dependent content, such as generated by the template at the Commons, or generally by things dependent on  . Prior to MediaWiki 1.17, this worked by accident; since 1.17, it works by design.
 * – 入力テキストのコンテンツ モデル. 既定値は指定した title のモデルであり、title を指定しなかった場合は  です. text とともに使用した場合のみ有効です. 以下の値のいずれかです: wikitext, javascript, css, text, JsonZeroConfig, Scribunto, JsonSchema
 * – XML の構文解析木を生成する (contentmodel=wikitext が必須).  型: 真偽値

起こり得るエラー
Note:  is returned only for syntactically invalid page titles (eg. empty). Trying to fetching a missing page will return the rendered HTML of the "page missing" notice, not an error. However, you can check the  attribute of, which will always be   for missing pages.