Template:XMLElement/doc

From Wikipedia, the free encyclopedia
Jump to navigation Jump to search

Template:Documentation subpage

Usage

This is for list articles like HTML element.

{{XMLElement | tagname | name | content [|atr][|end][|nospace or |noslash][|deprecated] }}
|1              = tagname – name of tag (with or without namespace) to put in angle brackets, e.g. "ol"
|2              = name – English-language name of the element in the spec, e.g. "Unordered List"
|3 or |content  = content data to put between open and start tags (defaults to "...")
Optional:
|atr            = XMLAttribute – use to display attributes and values. NOTE: This is run directly against the tag name, so you usually must include a non-breaking space: Template:Para 
|end            = "no" | "optional" – Use "no" to illustrate a void element like Template:Tag. Use "optional" to display both markup types; output is like: Template:Tag or Template:Tag
|nospace        = "yes" ("y", etc.) – will suppress the space before the / in a void element: Template:Tag instead of Template:Tag
|noslash        = "yes" ("y", etc.) – will suppress both slash and space in a void element: Template:Tag instead of Template:Tag
|deprecated     = "yes" ("y", etc.) - strikes through the tag, and adds "(deprecated)" after it.

Template:Para also supports a special value of no_both that will show both the bare tag (e.g. Template:Tag), as well as the version with the slash. By default, it provide the Template:Tag variant, labeled with "(XHTML compatible)". If used with Template:Para, it will show the Template:Tag version, labeled with "(XML compatible)".


See also

  • Template:Tl — to produce a preformatted mention of an XML/HTML-style tag