Template:InvalidSVG

From Wikimedia Commons, the free media repository
Jump to navigation Jump to search
Documentation icon Documentationviewedithistorypurge

This documentation is transcluded from Template:InvalidSVG/doc.

This template is used for marking SVGs to be invalid. This can be checked with the validator of the W3C.
Note: Even when transcluded from the file's talk page, the validator will check the file.

The template automatically sets the following categories:

(when used by SVG created with ... templates the simple categorization is switched off,
in favour to the Invalid SVG created with ... where the files are sorted in descending error count.

Usage

{{InvalidSVG}}

Template parameters

ParameterDescriptionDefaultStatus
cat
category
categorizingFor any category (one or more), Invalid SVG or another one, with or without subcategorizing and/or sorting options: cat=[[Category:any text]] (complete category definition(s) with the brackets).
Any additional text (before and/or after the category-brackets, or instead of) will appear following the Invalid SVG-tag.
Use cat=<nowiki/> to suppress any categorization
Invalid SVGoptional
opt
option
validator optionAny text string of options can be passed to the W3C Validator, e.g. "opt=&ss=1" for "show source input" (complete option(s) with the ampersand(s)). Any option colors the background of the invalid–link.
To avoid the standard/default option setting, specify e.g. opt=<nowiki/>
&ss=1optional
err
errors
number of errorsNumber of errors detected from validation; or any text explaining why it's invalid the option is set
If this error count is explicitely set to zero "err=0", {{ValidSVG}} will be generated
If this error count is explicitely set to "-1" the W3C-uncheckability of the code is assumed
emptyoptional
url
fullurl
URLThe complete URL address of another file, e.g. another than the current version (categorization is switched off in this case, but can be set by cat=)emptyoptional
sub
subcat
subcategoryPostfix for a category diffusion within Invalid SVGemptyoptional
widthwidthWidth unification, e.g. 40em or 50%emptyoptional
stylestyleMore style attributes, e.g. style=fl for float:left (or style=none) for the less salient smaller layout:emptyoptional
moreadditional textAny additional text, replaces the final full stop.optional
Template data
<templatedata>JSON</templatedata> ./. {{TemplateBox}}
TemplateData

TemplateData is a way to store information about template parameters (the description of those and of the whole template) for both humans and machines. It is used by VisualEditor and possibly other tools like Upload Wizard.


Existing template documentation
At Wikimedia Commons, it is recommended to use {{TemplateBox}} with either useTemplateData=1 or useTemplateData=only on the /doc subpage and transcluding it with {{Documentation}} into the template. <nowiki>-tags can be wrapped around the arguments, if required, to avoid templates being expanded.

Newly created template documentation and imports
Another option, especially for imported templates, or for users with JSON experience, is placing raw <templatedata>-tags into the Wikitext of the template, as described in various Wikipediae.

Discussion
There is an ongoing discussion about that matter. Feel invited to comment if you are experienced in either way, your time permits and if you like to share your opinion or to make a suggestion.


Wikipedia's help about TemplateDataCommons-specific information

This template is used for marking SVGs to be invalid. This can be checked with the validator of the W3C. Note: Even when transcluded from the file's talk page, the validator will check the file.

Template parameters

ParameterDescriptionTypeStatus
categorizingcatcategory

Default
[[Category:Invalid SVG]]
Example
empty
Auto value
empty
Pageoptional
number of errorserrerrors

Number of errors detected from validation; (or any text explaining why it's invalid) the option is set

Default
empty
Example
empty
Auto value
empty
Numberoptional
additional textmore

Any additional text, replaces the final full stop

Default
<code>.</code>
Example
empty
Auto value
empty
Lineoptional
validator optionoptoption

Default
&ss=1
Example
empty
Auto value
empty
Stringoptional
stylestyle

More style attributes, e.g. <tt>style=fl</tt> ''for'' <tt>float:left</tt> <small>(or <tt>style=none</tt>)</small> for the '''less salient smaller layout''':<div class="mw-content-ltr plainlinks"><div class="mw-content-ltr">

{| cellspacing="0" style="color:#000;background:#DDD;border:1px solid #BBB;margin:.1em;width:;background:#EEE;" class="createdwithtemplate layouttemplate" | style="width:1.2em;height:1.2em;padding:.2em;background:#FDC" | [[File:W3C icon.svg|24px |link=//validator.w3.org/|center]] | style="font-size:.85em;padding:.2em;vertical-align:middle;" |The source code of this [[Help:SVG|SVG]] is<span class="plainlinks" style="background:#FDC"> '''[//validator.w3.org/check invalid]'''</span>.[[Category:Autotranslated templates|InvalidSVG]]

|}</div>

Default
empty
Example
empty
Auto value
empty
Unknownoptional
subcategorysubsubcat

For a category diffusion within "Invalid SVG"

Default
empty
Example
empty
Auto value
empty
Stringoptional
URLurlfullurl

The complete URL address of another file, e.g. another than the current version (categorization is switched off in this case, but can be set by "cat=")

Default
empty
Example
empty
Auto value
empty
Unknownoptional
widthwidth

Width unification, e.g. "40em" or "50%"

Default
empty
Example
empty
Auto value
empty
Numberoptional

Additional information

The template is intended to be used in the following namespaces: the File namespace

The template is intended to be used by the following user groups: all users

See also

Localization

Беларуская (тарашкевіца)‎ | বাংলা | Català | Čeština | Deutsch | Ελληνικά | English | Español | فارسی | Suomi | Français | עברית | Hrvatski | Magyar | Italiano | 한국어 | Македонски | മലയാളം | Plattdüütsch | Nederlands | Polski | Português | Русский | Sicilianu | Slovenščina | Svenska | ไทย | Türkçe | Українська | Tiếng Việt |

This template is localized through {{Autotranslate}}.

To add your language to the list of languages supported by this template, please copy the code of Template:InvalidSVG/en (or any other language version you prefer to translate) and replace the text strings in there (the form below can be used to create a translation, the English version is preloaded in the edit box). Please change the parameter lang from en (or whatever language you are translating) to the language code of your language.