Template talk:Valid SVG

From Wikimedia Commons, the free media repository
Jump to: navigation, search

URL reference parameter[edit]

Is it better to give the url reference as parameter? The question rise since if the url is not given the validator try to validate the referring page that is the page Image:xyz instead of the image itself xyz.svg -- AnyFile 12:56, 29 July 2007 (UTC)

One more point. This template apply to the whole page, that is to a Image:xxxx page, not a single image. So if a newer version is uploaded the template refer to the generic Image:xxxx page, even if the validation was done with the older image.

So it would be much better if it was written which version of the image was checked.

But I have a serious problem in find a way to specify a specific version of the image and its url if the image is the last one (current image).

The same things apply with the url. If I use the url parameter as explained in the noinclude section of this parameter, this url always refers to the last version of the image, which may not be the one I have checked. The problem here is that while I have a way to get the a permanent url to a version that now is an old version of an image, I have no way to get a permanent link to the specific version of the image that now is the current version. -- AnyFile 10:16, 8 February 2008 (UTC)

You can use [[Media:Filename.svg]] to get the current direct URL to the SVG but I have not found a way to combine it with an external link to the validator.w3.org URL yet:
Media:Flag of Germany.svg valid
--Matt 08:57, 19 February 2008 (UTC)
Got it to work using the magic word {{filepath:}}: valid. The url= parameter is now obsolet. --Matt 12:56, 3 March 2008 (UTC)
Cool. Thank you very much. --norro 21:23, 3 March 2008 (UTC)

Invalid SVG[edit]

Shouldn't there be a template (and category) for invalid SVG files as well? ––Bender235 (talk) 21:27, 13 July 2008 (UTC)

I may go ahead and create {{InvalidSVG}}. ––Bender235 (talk) 12:22, 25 July 2008 (UTC)

I have nothing to say against this template. However, is there any advantage that comes with this template? --norro 10:50, 27 July 2008 (UTC)
Just marking those SVGs that need to fixed. That's it. ––Bender235 (talk) 20:45, 28 July 2008 (UTC)
Please not that svg files which come up as invalid shouldn't necessarily be fixed. As an example metadata tags are classified as invalid by the validator even when they are not. This is even true for the examples for how to use the metadata parameters on the w3 documentation pages. /Lokal_Profil 23:12, 7 August 2008 (UTC)
Can you give an example? I find it hard to believe that the W3C validator is not able to validate XML defined by W3C itself. --norro 08:49, 8 August 2008 (UTC)
Stick the code at http://www.w3.org/TR/SVG/metadata.html#Example into http://validator.w3.org/#validate_by_input. I got 20 errors. The first copule of errors might not be relevant but the later batch (linked to RDF) always occur in files with metadata. /Lokal_Profil 13:31, 8 August 2008 (UTC)
It appears the SVG working group is moving away from DTDs and towards XML schemas. I think the W3C validator only uses DTDs to do validation, so that may not be all that useful for SVGs. See here. I'm not sure if there is a good way to validate SVGs at the moment; the W3C looks like it has an initial attempt here, but the online version isn't working and the downloadable version (last I tried it) still has issues with unexpected namespaces (which are used by Inkscape, which I think otherwise outputs valid SVG but will fail the old DTD validator). Carl Lindberg (talk) 19:01, 27 September 2008 (UTC)

Bot[edit]

Shouldn't there be a bot to evaluate all the images as to whether or not they're valid?Smallman12q (talk) 19:31, 3 February 2010 (UTC)

Image URL not working[edit]

The {{fullurl:}} parser function is not including the URL scheme. As a result the URLs being sent look like //commons.wikimedia.org/... instead of http://commons.wikimedia.org/.... Is this a bug in MediaWiki that should be reported or should I just add http: to the templates manually? --ScottyWZ (talk) 20:01, 11 September 2011 (UTC)

Don't know, but just added. -- πϵρήλιο 14:33, 13 September 2011 (UTC)
All local full urls should now be coded as relative urls, rather than hard urls, so they work whether a person is using a standard http or a secure https login. Otherwise one is dropped out of their login mode, and becomes just an IP address.  — billinghurst sDrewth 00:55, 13 November 2011 (UTC)
This one was a little bit different -- it was the URL provided to the W3C servers, to retrieve the SVG and test it, so it had to be a full URL (and did not need to be https). As such, it was eventually hardcoded http, though I refactored the template some to make it easier to make the change across all the translated subtemplates. Carl Lindberg (talk) 02:55, 13 November 2011 (UTC)

Template broken(?)[edit]

This template seems to be no longer working. When I click on it to get a page validation from W3C, the following error message is displayed at W3C:


Sorry! This document can not be checked.

  1. Error
     I got the following unexpected response when trying to retrieve http:////commons.wikimedia.org/wiki/Special:Filepath/Pushing3.svg:

•••Life of Riley (TC) 01:40, 13 September 2011 (UTC)

I've fixed, ok now? -- πϵρήλιο 14:31, 13 September 2011 (UTC)
Looks like most of the translated versions still need to be fixed. You did the English one. The German one looks like it has a similar fix, and also uses the filepath magic word instead of going through Special:Filepath -- that seems a better way as well. Carl Lindberg (talk) 18:41, 13 September 2011 (UTC)
I fixed English and a couple other of the localized ones. I haven't dealt with translated templates much, but would it be a good idea to pass the w3.org URL as an argument to the translated subtemplates, so that if the URL constructions needs to change again (due to either our changes or w3.org) we only need to change one place? That part (the URL to go to) doesn't seem too language-dependent. Carl Lindberg (talk) 13:54, 15 September 2011 (UTC)
Yes indeed, that would be recommended. -- πϵρήλιο 21:08, 15 September 2011 (UTC)
I think I've done them all now. Oddly there is an Arabic translation of the template documentation, but no Arabic version of the template itself... Carl Lindberg (talk) 23:47, 19 September 2011 (UTC)
  • Template fixed now. Thank you! •••Life of Riley (TC) 19:00, 17 September 2011 (UTC)

Not working with odd filenames[edit]

The {{urlencode:{{filepath:{{PAGENAME}}}}}} does not work, it returns nothing, if the filename contains Unicode U+0027 «'» (typewriter apostrophe), as with Hornblower's double-beat valve.svg or 'Klaviatura' drawn by Ivan v. 3.svg. Is there a workaround to fix it? -- sarang사랑 08:40, 20 July 2012 (UTC)

The problem is filepath, not urlencode. PAGENAME already escapes the apostrophe, which is confusing filepath it looks like. Not sure of the fix yet. Carl Lindberg (talk) 12:34, 20 July 2012 (UTC)
Ah, problem is mentioned in Bugzilla16474, with this template mentioned specifically. I re-applied the workaround mentioned in that ticket, which I think used to be here but which I must have broken when I refactored the template, not realizing why the extra complication was there. Carl Lindberg (talk) 12:53, 20 July 2012 (UTC)