March 2003 Archives

nxslt 1.1 released

| No Comments | 4 TrackBacks | ,

nxsltI have released nxslt version 1.1.

nxslt is .NET XSLT command line utility, written in C#.

Timings are now more accurate, I'm using System.Diagnostics.PerformanceCounter class now.

Two new features: custom URI resolver and multiple output.

First one is trivial - it's now possible to provide a resolver class name to resolve URI's in xsl:include, xsl:import elements and document() function. So basically nxslt is ready for XML Catalogs, lets just wait till any .NET implementation appears. Actually I have considered to implement it, but decided XInclude.NET project looks more interesting to me at the moment.

Multiple output - using partially supported exsl:document extension element it's now possible to create multiple result documents in one transformation run. Extremely powerful stuff, believe me. I would like not to unveil implementation details though (haha, it's open source) as I'm going to publish an article about it.

So enjoy. nxslt can be used in command line or integrated into IDE, such as XML Spy or Xselerator. btw, wouldn't it be nice to intergate it with VS.NET? I imagine one-click XSLT transformation inside VS.NET XML editor for instance.

On reading/writing XML in .NET

| No Comments | 1 TrackBack | ,

Dino Esposito has published a quite comprehensive article, named Real-World XML: Manipulate XML Data Easily with Integrated Readers and Writers in the .NET Framework in May MSDN mag issue.

While reading the article two things caught my eye - usual negation of SAX usefulness and another API quirk, which should be remembered.

  1. Being particlularly fan of XML pull processing I nevertheless don't understand why one may completely deny usefulness of push processing. I like both push and pull, why to limit myself to only one? Pull is good when application knows what it wants to pull out, and push is good for generic rule based processing.
    "All the functions of a SAX parser can be implemented easily and more effectively by using an XML reader."
    I'm still not convinced, in next version of XmlReader API may be, but not now. Consider MSDN example of attributes to elements convertor, based on XmlTextReader. Hmm, state machinery, 4 overrided members... And here is SAX version:
    import org.xml.sax.*;
    import org.xml.sax.helpers.*;
    public class Attrs2ElementsFilter extends XMLFilterImpl {
        public void startElement(String namespaceURI, String localName,
          String qualifiedName, Attributes atts) throws SAXException {
          AttributesImpl newAttributes = new AttributesImpl();
          super.startElement(namespaceURI, localName, 
              qualifiedName, newAttributes); 
          for (int i = 0; i < atts.getLength(); i++) {
              super.startElement("", atts.getLocalName(i), 
                  atts.getQName(i), newAttributes);
              super.characters(atts.getValue(i).toCharArray(), 0, 
              super.endElement("", atts.getLocalName(i), 
    As for me, SAX won in this particular task.
  2. Quirky one, need-to-be-remembered. (Sure they will change it in the V2 API). While the API allows XmlReader as argument to XmlValidatingReader constructor, it must be XmlTextReader.
    Note that although the signature of one of the XmlValidatingReader constructors refers generically to an XmlReader class as the underlying reader, that reader can only be an instance of the XmlTextReader class or a class which derives from it. This means that you cannot use any class which happens to inherit from XmlReader (such as a custom XML reader). Internally, the XmlValidatingReader class assumes that the underlying reader is an XmlTextReader object and specifically casts the input reader to XmlTextReader. If you use XmlNodeReader or a custom reader class, you will not get any error at compile time but an exception will be thrown at run time.

Yeah, XML Does Not Suck

| No Comments | No TrackBacks |

I believe being bored some rainy evening Tim Bray has just decided to make a little stress test of XML community. Remember ongoingXML is too hard for programmers? Now read ongoingWhy XML Doesn't Suck.

XPointer goes to Recommendation

| No Comments | 1 TrackBack |

XPointer goes to Recommendation today. Remember XPointer? It's about "pointing", i.e. identifying of XML parts or fragments. Well, after monsntrous XPath2 specs XPointer one looks like a miniature work. (It reminds me XPath1, which was about 30 pages also).

XPointer (funny enough, no version defined for the language) consists of 3 quite small documents:

  1. XPointer Framework, which defines basic semantics and syntax of XML addressing/fragment identifying.
  2. element() scheme, funny XPath-like syntax for pointing to elements in XML, e.g. "element(intro/3/1)" - which identifies first child of third child of the element with "intro" ID.
  3. xmlns() scheme, for dealing with namespaces in pointers.

Editors are just living legends: Norman Walsh, Jonathan Marsh, Eve Maler and Paul Grosso. They decided to leave the most powerful and (therefore?) contradictory xpointer() schema out of this release, it's still frozen at WD stage. Implemeters feels relief today probably.

Anyway, happy sailing in XML ocean, XPointer. There are many against you, but you can make it.

As a matter of fact main thing I wanted to say is that this event effectively means XInclude, which greatly depends on XPointer and still stays in Candidate Rec bed apparently may be also released very soon. So it's really right time to push my (our now) GotDotNet XInclude.NET project. In fact that involves XPointer implementation also, so there is a big pile of design and coding here. We desperately need more volunteers, I urge everybody interested in free implementation of XInclude for .NET platform to participate.

Snowing and hailing time

| 1 TrackBack | ,

They say it's snowing in Jerusalem again (at the end of March!) and as I can see outside it's hailing, thundering and heavily raining here near of Tel-Aviv. I know, winter rains are a blessing for Israel, Kineret goes up 10cm everyday and this is daily-good-news here. Still almost two meters below the ecologically normal red line today:

But I don't know why it all makes me pessimistic. Blogs are almost empty these days, 100 emails at the morning was probably this year minimum, newsgroups are more dead than alive, the stuff I was working on last few weeks has stuck at the final stage for the reason I have no influence on... Well, I need to start doing something new and fresh, so I'm going to return to XInclude for .NET project. Kirk Allen has joined the team yesterday, probably more invitations are needed, lets spam newsgroups then ;)

PS. At least such news save me from the depression:

Saddam's ads is filtered out

Is blogging infectious?

| 1 Comment | No TrackBacks | ,

Well, blogging is really infectious disease and finally I got the infection. I have installed Movabletype engine on my site quite easily (c'mon, it's cgi based) and here is my first record.

Lets see how it works. Administering is not bad and default template looks really nice, but I'm sure I'll modify all the style once I get some free time.

I named my blog "Signs on the Sand" (it took me the whole evening and the night to formulate my feelings), because I believe that's what all these words worth and that's their final destiny. Hmmm, whatever, I like it.

So happy blogging to me.