xml page 2 - Dave's Blog

Search
My timeline on Mastodon

Scalable Vector Graphics (SVG) 1.1 (Second Edition)

2009 Aug 24, 4:57"This specification defines the features and syntax for Scalable Vector Graphics (SVG) Version 1.1, a modularized language for describing two-dimensional vector and mixed vector/raster graphics in XML."PermalinkCommentssvg graphic web xml reference w3c technical

Creating Accelerators for Other People's Web Services

2009 Aug 18, 4:19

Before we shipped IE8 there were no Accelerators, so we had some fun making our own for our favorite web services. I've got a small set of tips for creating Accelerators for other people's web services. I was planning on writing this up as an IE blog post, but Jon wrote a post covering a similar area so rather than write a full and coherent blog post I'll just list a few points:

PermalinkCommentstechnical accelerator ie8 ie

IE8 Search Providers, Accelerators, and Local Applications Hack

2009 Jul 25, 3:23

There's no easy way to use local applications on a PC as the result of an accelerator or a search provider in IE8 but there is a hack-y/obvious way, that I'll describe here. Both accelerators and search providers in IE8 fill in URL templates and navigate to the resulting URL when an accelerator or search provider is executed by the user. These URLs are limited in scheme to http and https but those pages may do anything any other webpage may do. If your local application has an ActiveX control you could use that, or (as I will provide examples for) if the local application has registered for an application protocol you can redirect to that URL. In any case, unfortunately this means that you must put a webpage on the Internet in order to get an accelerator or search provider to use a local application.

For examples of the app protocol case, I've created a callto accelerator that uses whatever application is registered for the callto scheme on your system, and a Windows Search search provider that opens Explorer's search with your search query. The callto accelerator navigates to my redirection page with 'callto:' followed by the selected text in the fragment and the redirection page redirects to that callto URL. In the Windows Search search provider case the same thing happens except the fragment contains 'search-ms:query=' followed by the selected text, which starts Windows Search on your system with the selected text as the query. I've looked into app protocols previously.

PermalinkCommentstechnical callto hack accelerator search ie8

Internationalization Best Practices: Specifying Language in XHTML and HTML Content

2009 Jun 25, 1:53"The document provides practical best practices related to specifying the language of content that HTML content authors can use to ensure that their HTML is easily adaptable for an international audience. These are best practices that are best addressed from the start of content development if unnecessary costs and resource issues are to be avoided later on."PermalinkCommentslanguage i18n internationalization html w3c xml reference xhtml technical

W3C I18n Tutorial: Declaring Language in XHTML and HTML

2009 Jun 25, 1:51"By following this tutorial you should be able to: ... recognize the available alternatives for declaring language, and how they differ ..."PermalinkCommentsw3c internationalization language html xml xhtml i18n tutorial technical

OpenSearchDescriptionToHTML Tool

2009 Jun 10, 3:36

I've made an OpenSearchDescriptionToHTML XSLT that given an OpenSearch description file produces HTML that describes that file, lets you install it, or search with it. For example, here's a Google OpenSearch description that uses my OpenSearchDescriptionToHTML XSLT.

I had just created an OpenSearch description for WolframAlpha at work and was going about the process of adding another install link to my search provider page so that I could install it. Thinking about it, I realized I could apply an XSLT to the OpenSearch description XML to produce the HTML automatically so I wouldn't have to modify additional documents everytime I create and want to install a new OpenSearch description. While I was in there writing the XSLT I figure why not let the user try out searching with the OpenSearch description file too. And lastly I made the XSLT apply to itself to produce HTML describing its own usage.

Incidentally, I added WolframAlpha at work to replace my FileInfo search provider for the purposes of searching for information about particular Unicode characters. For instance, look at WolframAlpha's lovely output for this search for "Bopomofo zh".

PermalinkCommentstechnical xml wolframalpha opensearchdescriptiontohtml xslt opensearch

XML.com: The Atom Link Model

2009 Jun 3, 9:55"A "via" link is simply a link back to the site where you found the article you're linking to. Atom has a link tag for this scenario: ." Is there an HTML version?PermalinkCommentsatom rss xml link syndication via

Data.gov: Unlocking the Federal Filing Cabinets - Bits Blog - NYTimes.com

2009 May 26, 11:28"But Data.gov is different. It is primarily for machines, not people, at least as a first step. It is a catalog of various sets of data from government agencies. And the idea is to offer the data in one of several standardized formats, ranging from a simple text file that can be read by a spreadsheet program to the XML format widely used these days for the exchange of information between Web services. Other data is presented in formats that are meant to feed into mapping programs."PermalinkCommentsdata nytimes xml government

Monastic XML.org - An ascetic view of XML best practices

2009 Apr 12, 6:36"MonasticXML.org is a look at XML from a different angle, focusing on what markup is best at rather than what markup can do to solve a particular problem or set of problems. While XML is powerful, developers seem insistent on using XML in ways which seem convenient for a moment but which cause much greater trouble down the line to both their projects and to markup itself."PermalinkCommentsxml howto tips

Flickr Visual Search in IE8

2009 Apr 10, 9:48

A while ago I promised to say how an xsltproc Meddler script would be useful and the general answer is its useful for hooking up a client application that wants data from the web in a particular XML format and the data is available on the web but in another XML format. The specific case for this post is a Flickr Search service that includes IE8 Visual Search Suggestions. IE8 wants the Visual Search Suggestions XML format and Flickr gives out search data in their Flickr web API XML format.

So I wrote an XSLT to convert from Flickr Search XML to Visual Suggestions XML and used my xsltproc Meddler script to actually apply this xslt.

After getting this all working I've placed the result in two places: (1) I've updated the xsltproc Meddler script to include this XSLT and an XML file to install it as a search provider - although you'll need to edit the XML to include your own Flickr API key. (2) I've created a service for this so you can just install the Flickr search provider if you're interested in having the functionality and don't care about the implementation. Additionally, to the search provider I've added accelerator preview support to show the Flickr slideshow which I think looks snazzy.

Doing a quick search for this it looks like there's at least one other such implementation, but mine has the distinction of being done through XSLT which I provide, updated XML namespaces to work with the released version of IE8, and I made it so you know its good.

PermalinkCommentsmeddler xml ie8 xslt flickr technical boring search suggestions

The Self-Describing Web

2009 Apr 7, 1:13A sort of vertical cross section of an overview of what the web should look like from HTTP & URIs to GRDDL & RDF. Oh, and there's a pretty graph at the bottom. "This finding describes how document formats, markup conventions, attribute values, and other data formats can be designed to facilitate the deployment of self-describing, Web-grounded Web content."PermalinkCommentsweb w3c xml html http semanticweb microformats xhtml atom grddl rdfa rdf

GraphML Primer

2009 Mar 23, 6:19"GraphML Primer is a non-normative document intended to provide an easily readable description of the GraphML facilities, and is oriented towards quickly understanding how to create GraphML documents."PermalinkCommentsgraphml graph format xml howto reference w3c

Exposing RSS Comments

2009 Mar 10, 1:27Description of wfw:commentRss RSS extension: Content of the element is a URL to a feed of the comments for the particular RSS item. Exactly the sort of thing I was looking for a couple of years ago. At the time none of my web services used it, but now the Delicious v2 feed uses it! Maybe its time to reexamine this sort of thing...PermalinkCommentsrss comment feed reference blog namespace xml wfw

XSPF: XML Shareable Playlist Format: Home

2009 Mar 10, 11:31"XSPF is the XML format for sharing playlists." Supported by the Yahoo! Media Player.PermalinkCommentsreference internet xml playlist music opensource

Text/Plain Fragment Bookmarklet

2008 Nov 19, 12:58

The text/plain fragment documented in RFC 5147 and described on Erik Wilde's blog struck my interest and, like the XML fragment, I wanted to see if I could implement this in IE. In this case there's no XSLT for me to edit so, like my plain/text word wrap bookmarklet I've implemented it as a bookmarklet. This is only a partial implementation as it doesn't implement the integrity checks.

Check out my text/plain fragment bookmarklet.

PermalinkCommentstext url boring bookmarklet uri plain-text javascript fragment

XSLT Meddler Script

2008 Nov 9, 11:25

I've made an XSLT Meddler script in my continued XSLT adventures. Meddler is a simple and easy web server that runs whatever JScript.NET code you give it. I wrote a script that takes an indicated XSLT on the server, downloads an indicated XML from the Internet and returns the result of running that XML through the XSLT. This is useful when you want to work with something like the Zune software or IE7's feed platform which only reads feeds over the HTTP protocol. I'll give more interesting and specific examples of how this could be useful in the future.

PermalinkCommentsmeddler technical xml script xslt

Tag Metadata in Feeds

2008 Aug 25, 10:13

As noted previously, my page consists of the aggregation of my various feeds and in working on that code recently it was again brought to my attention that everyone has different ways of representing tag metadata in feeds. I made up a list of how my various feed sources represent tags and list that data here so that it might help others in the future.

Tag markup from various sources
Source Feed Type Tag Markup Scheme One Tag Per Element Tag Scheme URI Human / Machine Names Example Markup
LiveJournal Atom atom:category yes no no , (source)
LiveJournal RSS 2.0 rss2:category yes no no technical
(soure)
WordPress RSS 2.0 rss2:category yes no no , (source)
Delicious RSS 1.0 dc:subject no no no photosynth photos 3d tool
(source)
Delicious RSS 2.0 rss2:category yes yes no domain="http://delicious.com/SequelGuy/">
hulu

(source)
Flickr Atom atom:category yes yes no term="seattle"
scheme="http://www.flickr.com/photos/tags/" />

(source)
Flickr RSS 2.0 media:category no yes no scheme="urn:flickr:tags">
seattle washington baseball mariners

(source)
YouTube RSS 2.0 media:category no no no label="Tags">
bunny rabbit yawn cadbury

(source)
LibraryThing RSS 2.0 No explicit tag metadata. no no no n/a, (source)
Tag markup scheme
Tag Markup Scheme Notes Example
Atom Category
atom:category
xmlns:atom="http://www.w3.org/2005/Atom"
category/@term
Required category name.
category/@scheme
Optional IRI id'ing the categorization scheme.
category/@label
Optional human readable category name.
term="catName"
scheme="tag:deletethis.net,2008:tagscheme"
label="category name in human readable format"/>
RSS 2.0 category
rss2:category
empty namespace
category/@domain
Optional string id'ing the categorization scheme.
category/text()
Required category name. The value of the element is a forward-slash-separated string that identifies a hierarchic location in the indicated taxonomy. Processors may establish conventions for the interpretation of categories.
domain="tag:deletethis.net,2008:tagscheme">
MSFT
Yahoo Media RSS Module category
media:category
xmlns:media="http://search.yahoo.com/mrss/"
category/text()
Required category name.
category/@domain
Optional string id'ing the categorization scheme.
scheme="http://dmoz.org"
label="Ace Ventura - Pet Detective">
Arts/Movies/Titles/A/Ace_Ventura_Series/Ace_Ventura_-_Pet_Detective
Dublin Core subject
dc:subject
xmlns:dc="http://purl.org/dc/elements/1.1/"
subject/text()
Required category name. Typically, the subject will be represented using keywords, key phrases, or classification codes. Recommended best practice is to use a controlled vocabulary.
humor

Update 2009-9-14: Added WordPress to the Tag Markup table and namespaces to the Tag Markup Scheme table.

PermalinkCommentsfeed media delicious technical atom youtube yahoo rss tag

Deriving a Non-Recursive Fibonacci Function Using Linear Algebra

2008 Aug 20, 10:51

In my Intro to Algorithms course in college the Fibonacci sequence was used as the example algorithm to which various types of algorithm creation methods were applied. As the course went on we made better and better performing algorithms to find the nth Fibonacci number. In another course we were told about a matrix that when multiplied successively produced Fibonacci numbers. In my linear algebra courses I realized I could diagonalize the matrix to find a non-recursive Fibonacci function. To my surprise this worked and I found a function.
The Nth Fibonacci value is (1 + sqrt(5))^N - (1 - sqrt(5))^N all over sqrt(5) * 2^N
Looking online I found that of course this same function was already well known. Mostly I was irritated that after all the algorithms we created for faster and faster Fibonacci functions we were never told about a constant time function like this.

I recently found my paper depicting this and thought it would be a good thing to use to try out MathML, a markup language for displaying math. I went to the MathML implementations page and installed a plugin for IE to display MathML and then began writing up my paper in MathML. I wrote the MathML by hand and must say that's not how its intended to be created. The language is very verbose and it took me a long time to get the page of equations transcribed.

MathML has presentation elements and content elements that can be used separately or together. I stuck to content elements and while it looked great in IE with my extension when I tried it in FireFox which has builtin MathML support it didn't render. As it turns out FireFox doesn't support MathML content elements. I had already finished creating this page by hand and wasn't about to switch to content elements. Also, in order to get IE to render a MathML document, the document needs directives at the top for specific IE extensions which is a pain. Thankfully, the W3C has a MathML cross platform stylesheet. You just include this XSL at the top of your XHTML page and it turns content elements into appropriate presentation elements, and inserts all the known IE extension goo required for you. So now my page can look lovely and all the ickiness to get it to render is contained in the W3C's XSL.

PermalinkCommentstechnical mathml fibonacci math

Debugging XSLT

2008 Aug 15, 4:02VS debugs XSLT. Didn't know that. Neat. "You can use the Visual Studio debugger to debug XSLT. The debugger supports setting breakpoints, viewing XSLT execution state, and so on. The debugger can be used to debug a style sheet, or to debug an XSLT transformation invoked from another application. XSLT debugging is available in the Visual Studio Team System and the Professional Edition." Unfortunately I couldn't figure out how to pass in parameter values... I just ended up setting the default value for my param elements. Otherwise, cool.PermalinkCommentsdebug visual-studio microsoft msdn reference xsl xslt xml

Leaking Information Through Delicious

2008 May 18, 6:45

While re-reading Cryptonomicon I thought about what kind of information I'm leaking by posting links on Delicious. At work I don't post any Intranet websites for fear of revealing anything but I wondered if not posting would reveal anything. For instance, if I'm particularly busy at work might I post less indicating something about the state of the things I work on? I got an archive of my Delicious posts via the Delicious API and then ran it through a tool I made to create a couple of tables which I've graphed on Many Eyes

I've graphed my posts per week and with red lines I've marked IE7 and IE8 releases as stated by Wikipedia. As you can see, there doesn't seem to be much of a pattern so I suppose my concerns we're unfounded. I use it for both work and non-work purposes and my use of Delicious isn't that consistent so I don't think it would be easy to find a pattern like I was thinking about. Perhaps if many people from my project used Delicious and that data could be compared together it might be easier.
For fun I looked at my posts per day of week which starts off strong on Mondays and decreases as the week goes on, and my posts per hour of day. It looks like I mostly post around lunch and on the extremes I've only posted very late at night twice at 4am: converting media for the Zune, and Penn's archive of articles. In the morning at 7am I've posted only once: document introducing SGML.PermalinkCommentsmanyeyes graph cryptonomicon delicious
Older EntriesNewer Entries Creative Commons License Some rights reserved.