February 24, 2005

Dan Wahlin explains XmlDocument fundamentals (video)

Dan Wahlin starts online video series on using XML APIs in the .NET framework. Watch the first video segment devoted to XmlDocument class here. This video segment demonstrates some XmlDocument class fundamentals including how the Document Object Model (DOM) works, parsing RSS feeds, filtering with XPath, and editing XML. ...

February 22, 2005

On XmlBookmarkReader

Helena Kupkova, known before by FastXML (she claimed it's 5x faster than MSXML), now working for Microsoft on XmlReader and who's behind amazing "Microsoft XML Diff and Patch 1.0" tool, has published an article at MSDN XML Dev Center called "XML Reader with Bookmarks". ...

In the article Helena discusses XmlBookmarkReader, which is XmlReader implementation enabling you to set a bookmark at an XML node, read on and then rewind the reader back to the bookmarked node if you wish. That's really cool. It's implemented by caching all XML nodes after bookmarked one along with their context (such as Depth, attributes, namespaces etc). If you think for a moment about how XmlReader works you realize that it can be modeled as just traversing of a non-circular singly linked list of nodes. The nodes in that list are ordered in a document order (except for attributes and namespaces), which is usually called preorder tree traversal in non-XML circles. So at any moment you can start recording nodes XmlReader reads to the linked list and then come back and replay nodes by reading them from that list instead of source XML.

As a demonstration Helena shows an example of XML filtering, which requires look ahead - like selecting "/books/book[contains(title, 'XML')]". Obviously this can't be done with XmlTextReader, nor with XPathReader, but done easily with XmlBookmarkReader. As a matter of fact, XmlBookmarkReader is the feature XPathReader really needs. We can leverage XmlBookmarkReader when evaluating predicates in XPathReader so we can get back to the context node once we done with a predicate. Then XPathReader will finally be able to work with notorious "book[contains(title, 'XML')]". That's the way to go. With "look ahead" and "look back through ancestors" features XPathReader can finally be really useful. Btw, XPathReader workspace is open to everybody interested to participate. I just found out I'm admin there :)

PS. There is a small typo in the XmlBookmarkReader.cs - the line

if ( bookmarks.Count > 0 != null ) {
should probably be
if ( bookmarks != null ) {

February 21, 2005

Microsoft Word as XSL-FO visual editor?

That's interesting - MSDN has published "Transforming Word Documents into the XSL-FO Format" article by Alexei Gagarinov (RenderX) and Mark Iverson (Microsoft). The article introduces WordprocessingML and XSL-FO vocabularies and shows how to transform Word documents to into XSL-FO using developed by RenderX Word2FO.xsl stylesheet. That stylesheet is available in ...

February 13, 2005

W3C: 9 XQuery/XPath/XSLT WDs + XQuery Update Reqs

W3C has updated 9 XQuery, XPath and XSLT Working Drafts and introduced a brand new, sort of milestone one - "XQuery Update Facility Requirements": This document describes the requirements for the XQuery Update Facility. [XQuery 1.0] provides queries, but has no support for adding new values or changing existing values ...

February 10, 2005

7 years of XML

It's XML's birthday today - the very first XML 1.0 Recommendation has been published 10 February 1998 - 7 years ago. That's a mature technology which you can find everywhere, because XML just works. And it's still extremely hot! Sincere congratulations to the XML 1.0 fathers: Tim Bray, Jean Paoli ...

IBM XML Certification Free Testing Promotion

IBM is giving away 2000 free vouchers, applicable to selected WebSphere and XML certification tests. To qualify for a voucher, a candidate is required to be one of the first people to pass the aligning Pre-assessment/Sample Test between January 1, 2005 (12:00 a.m. Eastern Time) and April 30, 2005 ...

Upgrading... Done

Well, I must admit it wasn't a smooth upgrade neither. Finally I had to remove all posts, migrate to MT 3.15 and MySQL as a backend and then to reimport all posts in a way they all get the same entry_id (to keep backwards compatibility with the archives). ...

At least now I'm happy. I've got all my data in MySQL finally instead of file based Berkley DB, so now the blog posting/administration/rebuilding just flies, not crawls. No more timeouts on posting or removing comments or rebuilding archives.

And of course I've got now comment moderation and TypeKey based user registration. Now you can sign into TypeKey to post a comment - a recommended way. Alternatively you still can post a comment in an old way - with no sign in, but then such comment is a subject to a manual moderation - I need to approve it before it appears on a page.

Because I still allow unregistered comments I still get some comment spam, but at least now it doesn't make it into a page directly (so no page rebuilding on each input comment spam - what a relief for my hosting). So far so good. There are some more spam-fighting facilities I would set up if things go worse, at least MT-Blacklist is to be installed soon.

There are still some issues, e.g. when signing into TypeKey in Internet Explorer, the page doesn't reflect it and the message "Thanks for signing in... Now you can comment. (sign out)" doesn't appear untill page is reloaded. Oh, and when posting unregistered comment, some bad error message shows up:

(in cleanup) DBD::mysql::db disconnect failed: handle 2 is owned 
by thread 155f384 not current thread 22ef018 (handles can't be shared 
between threads and your driver may need a CLONE method added) 
at c:\hosting\webhost4life\member\olegt\cgi-bin\lib/MT/ObjectDriver/DBI.pm line 327.
Wow, sounds bad, gotta report it to the MovableType forum.

Anyway, now I'm back to the blogsphere. Hello there!

February 5, 2005

Upgrading to MovableType 3.15 in a moment

I'm going to upgrade my blog's MovableType engine to 3.15. I'm full of hopes it helps with damn comment spam. ...

ANN: nxslt.exe (.NET XSLT Command Line Utility) version 1.5

I'm glad to announce version 1.5 of the nxslt.exe - .NET XSLT command line utility. ...

What's nxslt.exe?

nxslt is a small but feature-rich command line utility that allows to perform XSL Transformations (XSLT) using .NET Framework's XSLT implementation - System.Xml.Xsl.XslTransform class. nxslt basically dublicates functionality and command line options, provided by Microsoft's MSXSL.EXE Command Line Transformation Utility with small difference: unlike msxsl.exe, nxslt does not support specifying start mode. In addition, nxslt has some distinct advanced features, like support for XInclude, embedded stylesheets, custom URI resolving, multiple result documents, custom extension functions, built-in rich library of EXSLT extenstion functions etc.

Changes since version 1.4

  • Updated to XInclude.NET module of the Mvp.Xml v1.0 lib - support for final W3C XInclide Recommendation
  • An ability to provide user credentials to be used when loading XML source and XSLT stylesheet documents
  • Usage header now indicats what's full version of the .NET runtime nxslt.exe is running under:
    D:\>nxslt.exe -?
    .NET XSLT command line utility, version 1.5 build 1860
    (c) 2004 Oleg Tkachenko, http://www.tkachenko.com/dotnet/nxslt.html
    Running under .NET 1.1.4322.2032
  • Bug fixes


Get it here (free/open source/BSD license).

More info at http://www.tkachenko.com/dotnet/nxslt.html.

February 2, 2005

Turning a page

I turned some sort of a page in my life and now I'm starting a new one. Still tabula rasa, but some outlines are clearly visible. I'm going to launch a new site, xmllab.net, which I see as a better place for my blog (nobody's able to pronounce tkachenko.com anyway ...