2007 May 17, 5:16Previously I created some
resource tools and then I used them to
overwrite msxml3's
XML source view. In this update I've added support for the XPointer Framework.
This time around I've started to add support for the
XPointer Framework to my
XML source view and
I've added
installation instructions. The framework consists of a series of pointer segments each of which has a scheme name followed
by data in parenthesis. For example 'scheme1(data1)scheme2(data2)scheme3(data3)'. A pointer segment resolves to a portion of the XML document based on the data and the scheme name. The whole pointer
resolves to the first segment that successfully resolves. That is, from the example, if scheme1 resolves to nothing and scheme2 resolves to something then that's used and scheme3 is ignored. In
addition to the framework I've added support for the
xmlns scheme which binds namespace prefixes to a namespace URI and the
element scheme which is a simple way to resolve to particular elements in an XML. I also have limited support for the
xpointer scheme the content of which is resolved as an
XPath with some extra functions (which I don't support --
hence the limited). I've also thrown in schemes for the two
SelectionLanguage values supported by msxml3.
Next time I might try to support the xpointer functions that aren't in xpath using
msxml script. But I think I'm losing steam on
this project... we'll see.
resource technical xml xpointer res xpath xslt 2007 May 13, 12:16My parents and grandmother came to visit the weekend before this current weekend, starting Friday May 4th. They arrived via their new motor-home which is quite the machine. Of course its my parents
motor-home so its very well decorated inside including drapes and mini-chandelier. I didn't have a memory card for my camera at the time but I'm sure my parents will put up photos on their
new blog dedicated to their motor-home at some point in the future.
At any rate, they parked the motor-home in an
RV park in Issaquah so that Friday night I drove over to them and we ate at the conveniently
closely located
Pogachas. The next day they came over and I showed them the various cool looking things my computer connected to my flat
screen TV can do. This includes
Vista Media Center showing my photos from recent trips and
Google Earth mapping out our respective homes and my recent trips (and Paris). Additionally, we played Wii which, unsurprisingly based on anecdotal evidence
from varied sources across the Internet, was a seeming hit. Mom broke records playing bowling with my dad and I, Dad did an excellent job fishing, and Grandma's slow but steady win's the race
approach to cow racing worked very well.
The next day I drove them to Seattle and we walked around Pike's Place. My parents made dinner that night at my place which was very good and made my apartment actually smell like cooked food. Also,
we exchanged Christmas gifts. For the past two years I've flown back to my parents' house for Christmas and ended up with gifts I couldn't take with me in both directions. Those I left at their house
they drove up and I was able to give them the ones I left at my place. They started the drive back the next day. I really enjoyed seeing them here.
motorhome family personal nontechnical 2007 May 11, 8:55Last time, I had written some resource tools to allow me to view and modify Windows module resources in my ultimate and noble quest to
implement the XML content-type fragment in IE7. Using the resource tools I found that MSXML3.DLL isn't signed and that I can replace the XSLT embedded resource with my own, which is great news and
means I could continue in my endevour. In the following I discuss how I came up with this
replacement for IE7's XML source view.
At first I thought I could just modify the existing XSLT but it turns out that it isn't exactly an
XSLT, rather its an
IE5 XSL. I tried using the
XSL to XSLT converter linked to on MSDN, however the resulting document still
requires manual modification. But I didn't want to muck about in their weird language and I figured I could write my own XSLT faster than I could figure out how theirs worked.
I began work on the new XSLT and found it relatively easy to produce. First I got indenting working with all the XML nodes represented appropriately and different CSS classes attached to them to make
it easy to do syntax highlighting. Next I added in some javascript to allow for closing and opening of elements. At this point my XSLT had the same features as the original XSL.
Next was the XML mimetype fragment which uses
XPointer, a framework around various different schemes for naming parts of an XML document. I focused on the
XPointer scheme which is an extended version of
XPath. So I named my first task as getting XPaths working.
Thankfully javascript running in the HTML document produced by running my XSLT on an XML document has access to the original XML document object via the
document.XMLDocument property. From this this I can execute XPaths, however there's no builtin way to map from the XML nodes selected by
the XPath to the HTML elements that I produced to represent them. So I created a recursive javascript function and XSLT named-template that both produce the same unique strings based on an XML node's
position in the document. For instance 'a3-e2-e' is the name produced for the 3rd attribute of the second element of the root element of the XML document. When producing the HTML for an XML node, I
add an 'id' attribute to the HTML with the unique string of the XML node. Then in javascript when I execute an XPath I can discover the unique string of each node in the selected set and map each of
them to their corresponding positions in the HTML.
With the hard part out of the way I changed the onload to get the fragment of the URI of the current document, interpret it as an XPath and highlight and navigate to the selected nodes. I also added
an interactive floating bar from which you can enter your own XPaths and do the same. On a related note, I found that when accessing XML files via the file URI scheme the fragment is stripped off and
not available to the javascript.
The next steps are of course to actually implement XPointer framework parsing as well as the limited number of schemes that the XPointer framework specifies.
xml xpointer msxml res xpath xslt resource ie7 technical browser ie xsl 2007 May 11, 7:48After
Carissa and Elijah's wedding Sarah and I went to San Francisco. We drove in, well Sarah drove anyway, still in
the PT Cruiser Sunday morning and checked into our hotel,
Hotel Diva. I was originally concerned that I wouldn't fit in as I don't really consider myself a
diva, however the hotel was cool. They have Internet rooms setup in various themes, the front desk is always staffed, our room had a very modern look, and when we entered the flat-screen over the
front desk was playing an episode of Aqua Teen Hunger Force.
We walked around a bit before going to the
SF Museum of Modern Art. There was a Picasso exhibit at the time
which we could see for only $3 more. It felt kind of wrong like my ticket was super-sized. I think the most memorable piece I saw was
three white
panels which consisted of three blank panels. Art. Sure. After that Sarah wanted to see the giant Hello Kitty store she had heard of from her sister. We ended up going to the Westfield Shopping
center which has a disappointingly average sized Hello Kitty store. Apparently the giant one is gone. That night we went to
First Crush for dinner. I had a
flight of wine which consists of three one-third sized glasses of various but complimentary wines. It was a great restaurant in terms of food, drink, atmosphere and service.
The next morning we were even more the tourists when we went down to Fisherman's Wharf and Pier 39. We visited the famous wax museum and purchased multiple
pounds of taffy. On the way back to the Oakland airport we got to experience a little traffic as part of
the
580 freeway had collapsed the morning we arrived and was still under repair on our way out. We survived of course and I think the trip went rather well.
sanfrancisco personal california sfmoma nontechnical 2007 May 9, 9:47MSDN documentation on the res URI scheme which resolves resources in Windows modules.
msdn uri res microsoft schema scheme resource module 2007 May 9, 4:15I read about
text/xml URI fragment resolution a few months ago. I was interested to find another kind of fragment reference other than the text/html URI
fragment but of course I didn't find an implementation in IE, Firefox, or Opera. I decided to see how much work would be required to implement this in IE.
In IE and Firefox when you open an XML file that doesn't have an XML stylesheet the XML source is rendered with syntax highlighting. In IE I also noticed that the gold bar appears when you open an
XML file off of your local machine. To me this suggested that the XML source was being rendered as HTML which I assumed was produced by running an XSLT on the source XML file. If so, I figured I
could modify the XSLT to implement text/xml URI fragments. I ran
FileMon to see if iexplore.exe loaded an
XSLT file when opening an XML file. Only the XML file and MSXML3.DLL were opened and no XSLTs were loaded as files. My next hope for modifying the XSLT was if it existed as a resource in MSXML3.DLL.
I did a findstr on the DLL for SCRIPT and found an XSLT so I decided to check for resources in MSXML3.DLL. Unfortunately my previous resource viewer didn't work correctly so I decided to write my
own.
I created
resource tools to view and modify resources in Windows modules. The viewer outputs HTML with links to the
individual resources of a module using the
res URI scheme that's built into IE. The modifier is a simple command line tool that
replaces or adds one resource at a time to a module.
Using these tools I found that the XSLT was stored as a resource in MSXML3.DLL. I'll talk more about the existing XSLT and the one I replaced it with next time.
resource technical xml msxml res xslt xsl 2007 May 5, 10:05Carissa and Elijah are married! Sarah and I flew to Oakland the Friday of two weeks
previous (April 27th) into the Oakland Airport. We were on the same flight as Jon which was fun but we weren't seated with him. Instead I was seated between Sarah and a middle aged lady who enjoyed
talking to herself. It seemed a bonus if others such as myself listened but not a prerequisite for her speaking.
Sarah and I rented a car and we drove Jon first to Hayward where he was staying then we drove to our hotel in Dublin. The car we got turned out to be a PT Cruiser which was a
surprise of course but actually wasn't that bad. The power windows are controlled by the center console rather than by a switch near the windows themselves which led to several embarrassing seconds
when we later tried to pay the toll for the Bay Bridge.
The next day we went to Carissa's wedding which was lovely. In a small church with white roses Carissa's mom married Carissa and Elijah.
Afterward we went to the reception at the Senior Center. "Senior Center" may conjure up images of rolley charis that smell like old people but it wasn't like that at all. It appears to be a community
center funded by the Senior Condos next door so it was very nice.
Carissa is the first of the college roommates to get married! I guess I'm just having trouble imagining any of us getting married...
wedding friend personal california nontechnical 2007 May 2, 1:00Apparently there's something called OS-tan in which Windows OSes are represented as anime styled characters. Very odd.
article os-tan humor images weird anime 2007 May 1, 3:48The Sunday of the weekend before last I had friends over and we watched Antitrust and Sneakers. Watching Antitrust makes me wonder if Bill Gates has seen it. Tim Robbins plays a character that is
essentially based on him but so over the top that its ridiculous.
A few days before that I watched The Prestige with Sarah. I can't tell if I was or wasn't supposed to know what was going on until the end but it was cool anyway. I didn't know until later but David
Bowie plays Tesla which is just awesome all the way around.
We also watched The Illusionist sometime before. Both movies are adaptations of novels with stage magicians set in turn of the century England. And I enjoyed both of them. I thought one would be a
rushed attempt by one studio to compete with the another on the same ground but that doesn't seem to be the case. I've noticed this before with those asteroid disaster movies and the two movies about
Truman Capote. It turns out Wikipedia has a
huge list of competing similar movies.
personal movies nontechnical 2007 Apr 23, 1:31As noted in the title, an interesting result from researchers who find that a third result which is clearly worse than the two other options will influence people picking from those two.
article raymond-chen business game-theory decoy-effect 2007 Apr 21, 11:38This previous Wednesday, I went to
trivia at the
Wilde Rover. Our team consisted of Sarah, myself, Jane,
Eric,
Rachel, and Ansen. Before the last round we were 16th (out of ~32) but after the final round we were 6th!
The previous time Sarah played there the exact same thing happened. Of course you must be in the top five to win money (or last place who gets their money back). You could say, of those who didn't
get any money we did the best! I didn't contribute too much except for spotting a street from Paris in the picture round and knowing which generation the Wii is of Nintendo home consoles. Mostly I
focused on increasing our bill =)
bar game personal trivia nontechnical 2007 Apr 17, 11:45Opera (
the fifth most popular web browser) has a new feature named
Speed Dial (video of it in action). Whenever you open a new tab you get your Speed Dial view which consists of nine thumbnails of user-settable
pages. Its like a quick-favorites that appears every time you open a new tab. I think this is a neat idea and was considering how I might do that in IE7. The following is my hack-y and ugly but no
coding required version of Speed Dial for IE7. I like my hack and I'm about to expound upon it in unnecessary detail so skip to the last paragraph if you're afraid of losing interest.
By default in IE7, whenever you open a new tab you navigate to 'about:Tabs'. As noted in wikipedia the result of
navigation to 'about:Tabs' is determined by values in the registry. Specifically, values in the key in
"HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Internet Explorer\AboutURLs". Usually this fact is exploited by
malicious software to hijack
"about:blank" and show you ads but we can hijack it too in order to display our Speed Dial-ish page.
Of course since this is a code-less hack we've got limited options on what to change 'about:Tabs' to display. It should have the following requirements.
- Something local so that our 'about:Tabs' doesn't disappear when we go offline and so that its relatively fast.
- The user should be able to modify its content.
- Show links that the user uses.
- Show thumbnails of those links
- Provide easy to use drag and drop interaction and generally look cool.
Now, I use del.icio.us which allows me to store all of my favorites online and which provides RSS feeds that list my saved links. New in IE7 is an
RSS platform that will, among other things, cache RSS feeds locally. So, by pointing
about:Tabs to my del.icio.us feed 'http://del.icio.us/rss/sequelguy/quickreference' I get (1) from IE7's RSS support, and (2) and (3) from del.icio.us. Of course requirements (4) and (5) are missing
but hey, I said this was ugly.
In summary, if you change the registry value "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Internet Explorer\AboutURLs!Tabs" to point to an RSS feed of your favorites you can get a hack-y version of Opera's
Speed Dial. I should note that although its referenced on pages such as wikipedia changing your 'about:Tabs' URI in the manner I describe is not documented and not supported by Microsoft. There could
be all kinds of horrible repercussions from this change of which I'm not aware. Yeah, actually you know what? Forget I said any of this. Pretend I never wrote it...
browser technical hack 2007 Apr 8, 3:05Shortcut Tag?
I just saw this on
another user's delicious links:
a link to ESV search that's
tagged with, among other things, "shortcut:esv". When viewed on del.icio.us there's a text box that lets you search using that link. I hadn't seen this before, but it seems pretty cool and I'm
surprised I hadn't seen it previously. A delicious post with such a tag ends up looking like the following:
I tried searching for information on this and I've found
other delicious users doing the same thing,
but nothing about the tag itself. If you know any information especially official information from del.icio.us itself please post links in reply to this post. So without further preface here's what
I've learned about the del.icio.us shortcut tag.
How-to
To get a search box in your del.icio.us links make a post that satisfies the following requirements:
- One of the tags must begin with the text 'shortcut:'. You can have more text following that in the tag if you like but it must at least start with 'shortcut:'.
- The 'url' you post must be a shortcut url rather than an actual URL. It must contain a '%s' with a lowercase 's'. When you enter text into the textbox on the del.icio.us page the text will
replace the '%s' after being percent-encoded. For example 'http://www.google.com/search?hl=en&q=%s' is the shortcut url for Google and if you type 'foo bar' into the textbox the URI you will
navigate to would be 'http://www.google.com/search?hl=en&q=foo%20bar'.
Complaints
This is neat but I do have a few complaints:
- The text from the textbox is percent-encoded before replacing the '%s'. Most sites use application/x-www-form-urlencoded
which encodes spaces as '+' rather than '%20'.
- The shortcut url format seems to be taken from Mozilla's Firefox Custom Keywords. Its a shame it wasn't based on something more
adaptable like the OpenSearch URL template syntax.
- A '%s' in the url means technically what you're submitting to del.icio.us isn't a URI as defined by the standard.
- Allowing text after 'shortcut:' means you can't look at all of a user's shortcut using this tag.
The next step is to create a tool to sync my
IE7 search providers with my shortcuts saved to delicious...
technical howto tagging tool tag delicious 2007 Mar 13, 2:08OpenID is an open identification system for the Internet in which anyone can participate.
authentication identity openid security specification privacy 2007 Mar 13, 8:16Over the weekend I went with Jon and Sarah to see
Zach Galifianakis perform at
The Moore who was awesome of
course. I hadn't been to The Moore before but it was very cool. The space is very vertical with two levels of balconies making it seem small in the other dimensions. We were on the middle level so
when Zach climbed off the stage to talk to the audience we couldn't see him.
Before the show we ate at
The Steelhead Diner. I enjoyed my chicken sandwhich but the place seemed a little full of itself with salt and pepper that had
been infused with this and that. At any rate it had a nice atmosphere and good food which I suppose is the point.
The opening act for Zach was another comedian whose name I don't recall. He was pretty funny but seemed to do just a tad too much pandering to the Seattle audience. "The administration should do
something different than what they're doing currently!" *Audience Cheers* is sort of equivalent to "Its great to be here in... Seattle!" *Audience Cheers*.
personal seattle nontechnical 2007 Feb 6, 2:39The MPAA's suggested curriculum for LA Boy Scouts on 'Respecting Copyright' badge. It doesn't have them learn about copyright which might have been interesting rather things like watch a movie's
credits and think about the people who will be hurt by pira
mpaa copyright humor boy-scouts 2007 Jan 22, 1:42Flash game in which you are airport security and must ensure no restricted materials are let through based on ever changing rules. More commentary than game. Who says games can't be art?
politics games security flash game airport 2006 Dec 27, 9:42This document defines a framework within which security services may be applied to MIME body parts.
rfc mime internet reference privacy encryption security encoding authentication read 2006 Dec 6, 6:18I got another blog entry on the
IE Blog! I wrote about
file URIs in
IE. Lots of fun right? Woo for file URIs! I
added the post to del.icio.us and saw that it had already been added 6 times
previous. This compared to
my previous IE Blog post which was
added to del.icio.us a total of 1 time(s) by y.t. I guess people are more interested in blog posts that have 'URI' in the title than they
are about blog posts whose title references
Dijkstra. Coming soon (or later) to the IE Blog: a post on international mailto URIs. Hooray!
blog ie7 file uri delicious 2006 Dec 5, 12:27This post has a bunch of links to the various new WPF offerings including Jolt which is WPF on the go available as a control for website developers.
blog wpf jolt wpf-e microsoft api programming free