2008 Mar 31, 1:19Some interesting notes on Vista defrag."We don't try to make the volume 100% defragmented because defragmenting to the point where there are no fragmented files has negligible benefits.", "We don't
give a percent complete or time to completion estimat
progress progress-bar windows vista blog msdn microsoft defrag 2008 Mar 8, 11:23"Translating a fragment of MathMLPurpose: To get the MathML matrix related, apply, minus, times, divide, and eq tags to translate to VML and to SVG via XSLT."
Namon-Nuttayasakul mathml vml svg xslt xml convert 2008 Mar 2, 9:18
This post is about creating a server side z-code
interpreter that represents game progress in the URI. Try it with the game Lost
Pig.
I enjoy working on URIs and have the mug to prove it. Along those lines I've combined thoughts on URIs with interactive fiction. I have a
limited amount of experience with Inform which generates Z-Code so I'll focus on pieces written in that. Of course we can already have URIs
identifying the Z-Code files themselves, but I want URIs to identify my place in a piece of interactive fiction. The proper way to do this would be to give Z-Code its own mimetype and associate
with that mimetype the format of a fragment that would contain the save state of user's interactive fiction session. A user would
install a browser plugin that would generate URIs containing the appropriate fragment while you play the IF piece and be able to load URIs identifying Z-Code files and load the save state that
appears in the fragment.
But all of that would be a lot of work, so I made a server side version that approximates this. On the Web Frotz Interpreter page, enter the URI of a
Z-Code file to start a game. Enter your commands into the input text box at the bottom and you get a new URI after every command. For example, here's the
beginning of Zork. I'm running a slightly modified version of the Unix version of Frotz. Baf's Guide to the IF Archive has lists of IF games to try out.
There are two issues with this thought, the first being the security issues with running arbitrary z-code and the second is the practical URI length limit of about 2K in IE. From the Z-Code
standard and the Frotz source it looks like 'save' and 'restore' are the only commands that could do anything interesting outside of the Z-Code virtual machine. As for the length-limit on URIs I'm
not sure that much can be done about that. I'm using a base64 encoded copy of the compressed input stream in the URI now. Switching to the actual save state might be smaller after enough user
input.
zork frotz interactive-fiction zcode if technical uri fragment 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 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 Feb 27, 12:35The media type defintion for HTML. Includes defintion of its fragment.
uri html fragment rfc ietf reference standard mime 2007 Feb 27, 12:30Sir Tim Berners Lee talks about how URI fragments. Interesting to note the known issue of HTTP content negotation at odds with URI fragments being content type specific.
design uri web fragment iri tim-berners-lee w3c 2007 Feb 22, 10:44The standard for URI fragments for identifying portions of an XML document. I've been looking for this...
xml xpointer w3c specification standards xpath uri fragment 2007 Feb 22, 10:15Draft document that would update text/plain to allow for fragments identifying portions of the document.
mime uri fragment text-plain rfc ietf reference standard 2006 Apr 4, 5:23IPv4 fragmentation is not sufficiently robust for general use in today's Internet. The 16-bit IP identification field is not large enough to prevent frequent incorrectly assembled IP fragments, and
the TCP and UDP checksums are insufficient t
ip fragmentation security internet rfc ietf