February 05, 2005

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. ...

January 23, 2005

Mitigating XPath Injection Attacks in .NET

It's already 2005 and everybody's aware of SQL injection attacks nowadays. But it's silly to think that this kind of attack is only about SQL, right? SQL injection is just one particular case of a general code injection attack - when somebody too gullible allows user input to become a ...

January 20, 2005

Mvp.Xml library v1.0 released

On behalf of the Mvp.Xml Project's team I'm glad to announce release v1.0 of the Mvp.Xml library. ...

December 22, 2004

XQuery in .NET story isn't over yet

Btw, talking with .NET developers recently (XML geeks and non-geeks) about XQuery and XSLT support in .NET 2.0 I realized that shocking fact - about 80% of devs I was talking to still have no idea XQuery support in .NET 2.0 was cut. They were listening all the road to ...

Another Microsoft XML blogger

Another good news - Dave Remy, a Lead Program Manager on Core XML Technologies at Microsoft is blogging. Subscribed. ...

December 19, 2004

Would you like to see XSLT1.1 + EXSLT in .NET2?

Hey, I've got another idea. XQuery and XSLT2 are surely huge undertakings (we can truly thank W3C for that), but still there is plenty of plain poor .NET devs struggling with limitations of XSLT 1.0 and XPath 1.0. What if Microsoft implements XSLT 1.1 + EXSLT in .NET 2.0, would ...

In other .NET related XML news

Some XML news in no any order: Irwin Dolobowsky says we should expect very interesting articles at MSDN XML Dev Center, especially I'm looking forward to this one - "Helena Kupkova will show us how to create bookmarks in XML Streams with the ResetableXmlReader." Hmmm, sweet. AFAIR we've been discussing ...

Red pill for Michael Champion

Oh that big news - Michael Champion is now Program Manager for XML Standards in the Microsoft's XML WebData team. Wow, wow, wow - that's the only words I can say. Here is his intro on his new blog (hey, he is a Microsoft employee, so it's http://blogs.msdn.com/mikechampion, not http://weblogs.asp.net/mikechampion ...

December 16, 2004

What's wrong with XslTransform's API?

I wonder if is there is something inherently wrong with XslTransform's class API? I was stunned again today reading this post in microsoft.public.dotnet.xml newsgroup: I still don't see any way to create a XslTransform from a XmlDocument? That's not the first time I see it actually. The answer of course ...

On XmlPreprocess tool

That guy Loren Halvorson has relased XmlPreprocess tool for preprocessing XML files, e.g. config files in .NET. It allows to perform the following tricks: <configuration> <system.web> <!-- ifdef ${production} --> <!-- <compilation defaultLanguage="c#" debug="false"/> --> <!-- else --> <compilation defaultLanguage="c#" debug="true"/> <!-- endif --> </system.web> </configuration> As you can see ...

December 14, 2004

A letter from a dead house

I was doing some catch up reading feeds I'm subscribed and I found this one item that made me feeling some sort of bitter nostalgia. It's right on MSDN TV site, a new episode where Mark Fussel explains new XML features in upcoming .NET 2.0. The episode is dated December ...

November 22, 2004

Calling document("") in .NET

There was recently an interesting thread in the microsoft.public.dotnet.xml newsgroup on document("") function call in .NET. A guy was porting some app from using MSXML to .NET. Something didn't work... You know these common bitter (and usually completely lame) complaints: It is strange, this all works just fine using MSXML4 ...

November 17, 2004

Minor EXSLT.NET update

Just for the record: I updated EXSLT.NET to support for omit-xml-declaration attribute on the exsl:document element. If somebody desperately needs it, it's in the source repository already. ...

October 31, 2004

Cw (Comega) language compiler pereview (again?)

From the Microsoft Research: Comega is an experimental language which extends C# with new constructs for relational and semi-structured data access and asynchronous concurrency. Cw is an extension of C# in two areas: - A control flow extension for asynchronous wide-area concurrency (formerly known as Polyphonic C#). - A data ...

October 25, 2004

Implementing XML Base in .NET

XML Base is a tiny W3C Recommendation, just couple of pages. It facilitates defining base URIs for parts of XML documents via semantically predefined xml:base attribute (similar to that of HTML BASE element). It's XML Core spec, standing in one line with "Namespaces in XML" and XML InfoSet. Published back ...

October 24, 2004

Indenting attributes with XmlTextWriter

XmlTextWriter in .NET 1.X only supports indentation of the following node types: DocumentType, Element, Comment, ProcessingInstruction, and CDATA. No attributes. So how to get attributes indented anyway? If you can - wait .NET 2.0 with cool XmlWriterSettings.NewLineOnAttributes, otherwise - here is a hack how to get attributes indented with XmlTextWriter ...

Samples are templates

DonXML writes on viral coding examples in presentations on using XML in .NET: Joe Fawcett (fellow XML MVP) came across a great example (from the Microsoft.Public.Xml newsgroup) of one of my biggest pet peeves, "We (the community) are doing a very poor job teaching the average developer how to use ...

October 20, 2004

SAX for .NET 1.0 released

Karl Waclawek has announced the first production release of the SAX for .NET library - open source C#/.NET port of the SAX API. It contains API and Expat-based implementation. AElfred-based implementation is expected soon. ...

October 13, 2004

Upcoming Changes to System.Xml in .NET Framework 2.0 Beta 2

Dare writes about "Upcoming Changes to System.Xml in .NET Framework 2.0 Beta 2". In short: No XQuery (only in SQL Server 2005 aka Yukon) New - push model XML Schema valiadtor - XmlSchemaValidator. XPathDocument is reverted the XPathDocument to what it was in version 1.1 of the .NET Framework. XmlReader ...

October 12, 2004

How to collect namespaces used in a XML document

The question raised in the microsoft.public.dotnet.xml newsgroup today: "How to retrieve the namespace collection of all the document namespaces for which there is at least one element in the document". The purpose is a validation against different schemas. Well, the most effective way of doing it is during XML document ...

October 10, 2004

XML Schema determined ID, XPointer and .NET

While old gray XPath 1.0 supports only DTD-determined IDs, XPointer Framework also supports schema-determined IDs - an element in XML document can be identified by a value of an attribute or even child element, whose type is xs:ID. I've been implementing support for schema-determined IDs for the XPointer.NET/XInclude.NET library (has ...

Dan Wahlin is blogging

Dan Wahlin, author of the "XML for ASP.NET Developers" book and xmlforasp.net portal, Microsoft MVP for XML Web Services, etc, is finally blogging. Really better late than never. ...

October 05, 2004

Mark: XmlResolvers article and new edition of the "A First Look at ADO.NET and System.Xml V2.0" book

Mark Fussell: In between re-writing and updating the chapters for the beta version of the my book A First Look at ADO.NET and System.Xml V2.0, I found some time to write an article on Building Custom XmlResolvers for MSDN. It's really good artilce, highly recommended reading for those who still ...

October 02, 2004

How to join XQP project

Well, here are some clarifications on how to join XQP project. You have to be registered at the SourceForge.net (here is where you can get new user accout) and then send some free-worded request along with SourceForge user name to me. That's it. Oh, and subscribe to the xqp-development mail ...

September 28, 2004

Got a new toy: XQP (XML Query Processor) project

Well, I was talking about it a lot and finally decided to stop rambling and start doing. Here is my new toy: XQP project. XQP stands for XML Query Processor of course. It's going (if my karma is good enough) to be free open-source XPath2.0/XQuery1.0/XSLT2.0 engine for the .NET platform ...

XInclude.NET progress

Well, XInclude.NET workspace at GotDotNet seems to be severely broken. I've sent a solid dozen of requests to fix it and now they even don't answer. Ok, moving the project to sf.net, specifically to the Mvp-Xml project. I'm adding XInclude.NET v1.2 sources to the CVS right now. After some setup ...

September 26, 2004

Late time changes are harmful - EXSLT.NET 1.1.1

As it turned out unfortunatley I introduced nasty bug into date:day-name(), date:day-abbreviation() and date:month-abbreviation() functions while testing EXSLT.NET 1.1 before the release. Saturday and December never appeared :( Thanks to Chris Bayes for prompt bug report. Hence - EXSLT.NET 1.1.1 release. Please update. ...

September 20, 2004

mvp-xml-help mail list created

I have just created first public mail list for the Mvp-Xml project - mvp-xml-help mail list. mvp-xml-help list is general discussion list for all users of the Mvp-Xml project.The allowed topics on this list are:Asking for help or helping others on using Mvp-Xml libraries.General announces related to the Mvp-Xml project.Suggestions ...

September 17, 2004

GotDotNet woes

So I'm in a critic mood today... I recently found out that XInclude.NET workspace is down for at least a month. Not surprisingly the feedback on the "Combining XML Documents with XInclude" article was so low - all the article links to XInclude.NET: homepage, message board and bug tracker are ...

September 14, 2004

Alternative download location for the EXSLT.NET 1.1

Well, GotDotNet seems to be down sometimes :). Just in case here is alternative download location for the EXSLT.NET 1.1: http://www.xmland.net/exslt/EXSLT.NET-1.1.zip. ...

September 13, 2004

EXSLT.NET 1.1 released

Here we go again - I'm pleased to announce EXSLT.NET 1.1 release. It's ready for download. The blurb goes here: EXSLT.NET library is community-developed free open-source implementation of the EXSLT extensions to XSLT for the .NET platform. EXSLT.NET fully implements the following EXSLT modules: Dates and Times, Common, Math, Random ...

September 05, 2004

EXSLT.NET progress

Lots of activity in the EXSLT.NET project recently. We implemented more functions such as random:random-sequence(), str:encode-uri() and str:decode-uri(). Lots of bugs have been fixed. Support for time zone in date-time functions has been implemented. We switched to Visual Studio .NET 2003 so simplifying our custom build process. Currently I'm writing ...

August 15, 2004

My EXSLT.NET article is live at MSDN

My latest article "Building Practical Solutions with EXSLT.NET" has been published at the MSDN XML Developer Center. This is an overview of the EXSLT.NET library and its extension functions from the practical XPath/XSLT programming point of view. Basically I wanted to show how to use EXSLT.NET functionality in practice, so ...

July 25, 2004

SgmlReader and namespaces

It's obvious, but I didn't realize that till recently - Chris Lovett's SgmlReader doesn't supprot namespaces. Why? SgmlReader is SGML reader in the first place and you know, there is no namespaces in SGML. So whenever you want to cheat and process malformed XML with SgmlReader - beware of namespaces. ...

July 22, 2004

How to get ASCII encoded XML document while writing arbitrary unicode data (e.g. when transforming with XslTransform class)

Sometimes some of us want to narrow encoding of an output XML document, while to preserve data fidelity. E.g. you transform some XML source with arbitrary Unicode text into another format and you need the resulting XML document to be ASCII encoded (don't ask me why). Here is fast and ...

June 24, 2004

Efficient subtree transformation with SubtreeXPathNavigator

Daniel implemented SubtreeXPathNavigator I was talking about. That's a way cool stuff, I really like it. Now I'm not sure about XmlNodeNavigator - do we need it in Mvp.Xml library or we better remove it to not confuse users with different forms of the same navigator? I feel a bit ...

June 21, 2004

Validating Doctype-less documents against DTD

Here is another interesting puzzle to solve - how would you validate Doctype-less XML document (which has no Doctype declaration) against DTD? ...

June 15, 2004

How to add a reference to XSLT stylesheet while writng DataSet data to XML

Say you've got a DataSet and you want to save its data as XML. DataSet.WriteXml() method does it perfectly well. But what if you need saved XML to have a reference to an XSLT stylesheet - xml-stylesheet processing instruction, such as <?xml-stylesheet type="text/xsl" href="foo.xsl"?> ? Of course you can load ...

June 08, 2004

MSDN still suggests ineffective XSLT pipelining

Reading wonderful "Chapter 9 - Improving XML Performance": Split Complex Transformations into Several Stages You can incrementally transform an XML document by using multiple XSLT style sheets to generate the final required output. This process is referred to as pipelining and is particularly beneficial for complex transformations over large XML ...

May 16, 2004

Improving XML Performance

Here is another piece of a must reading - "Chapter 9 - Improving XML Performance" of the "Improving .NET Application Performance and Scalability" guide from the Microsoft Pattern and Practices group. Here are the objectives : Optimize XML processing design, Parse XML documents efficiently, Validate XML documents efficiently, Optimize your ...

May 12, 2004

Transforming only a part of XML document

Daniel writes about transforming a portion of XML document using XPathNavigatorReader. That's a common bad surprise for MSXML-experienced people, who used to fooNode.transformNode() method, where only fooNode and its descendants are visible in XSLT. In .NET that's different - no matter which DOM node you pass to XslTransform.Transform() method, the ...

April 12, 2004

Cut API

So Dare said it - unfortunately XmlAdapter and XPathChangeNavigator won't make it into System.Xml v2.0. Funny enough, but looks like I was right in my assumption about what's gonna be cut. Well, without these System.Xml v2.0 probably won't be so harmonious and beautiful as Mark has described in his "First ...

March 30, 2004

Xerces.NET???

May be I missed something, but looks like Travis Bright is converting Apache Xerces XML parser to .NET. I wonder what for? Aha, he's PM for the Java Language Conversion Assistant (JLCA). That explains. Btw, one day I stumbled across CSS parsing in .NET. Java version of the product I've ...

RE: Do we need SAX for .NET? (or does Java ports to C# make sense?)

Daniel says he's disappointed in SAX.NET project I was writing about. Unlike lazy me, he downloaded it and inspected implementation. Well, I mostly agree with him. This piece of direct thoughtless porting of complex convolute Java API to .NET looks weird and kinda unnatural. "namespace System.Xml.Sax {" isn't what I ...

EXSLT.NET and ASP.NET security woes

A long and convolute discussion about security problems of using EXSLT.NET in ASP.NET took place in EXSLT.NET message board. Here I'd like to formulate some short summary. ...

March 22, 2004

SAX for .NET?

Hey, SAX for .NET topic is becoming hot. I was aware of one implementation (to be unveiled really soon), being developed by my fellow MVP/XmlInsider, but apparently there is another one, by Karl Waclawek. Here is what he writes in xml-dev mail list: The SAX dot NET project on SourceForge ...

March 16, 2004

XML Bestiary: IndexingXPathNavigator

Here I go again with another experimental creature from my XML Bestiary: IndexingXPathNavigator. This one was inspired by Mark Fussell's "Indexing XML, XML ids and a better GetElementByID method on the XmlDocument class". I've been experimenting with Mark's extended XmlDocument, played a bit with XPathDocument and "idkey()" extension function Mark ...

March 14, 2004

ASP.NET XML syntax?

XAML, Windows Forms Markup Language (WFML), Report Definition Language (RDL), Relational Schema Definition (RSD) and Mapping Schema Definition (MSD). You get the idea what the trend is nowadays. It's all XML. What I'm wondering though - why still there is no alternative ASP.NET XML-based syntax? How long ASP.NET will stay ...

March 10, 2004

random:random-sequence() at large

Ok, I've implemented EXSLT Random module, which consists of the only function random:random-sequence() for EXSLT.NET library. Here is how it looks now: ...

March 07, 2004

Why XmlReader Usage Pattern Ignores NameTable?

Somehow it happened that one of the most commonly used XmlReader usage patterns ignores NameTable. That's really unfortunate! Everybody, including Microsofties, MVPs and of course zillions of users blindly follow it, carelessly slowing down XmlReader's parsing speed. ...

March 04, 2004

On XML Catalogs

XML.com has published good article "Using XML Catalogs with JAXP". XML Catalogs are successors of SGML Catalogs and in simple words it's a system for defining resolving of resource identifiers (URIs or Public Identifiers) in XML. If you are .NET minded - it's about having XML document (called catalog), where ...

March 02, 2004

EXSLT Random module for EXSLT.NET

I'm going to implement EXSLT Random module for EXSLT.NET lib. It contains the only extension function: number+ random:random-sequence(number?, number?) The function returns a sequence of random numbers between 0 and 1 (as text nodes obviously). The first argument is number or random numbers to generate (1 by default) and the ...

XInclude Tough Destiny

Dare writes: We were planning to add support for xml:base to the core XML parser as part of implementing XInclude but given that that it recently went from being a W3C candidate recommendation to going back to being a W3C working draft (partly due to a number of the architectural ...

February 26, 2004

Streaming XInlcude gets blessing

At last some good news. Streaming subset of XInclude I was talking about gets blessing from the W3C XML Core WG. Here is what Jonathan Marsh (MSFT, editor of XInclude) writes: It appears to be impossible to improve streamability without removing functionality from XInclude. The WG decided instead to bless ...

February 25, 2004

XInclude.NET logo contest

Well, I know I stink on graphics. Yesterday I tried to develop a logo for the XInclude.NET project and here is what I ended up. The idea was about Lego and intergration or parts into a round thing, whatever. I'd like to hear what do you guys think about this ...

Bad Monday and XInclude.NET development

When your hard disk dies Monday morning, that's nice week start. Low type tasks on recovering your data, sources, reinstalling and configuring all the stuff you cannot work without... Refreshing. Basically I've recovered already. Surprisingly I cannot now install Office 2003, it says "You've got McAffee VirusScan Enterprise installed, Office ...

February 21, 2004

nxslt.exe Command Line Utility

Dummy entry to provide single place for nxslt.exe utility comments. ...

February 19, 2004

XML Bestary Updated

I've updated my XML Bestiary as a consequence of users and my own feedback. First of all I renamed WritableXPathNavigator to SerializableXPathNavigator. That's much less confusing name IMO. Beside that I unified all distributions (the same namespace, project structure etc). More beasts to come soon, I've got several growing up ...

February 18, 2004

Streaming XInclude and Intra-document References

It's definitely love-to-steaming-strikes-back day today. Here is another sample of how streaming XML processing approach fails. The only XInlcude feature still not implemented in XInlcude.NET project is intra-document references. And basically I have no idea how to implement it in .NET pull environment (as well as Elliotte Rusty Harold has ...

ForwardXPathNavigator vs XSE: a class vs API

Meanwhile I managed to create simple dummy online demo of ForwardXPathNavigator (XPathNavigator implementation over XmlReader) I was talking about. Here it is. ...

XSE idea

Here is Daniel clarifies things about XSE: XSE is not about querying with an specific expression language/format (i.e. XPath or SXPath). XSE is just a mechanism for encapsulating state machines checking for matches against a given expression. What the expression looks like depends on the factory that creates the strategy ...

February 16, 2004

RE: Streaming XPath and ForwardXPathNavigator

Ok, Dare great deal clarified things in his "Combining XPath-based Filtering with Pull-based XML Parsing" post: Actually Oleg is closer and yet farther from the truth than he realizes. Although I wrote about a hypothetical ForwardOnlyXPathNavigator in my article entitled Can One Size Fit All? for XML Journal my planned article ...

February 15, 2004

Warriors of Streaming XPath Order

Daniel writes about performant (and inevitably streaming) XML processing, introducing XSEReader (aka Xml Streaming Events Reader). While he didn't publish the implementation itself yet, but only teasing with samples of its usage, I think I get the idea. Basically I know what he's talking about. I've been playing with such ...

February 04, 2004

XML Bestiary: SerializableXPathNavigator - InnerXml/OuterXml for XPathNavigator

Dare has been talking recently about the disconnects developers may feel once they make the shift from tree based (XmlDocument) to cursor based (XPathNavigator) model. My personal XML learning curve has started with DOM (I remember those long convolute ugly DOM navigational programs I wrote back in Y2K), then I ...

February 03, 2004

I love XmlResolvers

Did you know XslTransform class allows custom XmlResolver to return not only Stream (it's only what default XmlResolver implementation - XmlUrlResolver class supports), but also XPathNavigator! Sounds like undeservedly undocumented feature. What it gives us? Really efficient advanced XML resolving scenarios such as just mentioned recently on asp.net XML forum ...

February 01, 2004

EXSLT.NET rocks

Have you noted this thread in microsoft.public.dotnet.xml newsgroup? A guy was trying to get list of unique values from XML document of 46000 records. Using Muenchian grouping method. For MSXML4 it took 20 seconds, while in .NET 1.0 and 1.1 it effectively hung.Well, as all we know Muenchian method works ...

January 18, 2004

The Name Of The Beast

Somehow many believe it's impossible to get OuterXml/InnerXml out of XPathNavigator, but in fact it's merely one-screen-of-code class. And by the way, in System.Xml v2 XPathDocument2 class does have such properties already. So I've written a small class, which exposes this omitted functionality. It's lightweight wrapper around XPathNavigator, which adds ...

January 15, 2004

How to kill DOM

In the beginning Microsoft created the Microsoft.XMLDOM, known today as Msxml2.DOMDocument. And people like(d) it much. Then .NET happened and people were given XmlReader, XmlWriter, XmlDocument, XPathDocument, XPathNavigator and XmlDataDocument. Surprisingly most of us stuck to XmlDocument for no-matter-which scenario. Now we've been notified the Gods decided to kill XmlDocument ...

January 11, 2004

SgmlReader gets updated

Chris Lovett has released SgmlReader version 1.2. It's mostly bug fixes release. Via Dare Obasanjo aka Carnage4Life SgmlReader is an XmlReader, which is able to parse SGML documents (e.g. HTML). ...