After some debugging, I found a nasty bug in an ATOM feed that validated by the W3C validator service. I was trying to parse image url's out of an ATOM feed. ATOM 1.0 feeds are defined by the RFC 4287. In paragraph "4.2.7.3. The "type" Attribute" it is defined that the type must conform to the syntax of a MIME media type. The MIME media type is in turn defined by RFC 4288. Media type registrations are listed by the IANA at: http://www.iana.org/assignments/media-types/
If we look up the media subtypes of image/ we find that JPEG images have MIME type image/jpeg . The feed I was parsing had images with MIME type image/jpg instead of image/jpeg as it should have been. Apparently the W3C validator does not validate the type of links. I reported the bug/unconformence. Hopely it will be fixed soon.
A handy list with all MIME types to be used as reference is also provided by w3cschools.
Cast for two
Saturday, May 02, 2009
links to JPEG images in ATOM feed entries must be typed image/jpeg
Posted by
cast42
at
5:35 PM
0
comments
Labels: standards
Friday, July 27, 2007
How to include a HTML page into blogger posts ? (continued)
In How to include a HTML page into blogger posts ? I explored using the more general object tag to include an external page of HTML into a blogger post. You would for example want to do this when discussing a published Google Document Sheet. When checking the appearence of the post in the RSS reader Google Reader, I noticed that the alternate text showed up:
This brought me to an idea for an improvement. I took a screenshot of the Google Sheet as displayed in my browser and loaded up the picture to the blog post. Next I moved the blurb of code for the picture:
<a onblur="try {parent.deselectBloggerImageGracefully();}catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEis6fFWgw_EHUdXJ9ez9cL69nHhZWKtx-fGWF_glB7NmFob_7n_2G5KcUPFtB8iBBv1v30grM3GWevFiTlQo7jTnNgS1YUm2upPmP14c6fq3WHpLm8BSwIRsFl5fEZhR_BBqSGXpw/s1600-h/Screenshot_5.png">
<img style="display:block; margin:0px auto 10px;
text-align:center;cursor:pointer; cursor:hand;"
src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEis6fFWgw_EHUdXJ9ez9cL69nHhZWKtx-fGWF_glB7NmFob_7n_2G5KcUPFtB8iBBv1v30grM3GWevFiTlQo7jTnNgS1YUm2upPmP14c6fq3WHpLm8BSwIRsFl5fEZhR_BBqSGXpw/s400/Screenshot_5.png"
border="0" alt=""id="BLOGGER_PHOTO_ID_5091774679559246658" /></a>
into to object tag enclosure:
<object data="URL to HTML page" type="text/html" width="520" height="350">
<a onblur="try {parent.deselectBloggerImageGracefully();}
catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEis6fFWgw_EHUdXJ9ez9cL69nHhZWKtx-fGWF_glB7NmFob_7n_2G5KcUPFtB8iBBv1v30grM3GWevFiTlQo7jTnNgS1YUm2upPmP14c6fq3WHpLm8BSwIRsFl5fEZhR_BBqSGXpw/s1600-h/Screenshot_5.png">
<img style="display:block; margin:0px auto 10px;
text-align:center;cursor:pointer; cursor:hand;"
src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEis6fFWgw_EHUdXJ9ez9cL69nHhZWKtx-fGWF_glB7NmFob_7n_2G5KcUPFtB8iBBv1v30grM3GWevFiTlQo7jTnNgS1YUm2upPmP14c6fq3WHpLm8BSwIRsFl5fEZhR_BBqSGXpw/s400/Screenshot_5.png"
border="0" alt=""id="BLOGGER_PHOTO_ID_5091774679559246658" /></a>
</object>
The result is that in Google Reader a picure of the Google sheet shows up:

If you want that the browser is directed to the published HTML page of the Google Sheet when clicking on the picture of the sheet, you can change the URL of the href of the pciture:
<object data="URL to HTML page" type="text/html" width="520" height="350">
<a onblur="try {parent.deselectBloggerImageGracefully();}
catch(e) {}" href="URL to HTML page">
<img style="display:block; margin:0px auto 10px;
text-align:center;cursor:pointer; cursor:hand;"
src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEis6fFWgw_EHUdXJ9ez9cL69nHhZWKtx-fGWF_glB7NmFob_7n_2G5KcUPFtB8iBBv1v30grM3GWevFiTlQo7jTnNgS1YUm2upPmP14c6fq3WHpLm8BSwIRsFl5fEZhR_BBqSGXpw/s400/Screenshot_5.png"
border="0" alt=""id="BLOGGER_PHOTO_ID_5091774679559246658" /></a>
</object>
Of cource, you can also copy and past the HTML code directly into the blog post. Then you get this:
| URL | Est. Value | Page Rank | Website Grader | Technorati Authority | Technorati Rank | |
| http://peterdecroubele.be | 2059 | 4 | 52 | 37 | 167,118 | |
| http://www.koenfillet.be | $1910 | 4 | 77 | - | - | |
| http://www.werner.be | 949 | 4 | 49 | 28 | 226,753 | |
| http://koenfillet.blogspot.com/ | 445 | 4 | 77 | 56 | 103,461 | |
| http://www.braincubes.be/ | 234 | 2 | 12 | 4 | 1,367,488 | |
| http://castfortwo.blogspot.com/ | 82 | 3 | 66 | 8 | 779,588 | |
| http://www.patdonnez.be/log/index.php | 80 | 3 | 13 | - | - | |
| http://detender.wordpress.com/ | 50 | 4 | 63 | 10 | 638,771 | |
| http://joro.wordpress.com/ | 42 | 2 | 41 | 2 | 2,505,981 | |
| http://217.19.231.156/apps/blog_david/ | 40 | 2 | 59 | - | - | |
| http://mertenswouter.com/blog/ | 11 | 0 | 50 | - | - | |
| http://stielo.blogspot.com/ | 2 | 0 | 62 | 1 | 3,900,217 | |
| http://hetruimesop.blogspot.com/ | 0 | 0 | 43 | - | 7,931,033 | |
| http://jeroenvanaert.blogspot.com/ | 0 | 0 | 43 | - | 7,931,033 | |
| http://myjumps.blogspot.com/ | 0 | 0 | 42 | - | 7,931,033 |
which is not that bad. Only something with the first row went wrong.
A bit fiddling with the HTML code allows to obtain this:
| URL | Est. Value | Page Rank | Website Grader | Technorati Authority | Technorati Rank |
| http://peterdecroubele.be | 2059 | 4 | 52 | 37 | 167,118 |
| http://www.koenfillet.be | $1910 | 4 | 77 | - | - |
| http://www.werner.be | 949 | 4 | 49 | 28 | 226,753 |
| http://koenfillet.blogspot.com/ | 445 | 4 | 77 | 56 | 103,461 |
| http://www.braincubes.be/ | 234 | 2 | 12 | 4 | 1,367,488 |
| http://castfortwo.blogspot.com/ | 82 | 3 | 66 | 8 | 779,588 |
| http://www.patdonnez.be/log/index.php | 80 | 3 | 13 | - | - |
| http://detender.wordpress.com/ | 50 | 4 | 63 | 10 | 638,771 |
| http://joro.wordpress.com/ | 42 | 2 | 41 | 2 | 2,505,981 |
| http://217.19.231.156/apps/blog_david/ | 40 | 2 | 59 | - | - |
| http://mertenswouter.com/blog/ | 11 | 0 | 50 | - | - |
| http://stielo.blogspot.com/ | 2 | 0 | 62 | 1 | 3,900,217 |
| http://hetruimesop.blogspot.com/ | 0 | 0 | 43 | - | 7,931,033 |
| http://jeroenvanaert.blogspot.com/ | 0 | 0 | 43 | - | 7,931,033 |
| http://myjumps.blogspot.com/ | 0 | 0 | 42 | - | 7,931,033 |
Every table row contained a bogus
<td class="rAll"> </td>that I just deleted.
Posted by
cast42
at
11:04 AM
0
comments
Labels: blogger, google sheet, howto, html, standards