xml page 5 - Dave's Blog

Search
My timeline on Mastodon

Apple - iTunes - iTunes Store - Podcasts - Technical Specification

2007 May 17, 11:18The spec. on the iTunes RSS extension.PermalinkCommentsrss reference itunes apple podcast music xml

New XSLT - IE7 XML Source View Upgrade Part 2

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.PermalinkCommentsxml xpointer msxml res xpath xslt resource ie7 technical browser ie xsl

XML Pointer Language (XPointer)

2007 May 10, 12:17The XPointer specification describing the fragment used with text/xml documents.PermalinkCommentsw3c xml xpath xpointer reference uri fragment

XML Source View

2007 May 9, 10:07My XML source viewer written as XSLT to replace the builtin IE XML source viewer.PermalinkCommentsprojects me xml xslt ie ie7 windows browser

Resource Tools - IE7 XML Source View Upgrade Part 1

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.PermalinkCommentsresource technical xml msxml res xslt xsl

XSL to XSLT Converter 1.1

2007 May 3, 12:52A free tool to convert old style XSL documents into XSLT documents.PermalinkCommentsmsdn microsoft tool free download xsl xslt xml

MSXML Security Overview

2007 May 2, 11:51Overview of potential security issues when using XML, XSLT, XSD, etc.PermalinkCommentsxml microsoft article msdn security

Universal Turing Machine in XSLT

2007 May 1, 6:04A turing machine implemented as an XSLT. A great way to show that XSLT is turing complete.PermalinkCommentsxslt turing turing-machine turing-complete algorithm xml programming

RSS 2.0 Specification (RSS 2.0 at Harvard Law)

2007 Apr 25, 1:43The RSS spec.PermalinkCommentsdocumentation quickreference rss reference specification standard xml

WordNet - Princeton University Cognitive Science Laboratory

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 navPermalinkCommentsalgorithm collections etymology dictionary visualization xml language ontology tool free

spacenamespace

2007 Apr 19, 3:35Interesting projects related to maps of physical space and the semantic web.PermalinkCommentsarchitecture data map ontology rdf place semanticweb tag wifi xml space research

XML Schema Part 2: Datatypes Second Edition

2007 Apr 12, 12:35XML schema describes ISO 8601 date time formats including duractions.PermalinkCommentsdate time xml schema w3c syntax reference standard

Digital Web Magazine - HTML5, XHTML2, and the Future of the Web

2007 Apr 11, 10:27Summary of the various proposed replacements for HTML4.01.PermalinkCommentsarticle html internet xhtml xml html5 xhtml2 w3c chris-wilson

Localisation Considerations in DTD Design

2007 Apr 5, 5:28A paper on localization of XML DTDs.PermalinkCommentsdesign documentation i18n xml dtd richard-ishida

HTTP Vocabulary in RDF

2007 Mar 15, 11:59An RDF vocab for describing HTTP. Eric should really be using this in Fiddler...PermalinkCommentshttp ontology rdf semanticweb xml

Tag Hierarchy

2007 Mar 13, 12:24My project that given an XML list of items with tags produces an XML graph of those items and tags. I used this in one of my other projects Vizicious as well as on my homepage to produce hierarchy for my project links.PermalinkCommentsme projects taghierarchy personal java

Extensible Markup Language (XML) 1.0 (Third Edition)

2007 Mar 8, 1:02Defintion of the escape mechanism used in XML.PermalinkCommentsxml escape encoding reference w3c standard character-entity-reference

XPointer Framework

2007 Feb 22, 10:44The standard for URI fragments for identifying portions of an XML document. I've been looking for this...PermalinkCommentsxml xpointer w3c specification standards xpath uri fragment

FOAF Vocabulary Specification

2007 Feb 7, 4:43How to indicate human relationships and human information in a machine readable fashion.PermalinkCommentsfoaf rdf xml semanticweb specification metadata social identity namespace schema standard

Atom - RFC 4287 - The Atom Syndication Format

2007 Jan 21, 5:13ATOM XML syndication format specification.PermalinkCommentsatom rss feed reference rfc specification xml web syndication quickreference
Older EntriesNewer Entries Creative Commons License Some rights reserved.