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 10, 12:17The XPointer specification describing the fragment used with text/xml documents.
w3c xml xpath xpointer reference uri fragment 2007 Apr 19, 3:41"WordNet is a large lexical database of English... Nouns, verbs, adjectives and adverbs are grouped into sets of cognitive synonyms (synsets), each expressing a distinct concept...The resulting
network of meaningfully related words and concepts can be nav
algorithm collections etymology dictionary visualization xml language ontology tool free 2007 Apr 12, 2:29Social experminet to see what happens when a computer is made publicly available to poor children with no previous knowledge of computers or the English language.
computer computer-literacy india article experiment education internet 2007 Apr 12, 2:04A programming language expressed and evaluated with prime numbers.
math prime programming language algorithm turing 2007 Mar 8, 1:02Defintion of the escape mechanism used in XML.
xml escape encoding reference w3c standard character-entity-reference 2007 Feb 14, 3:12Another of Richard's tools that allows you to compose strings by visually picking characters from particular alphabets.
unicode tools picker encoding javascript language tool codepage i18n 2007 Feb 12, 5:20Another article on folksonomy, tagging, and ontologies found via Sir TBL's article.
article blog essay folksonomy information language metadata ontology social tag tagging semanticweb 2007 Feb 2, 2:41This tool searches text for biblical quotes or text suspected to be inspired by biblical quotes. That's sensor not censor.
perl religion software politics language tool propaganda download 2007 Jan 19, 5:06PHP standes for "PHP Hypertext Preprocessor". Its an open source, server side scripting language. Its running my homepage.
php programming reference development web webdesign code documentation software open-source opensource quickreference 2006 Dec 28, 2:09A humorous nerdy webcomic.
comics humor comic math science nerd daily language 2006 Dec 28, 1:18This one is also funny
comic math humor your-mom for:jozhik 2006 Dec 28, 1:15On the topic of your desired major.
comic language humor math computational-linguistics for:jozhik 2006 Dec 28, 1:09Humorous graph likely produced by 3rd party and in no way generated by Microsoft.
firefox humor comic microsoft mozilla ie witchcraft 2006 Dec 27, 2:56My profile on Wordie
proldfile wordie social word words language me 2006 Dec 27, 2:52'Like Flickr, but without the photos.' Flickr : photos :: Wordie : words. Its kind of funny really. The web is dead. Long live the web.
web2.0 words social language collaboration list lists word english etymology 2006 Dec 11, 3:35This is a language for describing outlines. Its used in several places on the Internet to convey your RSS feed subscription list.
reference xml html language opml rss specification 2006 Dec 7, 1:15Dijkstra's famous anti-goto paper. I agree with him. Due to goto in BASIC through 3rd and 4th grade I thought goto was a word.
article history humor language goto code programming dijkstra acm read 2006 Dec 3, 7:21Free encoding conversion application I made. Convert strings between various Internet related encodings including character sets, HTML encoding, URI encoding, and more.
free encoding language tool download encodeomatic convert .net projects me personal 2006 Nov 29, 11:35The Extensible Stylesheet Language Transformation specification.
xhtml w3c standards specification reference xsl xslt quickreference