Wednesday 9 September 2009

Getting scared by behaviour at the rear end of a moth

Last night I caught a moth that was in my bedroom, so this morning I tried to take some photos of it. However, when I came to photograph it, there was loads of little bits in the jar with it.

I wasn't sure if the bits were scales that the moth had shed, eggs, or something else. Looking at them at 5x magnification with the MP-E, they looked eggs. They didn't seem to be stuck to the paper though, and rolled around when I moved the paper.

The moth was a bit flighty and went on the carpet, so I didn't really get any good photos of her. I downloaded the memory card to my PC, did a quick process of the moth and egg photos, then posted them to the WAB forums to try and get some advice on what I should do with the eggs.

After that I processed and sorted all the other photos that were on the memory card. Then I did a backup. By the time I had done that, I had had a reply on WAB, so I followed the advice given and put the eggs under a bush outside. I found that actually some of the eggs were stuck on the paper, so I cut out the bit of paper with the eggs on and put that under the bush.

Then I came back inside and tried to take some photos of the moth, but it kept walking around. After a bit it looked like it was starting to lay eggs again, so I thought it would be great if I could get a photo of it laying eggs. But actually, it didn't seem to be laying eggs (though it did have stuck just below its rear end).

Whatever it was it was doing, it was pretty disgusting. It looked like an alien was trying to escape from the moth's rear end. This thing was poking out of the moth's abdomen and waggling around, then going back inside the moth's abdomen, then coming out and waggling around again etc. It was too weird for me to bear, so I put a jar over the moth again and took it outside to the garden, though by the time I got it there, it seemed like it might be dead.

I just left it on the piece of paper under the bush. I'm not sure what the moth was doing, but I posted the photos I had taken to WAB to see if anyone there knew.

After lunch I went on Animal Crossing, did another backup, then went in the garden to take some photos as it was nice and sunny. I saw the moth wasn't on the paper any more, it was under the bush on the soil (quite well camouflaged). So I guess it wasn't dead since it must have walked off the paper.

I found a shieldbug in the grass, I tried taking a close-up of its head, but then it started 'running' across the grass, so it was too hard to get it in focus.

I got a couple of fly photos (though they both flew away after a couple of shots), then I came back inside.

I checked my email, and one of the emails had a link to the link about photographing orchids, which has some great photos in it. I especially like the one with loads of wasps flying towards the flower.

I wanted to see why IE7 seemed to be parsing my test page that I was using yesterday as HTML instead of xml. However, when I loaded the page today, I found that it was being parsed as xml (I got an xml parsing error due to the <> I had put in the page). Deleting the <> from the page, and refreshing it, I was greeted by the same error.

So I cleared the cache and refreshed the page, and this time the page did load, with the page displayed using IE's xml view (so not as a webpage). Using Fiddler I could also see that IE was requesting all the modules used by the DTD I was using (XHTML+RDFa 1.0):
GET http://www.w3.org/MarkUp/DTD/xhtml-rdfa-1.dtd
200 OK

GET http://www.w3.org/MarkUp/DTD/xhtml-datatypes-1.mod
200 OK

GET http://www.w3.org/MarkUp/DTD/xhtml-metaAttributes-1.mod
200 OK

GET http://www.w3.org/MarkUp/DTD/xhtml-inlstyle-1.mod
200 OK

GET http://www.w3.org/MarkUp/DTD/xhtml-framework-1.mod
200 OK

GET http://www.w3.org/MarkUp/DTD/xhtml-datatypes-1.mod
200 OK

GET http://www.w3.org/MarkUp/DTD/xhtml-qname-1.mod
200 OK

GET http://www.w3.org/MarkUp/DTD/xhtml-events-1.mod
200 OK

GET http://www.w3.org/MarkUp/DTD/xhtml-attribs-1.mod
200 OK

GET http://www.w3.org/MarkUp/DTD/xhtml-rdfa-model-1.mod
200 OK

GET http://www.w3.org/MarkUp/DTD/xhtml-charent-1.mod
200 OK

GET http://www.w3.org/MarkUp/DTD/xhtml-lat1.ent
200 OK

GET http://www.w3.org/MarkUp/DTD/xhtml-symbol.ent
200 OK

GET http://www.w3.org/MarkUp/DTD/xhtml-special.ent
200 OK

GET http://www.w3.org/MarkUp/DTD/xhtml-text-1.mod
200 OK

GET http://www.w3.org/MarkUp/DTD/xhtml-inlstruct-1.mod
200 OK

GET http://www.w3.org/MarkUp/DTD/xhtml-inlphras-1.mod
200 OK

GET http://www.w3.org/MarkUp/DTD/xhtml-blkstruct-1.mod
200 OK

GET http://www.w3.org/MarkUp/DTD/xhtml-blkphras-1.mod
200 OK

GET http://www.w3.org/MarkUp/DTD/xhtml-hypertext-1.mod
200 OK

GET http://www.w3.org/MarkUp/DTD/xhtml-list-1.mod
200 OK

GET http://www.w3.org/MarkUp/DTD/xhtml-edit-1.mod
200 OK

GET http://www.w3.org/MarkUp/DTD/xhtml-bdo-1.mod
200 OK

GET http://www.w3.org/TR/ruby/xhtml-ruby-1.mod
200 OK

GET http://www.w3.org/MarkUp/DTD/xhtml-pres-1.mod
200 OK

GET http://www.w3.org/MarkUp/DTD/xhtml-inlpres-1.mod
200 OK

GET http://www.w3.org/MarkUp/DTD/xhtml-blkpres-1.mod
200 OK

GET http://www.w3.org/MarkUp/DTD/xhtml-link-1.mod
200 OK

GET http://www.w3.org/MarkUp/DTD/xhtml-meta-1.mod
200 OK

GET http://www.w3.org/MarkUp/DTD/xhtml-base-1.mod
200 OK

GET http://www.w3.org/MarkUp/DTD/xhtml-script-1.mod
200 OK

GET http://www.w3.org/MarkUp/DTD/xhtml-style-1.mod
200 OK

GET http://www.w3.org/MarkUp/DTD/xhtml-image-1.mod
200 OK

GET http://www.w3.org/MarkUp/DTD/xhtml-csismap-1.mod
200 OK

GET http://www.w3.org/MarkUp/DTD/xhtml-ssismap-1.mod
200 OK

GET http://www.w3.org/MarkUp/DTD/xhtml-param-1.mod
200 OK

GET http://www.w3.org/MarkUp/DTD/xhtml-object-1.mod
200 OK

GET http://www.w3.org/MarkUp/DTD/xhtml-table-1.mod
200 OK

GET http://www.w3.org/MarkUp/DTD/xhtml-form-1.mod
200 OK

GET http://www.w3.org/MarkUp/DTD/xhtml-target-1.mod
200 OK

GET http://www.w3.org/MarkUp/DTD/xhtml-struct-1.mod
200 OK
Note that IE requested the entity lists, so it didn't complain about the &nbsp; I had in the page.

I removed the doctype declaration, cleared the cache, refreshed the page, and now did get an error about the &nbsp;. I removed the &nbsp;, cleared the cache, refreshed the page and now got an xml view of the page again.

So I'm not sure why IE was displaying the page as HTML yesterday. I tried adding the &nbsp; entity declaration into the doctype declaration that an XSL stylesheet that could be loaded into IE (This solves the problem of IE downloading the DTD on each page view but also gives a doctype declaration so as to prevent quirks mode in IE7 and IE8). However (unsurprisingly), I still got an error that

The XML page cannot be displayed

Cannot view XML input using XSL style sheet. Please correct the error and then click the Refresh button, or try again later.


The operation completed successfully. Error processing resource 'http://www.photosite.com/xmltest/simple-prefixed.php'. Li...

        <p>This is content in the XHTML &nbsp; namespace</p>
-----------------------------------------^


So it seems that you can't add named entity support to XHTML. Unless you want to use a custom DTD (which would need to include the XHTML DTD), which IE will download on every page view. Or otherwise you may be able to include the entities in an empty doctype declaration, but IE will print "]> >" at the top of all your pages.

I checked dpreview to see if they had any news on Leica's announcement that was scheduled for today (the m9 I guess).

I read about the m9 on dpreview, then made dinner and ate dinner. After dinner I had a look round the garden, but there weren't any insects around (well, a couple of moths flying around and maybe one fly). I did the washing up, then played on the Swordplay Showdown on Wii Sports Resort, and finally completed it. Unfortunately, I got hit once, so I still I need to try and complete it without getting hit if I want to get all the badges.

After that I finished reading the Leica M9 preview on dpreview, then checked the canon lens forum on dpreview.

I had another look to try and find out why google site search wasn't working on my site, and I think I found out why. I was loading the google javascript api (http://www.google.com/jsapi) only when the search button on my site was clicked on. The idea being that there wasn't much point loading the google js on every page (as the search button appears on every page on my site), so better to load it only when someone actually clicks on the search button.

However, it seems that google.load('search', '1'); must be called before the page has finished loading. This, of course means that the google js api must also be loaded before the page has finished loading (So you must use an inline script block to load and trigger the google search js to ensure the google.load method is called before the page finishes loading. Pretty annoying.

So it seems that google site search:
  • Requires javascript
  • Isn't XHTML Compatible
  • Can't be loaded dynamically

So I decided to see if there are any other ways to add search to your website. I found this list of Open Source Search Tools, and then downloaded Swish++. I haven't installed it yet, I'll maybe take a look at that tomorrow, though I might go out on a walk with Rad tomorrow.

Food
Breakfast: Blackcurrant jam toast sandwich; cup o' tea.
Lunch: 2x cheese on toasts; salad; 3x plums; slice of yoghurt and raisin cake; Penguin wafer bar; cup o' tea.
Dinner: Breaded chicken burger with Chilli mix that was meant to be for putting on chicken when you fry it, iceberg lettuce, tomato ketchup and grated cheese in a bun; mushroom flavour fake cup a soup; slice of toast. Pudding was a Cadbury's dream ice cream (like a white chocolate Magnum). Coffee; piece of Fairtrade fudge.
Supper: Dark chocolate digestive; cup o' tea.

No comments: