On 11/20/07, Mark Clements gmane@kennel17.co.uk wrote:
That's my point. Things like ISBN, RFC, etc. are magic words. Things like __NOTOC__ and {{PAGENAME}} are no more magic than [[Link]], and so shouldn't be described as such.
IMHO, by your logic, __NOTOC__ would not be a "magic" word, but {{PAGENAME}} would be. Why? Because {{FOO}} is a substitution of a template called foo. The fact that PAGENAME is a special word (rather than just the name of a template) is, indeed, "magic".
Moving onto the issue of standardising their content and appearance:
Parser directives:
- Anything enclosed in double-underscore is a parser directive.
So how does __FOOBLAH__ render? Literally, or is it treated as an "unknown parser directive"?
- A parser directive tells the parser to do something (or not to do
something) that affects the rendering of the article.
That's pretty broad. ''' tells the parser to do something that affects the rendering of the article. We could narrow it down to "affects the rendering of the article as a whole", though __TOC__ is pretty dubious. You could also anticipate behaviour like {{DEFAULTSORT:...}} being called a "parser directive", and that doesn't affect rendering...
- Unrecognised parser directives are ignored and output as normal text.
Ok, you answered my other question.
- Recognised parser directives are: TOC, NOTOC, etc.
Built-in Variables:
- Built-in variables are enclosed in double curly braces.
Just like templates
- Unrecognised variable names are ignored and are treated as template
inclusions.
Can "built-in variables" take arguments, and if so, how are they treated?
- Recognised variable names are: PAGENAME, BASENAME, etc.
Right.
Last question: are you proposing these recommendations take place immediately, in the new parser, or some time after that? Does this formalisation hold true for the current en Wikipedia install? What about other languages? What are the exceptions to these rules?
Steve