Using XMLTextReader to improve XSLT processing

By reeset / On / In Microsoft, Programming

One of the things that I spend a little too much time working on was how to setup a more streamlined version of resolving entities and ignoring entities.  The key has to do with avoiding a call to the XMLValidateNavigator object, and using the XMLTextReader gives you more granularity over the process.  Here’s an example:

* Function/sub: TransformXSLT
* Description: Does the XSLT translation
* ====================================================*/
public int TransformXSLT(string sSource,
string sDest,
string sXSLT,
bool bRemote)
System.Xml.XmlTextReader reader = new System.Xml.XmlTextReader(sSource);
if (bRemote==false) {
reader.XmlResolver =
 System.Text.UTF8Encoding Encoding = new System.Text.UTF8Encoding(false);
System.IO.StreamWriter writer =
new System.IO.StreamWriter(sDest, false, Encoding);

  System.Xml.XPath.XPathDocument doc = new System.Xml.XPath.XPathDocument(reader);
    System.Xml.Xsl.XslTransform xslt = new System.Xml.Xsl.XslTransform();
    xslt.Transform(doc, null, writer, null);

 } catch (System.Exception eee) {
    this.sXSLTError = eee.ToString();
    return mengine60.ERR_XSLT_ERROR;
return 0;



OSCON Presentation notes

By reeset / On / In Digital Libraries, General Computing, OSCON 2006, Programming

For those interested in seeing all the presentation notes from OSCON 2006, you can find all the sessions currently posted at:

For sessions that I’ve attended and written about, I’ve placed them below.  As more sessions become available, I’ll post additional links.

Building Internet Applications with Mozilla XULRunner
Benjamin Smedberg
URL: (Open Office files)

Google AJAX Search API
Mark Lucovsky

Handling Cross-domain XMLHttpRequests
Premshree Pillai


OSCON 2006: Day 2

By reeset / On / In Digital Libraries, General Computing, Microsoft, OSCON 2006, Programming


The Zen of Free
Simon Phipps, Sun

“Opening” the Possibilities: APIs and Open Source
Gary Lang, AutoDesk, Inc.

Ugh — As good as the first day’s keynotes were — these were not.  I was nearly ready to bag the keynotes when…

5 a day
Robert “rOml” Lefkowitz, Root Markets

This was a fantastic keynote.  He started with a tomato and eventually wound his way around a discussion of the quantification of open source.  It was hillarious and interested…fantastic.

Building Rails to Legacy Applications
Robert Treat, Open Source Developer

Since we are in the process of porting a set of code from PHP to Ruby, I thought I’d go to this session to see what was up.  There was a number of interesting tricks and techniques discussed that I definitely am looking forward to trying.

AJAX + .NET = Atlas
Christian Wenz, Hauser & Wenz

Since frameworks are big right now, I wanted to see what Microsoft’s frameworks offerings are.  What I found was that I actually find this pretty interesting.  The .NET Atlas framework provides a comperable framework to Rails, but specifically generated for ASP.Net.  Looking at some sample code — it looks very simple and I’m pretty sure — looking at the implementation, should run on a ‘nix machine using MONO.  Also, the javascript/ajax code generated is browser neutral.  This I found somewhat suprising, but very cool.  The code generated works equally well in the current major browsers.  I’ve actually downloaded the framework and am looking at it right now trying to see how I might be able to incorporate it in some of the coding that I’ve been doing lately.

Scripting .NET with IronPython

I’ll admit, I went to this session primarily because I’ve been putting together some documentation on running MarcEdit with IronPython for dchud (btw dan, I’ll send you these slides/code as soon as they post them).  I really wasn’t sure what to expect with this session, partly because IronPython was first released 2 or 3 years ago at OSCON and at the time, only would run a single test case.  In 3 years, the development team has been officially picked up by Microsoft and has implemented ~80 percent of the current Python 2.4 feature set.  At the session, they showed some very cool demos, like some 3d work, an mp3 player, etc.  Very cool.  They will actually be posting the source code to all these projects later so when I see them, I’ll let folks know.  Oh, and they announced that the software has hit release canidate 1 status.

Building Internet Applications with Mozilla Xulrunner
Benjamin Smedberg, Mozilla

Aside from showing demos of code written using XULRunner, the speaker spent a bit of time discussing how Mozilla is looking to implement this platform for developers.