2008 Oct 24, 9:29"Standards Suck publishes video podcasts made by Anne van Kesteren, Marcos Caceres, and Lachlan Hunt about Web standards. We want to give the community an insight into standardization by critically
looking at what goes on behind the scenes at the W3C."w3cblogvideocsshtmlhtml5xhtmlwebinterview
Sarah asked me if I knew of a syntax highlighter for the QuickBase formula language which she uses at work. I couldn't find one but thought it might be fun to make a QuickBase Formula syntax highlighter based on the QuickBase help's
description of the formula syntax. Thankfully the language is relatively simple since my skills with ANTLR, the parser generator, are rusty now and I've only
used it previously for personal projects (like Javaish, the ridiculous Java based shell idea I had).
With the help of some great ANTLR examples and an ANTLR cheat
sheet I was able to come up with the grammar that parses the QuickBase Formula syntax and prints out the same formula marked up with HTML SPAN tags and various CSS classes. ANTLR produces the
parser in Java which I wrapped up in an applet, put in a jar, and embedded in an HTML page. The script in that page runs user input through the applet's parser and sticks the output at the bottom
of the page with appropriate CSS rules to highlight and print the formula in a pretty fashion.
What I learned:
I didn't realize that Java applets are easy to use via script in an HTML page. In the JavaScript I
can simply refer to publicly exposed methods on the applet and run JavaScript strings through them. It makes for a great combination: do the heavy coding in Java and do the UI in HTML. I may end up
doing this again in the future.
I love ANTLRWorks, the ANTLR IDE, that didn't exist the last time I used ANTLR. It tells you about issues with your grammar as you create it,
lets you easily debug the grammar running it forwards and backwards, display parse trees, and other useful things.
2008 May 16, 5:29Wiki filled with HTML, CSS, and other webdev type stuff from Google. Looks like almost everyone in my delicious network has added this already...via:kris.kowalgooglehtmlcssreferencequickreferencewiki
2008 May 9, 9:32"The CSS2 specification adopted Microsoft's @font-face rule as the standard method for embedding fonts. However, Safari is the only browser other than Internet Explorer that supports @font-face, and
it supports TrueType fonts instead of EOT fonts."fonttextwebwebdesignmicrosoftbrowsersafariiecss
2008 Apr 9, 8:26"I'm going to cover three basic techniques for incorporating some simple data visualization into standards-based navigation patterns."csswebvisualizationcharthtmlvia:swannman
The move of my website to NearlyFreeSpeech.NET is mostly complete except for a few server side things not working yet: RandomGrammar and parts of Vizicious. I'm still very happy with the
NearlyFreeSpeech.NET hosting and so far I've only spent a few cents on hosting. At this rate I'll only spend a few dollars a year.
I've moved all my pages to use the same CSS and hooked it up with cookies to my Kuler color options so now changes to the color theme will
stick and apply to all my pages. I haven't figured out the caching for this yet so you may have to refresh to see changes to color applied.
2008 Mar 5, 9:50"In conjunction with the Beta 1 release of Internet Explorer 8, we are posting a set of tests we are using to validate our interpretation and implementation of the CSS 2.1 specification. We are doing
this so we can get some feedback from you, the web desicsstestw3cmicrosoftmsdniebrowserie8
When throwing together an HTML page at work that other people will view, I stick the following line in for style. Its IE's error page CSS and contaits a subtle gradient background that I like.
2007 Dec 24, 12:41These days it seems like there's a social sharing website for everything representable as bits. Like Scribd for (mostly legal) documents, SciVee for scientific research videos, Wordie for words, and Kuler for color themes. Kuler seems
like a ridiculous website (overkill) but I had been meaning to update my homepage's color design and Kuler has an RSS based REST API.
The API lets you obtain things like the most recently added color themes or the most popular or all themes containing the color dark red, etc... So of course rather than update my website's design I
hooked up my css to the color themes coming out of Kuler. Select my main page's color theme from a list of random Kuler themes. As I'm sure
the regular readers can guess I use an xslt and blah blah blah... It looks OK with Silver Surfer and Happy Hipo but in general
changing the colors this way doesn't produce something pretty.
2007 Jun 4, 1:41Negative captcha is described as tricking a robot to reveal itself rather than requiring humans to prove their humanity. The system uses CSS to hide an email form field.csscaptcharobotspam
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.
2007 Apr 16, 3:33An overlooked point of IE extensibility. Attach behaviors to elements in your document via style sheets. Essentially this lets you override the normal behavior of document elements with your own
code. The article tells you all about it.msdnmicrosoftiebrowsercodeprogrammingcssarticlehowtoextensionbehavior