Kevin ([info]kworces) wrote,
@ 2005-10-18 21:39:00
Previous Entry  Add to memories!  Tell a Friend!  Next Entry
Because I get obsessive about stuff like this (UPDATED for IE)
So I have my recipes in XML, and use a web browser to transform them into a web-friendly form via XSLT. At the time I started working on this it seemed to me like I should be able to put all recipes in a single XML file, use XSLT to present a list of options, then allow the user to click on an option and view the recipe... all without reloading the page/xml whatever. It should be do-able with XSLT and XQuery.

I was chatting with Christoph today and mentioned this. Then, because I get obsessive about stuff like this, I figured out how to do it this evening--using Javascript, XSLT, and XQuery.

The current implementation only works with Firefox. An IE implementation would be similar (though it seems like IE does not support XQuery via document.evaluate, so I'd have to walk the doc tree and do an ID match).

Anyways, if any of you are interested (because I had to glean much of this from many, many, many different websites), you can see the end result here:

http://www.worcesterworld.com/drecipes/

Warning: My Javascript is yucky.

Update: Should work with IE now.



(Post a new comment)

Awsome!
(Anonymous)
2005-10-20 06:04 pm UTC (link)
Very, very nice! I just love where browser technology is going. (Now if we can only get the docs up-to-speed.) Thanks for showing us all how it's done.

- Christoph

(Reply to this)


Create an Account
Forgot your login or password?
Login w/ OpenID
English • Español • Deutsch • Русский…