BizTalk Utilities CV ,   Jobs ,   Code library
 
Go to the front page to continue learning about XML or select below:

Contents

ReBlogger Contents

 
WSE
SOA
XML

 
 

All posts by : Oleg Tkachenko

Page 1 of 4

2008 Jun 03

1 of 174 | Improving XInclude authoring in Visual Studio - Obviously Microsoft forgot about XInclude when they were shipping Visual Studio, so when you edit your XML and use XInclude you get no intellisense. It's easy to fix though. Just get this XInclude schema (standard XInclude schema improved a bit by Laurens Holst) and drop it into {Visual Studio install drive}:\Program Files\Microsoft Visual Studio 9.0\Xml\Schemas Now it's better:   Brought to you by the Signs on the Sand Job Board: Add a comment  |  Comments feed  |   Save to del.ico.us  |   Digg It!  |   Reddit It! ...

2008 May 03

2 of 174 | Hidden Undocumented Feature of Visual Studio 2008 - Dynamic XSLT Intellisense - A very little known fact is that Visual Studio 2008 does support real XSLT intellisense - not a static XSLT schema-based one, but real dynamic intellisense enabling autocompletion of template names, modes, parameter/variable names, attribute set names, namespace prefixes etc. For some obscure reason it is off by default and obviously completely undocumented. I'll show you how to turn it on. But before - a little teaser. 1. When you about to call a named template you are presented with a list of all named templates in your stylesheet. My favorite feature. Finally you don't have to remember all your template names: 2. In XSLT template parameters are passed by name, so when you......

2008 Apr 16

3 of 174 | Most Popular Words 2008 (Google, Live) - I was doing some Web popularity research and found very cool data set collected by Philipp Lenssen back in 2006 and 2003. This is basically Google page count for 27000 English vocabulary words. I decided to repeat the process on a wider word set via at least two search engines (Google and Live Search). So I combined Philipp's 27000+ vocabulary with Wiktionary (a wiki-based open content dictionary) English index and got quite comprehensive 74000+ vocabulary which reflects contemporary English language usage on the net. And then I collected page count number for each word reported by Google and Live Search. And here are some visualizations. Unfortunately while Swivel can do do gr......

2008 Mar 21

4 of 174 | Generating Java using XSLT - We are working on yet another language migration tool and faced once again Java source code generation problem. Unfortunately Java doesn't have anything similar to .NET's CodeDOM, so we had to build own own Java generator. This time our development platform is XSLT 2.0. Yes, we are converting COOL:Gen (obscure 4GL model-based language) to Java using XSLT 2.0. XSLT 2.0 rocks by the way. This is first time I write production code in XSLT 2.0 and this is amazing experience. Suddenly all is so easy, everything is possible, no hassle. Despite poor authoring support (Eclipse XSLT editor sucks, while Visual Studio 2008 with XSLT 2.0 schema is ok, but cannot run Saxon), lack of debugger ......

2008 Feb 11

5 of 174 | Microsoft XSLT Profiler - Microsoft XML Tools team has released XSLT profiler addin for Visual Studio 2008. I've heard about this tool and even did a little testing long time ago (apparently it's very hard to release anything in Microsoft). First thing you need to know about Microsoft XSLT profiler - it requires Visual Studio 2008 Team System edition with the Performance Tools feature installed. That actually sounds a bit steep for just XSLT profiler, but it starts to make sense once you realize this tool is just a thin wrapper around the F1 profiler (which only ships with Visual Studio Team System SKU). Once installed, it adds "Profile XSLT" command (visible only in XSLT context, i.e. when act......

2008 Feb 08

6 of 174 | New XSLT stylesheet template in Visual Studio 2008 (again) - When you create new XSLT stylesheet in Visual Studio via project (Add/New Item) or globally (File/New/File aka Ctrl+N), you start with template content. This template is changing in every new Visual Studio version, probably because every new generation of developers working on XSLT tools in Visual Studio have different vision about what you should start with. Let's see. Visual Studio 2003. Pure simplicity: <?xml version="1.0" encoding="UTF-8" ?> <stylesheet version="1.0" xmlns="http://www.w3.org/1999/XSL/Transform"> </stylesheet> Visual Studio 2005 has two different templates for new XSLT stylesheet (!). When you......

2007 Nov 08

7 of 174 | XSLT and XSS attacks - I noticed Robert Robbins was writing about XSS attacks using XSLT: It is possible to extend the power of XSLT using JavaScript embedded into the XSL file. Therefore any web application that allows the user to upload their own XSL file will be vulnerable to Cross Site Scripting attacks. Well, that's not exactly true, at least on Microsoft platform. Microsoft tackled this issue long time ago. Both MSXML 6.0 and .NET (since 2.0) don't allow script extensions and document() function in XSLT by default. One has to enable them explicitly. So the truth is s bit different: any web application that allows the user to upload their own XSL file and explicitly allow......

2007 Jul 12

8 of 174 | Producing XHTML using XSLT in .NET - Producing XHTML using XSLT 1.0 processor is tough (no wonder - XSLT 1.0 is so old - it was published even before XHTML 1.0). While XHTML is just XML, XHTML spec defines a set of very specific formatting rules called "HTML Compatibility Guidelines". The goal is to facilitate rendering of XHTML by HTML browsers (such as Internet Explorer :). The guidelines say for instance that elements with non-empty content model (such as <p>) must never be serialized in minimized form (<p />), while elements with empty content model (such as <br>) must never be serialized in full form (<br></br>). While XML doesn't care about such nonsense, HTML brow......

2007 Jul 10

9 of 174 | Saxon, NET and XInclude - Saxon, famous XSLT 2.0 and XQuery processor, supports XInclude since version 8.9. But in Java version only! When I first heard about it I thought "I have good XInclude implementation for .NET in Mvp.Xml library, let's check out if Saxon on .NET works with XInclude.NET". I did some testing only to find out that they didn't play well together.  Turned out Saxon (or JAXP port to .NET, don't remember) relies on somewhat rarely used in .NET XmlReader.GetAttribute(int) method (yes, accessing attribute by index), and XIncludingReader had a bug in this method. Finally I fixed it and so XIncludingReader from recently released Mvp.Xml library v2.3 works fine with Sa......

2007 Jul 03

10 of 174 | Mvp.Xml Library version 2.3 released - I released version 2.3 of the Mvp.Xml Library, which is part of the Mvp.Xml Project developed by Microsoft MVPs in XML technologies worldwide. It is aimed at supplementing .NET framework XML processing functionality. Mvp.Xml Library provides .NET implementations of the EXSLT, XML Base, XInclude, XPointer as well as a unique set of utility classes and tools making XML programming in .NET platform easier, more productive and effective. This is another minor release of the Mvp.Xml Library for .NET 2.0. Version 2.3 fixes lots of bugs and introduces some new features.Most important new features include: XHTML output mode for the MvpXslTransform class XSLT2-like output character......

2007 Jun 07

11 of 174 | Next Visual Studio XML Tools - Microsoft XML Team posted a series of screencasts unveiling some new features in Visual Studio Orcas 2008. Short ones, but to the point, without blablahblah. I particularly like XML Editor ability to generate stub XML document from XML schema in just one tab click. Oh, and XSLT debugging is getting better and better. Data breakpoints is a great feature. Ok, done with sweet part. Black hat on. XSLT debugger still must be run using separate obscure button, called "Debug XSLT", which even has no keyboard shortcut. Hitting F5 will obviously start debugging C# or whatever actual project is. That sucks. Every debugging menu item works for XSLT debugger, except well, "Start De......

2007 Apr 18

12 of 174 | HOW TO: Pipeline XSLT Transformations in .NET 2.0 Applications - I mean pre-XProc XSLT pipeline - just when you need to transform an XML document by a sequence of XSLT stylesheets - output from the first transformation goes as input to the second one and so on. This is useful technique helping dramatically simplify your complex multi-stage XSLT stylesheets. Unfortunately there is no simple way to perform such task effectively in .NET 2.0. Here I show you how Mvp.Xml project comes to the rescue. Note: there is old crappy Microsoft KB article 320847 suggesting pipelining XSLT via byte buffer, Bleh!, don't do this. The problem is that while the most efficient (fastest, taking less memory) XML store for doing XSLT transform......

2007 Apr 11

13 of 174 | Amazon Context Links - Amazon has launched Context Links Beta program. The idea is that you insert a little Amazon script into your pages and when the page is open in a browser the script identifies words and phrases it thinks are relevant and makes them links to whatever Amazon products. I enabled the script on my blog's frontpage (pinky double underlined links) to see how relevant it is and here are the results: "Visual Studio" - Microsoft Visual Studio Standard 2005 "XML Viewer" - Sams Teach Yourself XML in 24 Hours, Complete Starter Kit (3rd Edition) (Sams Teach Yourself) "httpHandlers" - MCTS Self-Paced Training Kit (Exam 70-528): Microsoft .NET Framework 2.0 Web-Based Client D......

2007 Apr 05

14 of 174 | nXSLTC - an experimental XSLT compiler for .NET 3.5 - So here is nXSLTC.exe v1.0b - an experimental XSLT compiler for .NET 3.5 (Visual Studio "Orcas"). Get it here (free open-source). I probably shouldn't be building this tool, but I have my reasons. Why not? As a matter of fact, Mike Champion has announced back in February that Microsoft will provide XSLTC.exe tool in the next Visual Studio "Orcas", but apparently it didn't make it into March CTP, at least I didn't manage to find it. It probably will be included into the next drop. Why yes? First - this is the best way of learning new technology and then - I plan to build something bigger, which Microsoft won't be doing - XSLT project for Visual Studio, so I need this code any......

2007 Mar 28

15 of 174 | How to register automatically HTTP handler required by a Web server control - In ASP.NET when you building a server control that includes an HTTP handler you have this problem - the HTTP handler has to be registered in Web.config. That means it's not enough that your customer developer drops control on her Web form and sets up its properties. One more step is required - manual editing of the config, which is usability horror. How do you make your customer aware she needs to perform this additional action? Documentation? Yes, but who reads documentation on controls? I know I never, I usually just drop it on the page and poke around its properties to figure out what I need to set up to make it working asap. So here is nice trick how to avoid manual Web.c......

2007 Mar 26

16 of 174 | Word 2003 XML Viewer Control v1.0 released - I was cleaning up my backyard and found this control I never finished. So I did. Here is Word 2003 XML Viewer Control v1.0 just in case somebody needs it. It's is ASP.NET 2.0 Web server control, which allows to display arbitrary Microsoft Word 2003 XML documents (aka WordML aka WordprocessingML) on the Web so people not having Microsoft Office 2003 installed can browse documents using only a browser. The control renders Word 2003 XML documents by transforming content to HTML preserving styling and extracting images. Both Internet Explorer and Firefox are supported. Word 2003 XML Viewer Control is Web version of the Microsoft Word 2003 XML Viewer tool and uses the same WordML to......

2007 Feb 28

17 of 174 | Visual Studio Code Name "Orcas" March 2007 CTP is here - Hot, hot, hot! Microsoft Pre-release Software Visual Studio Code Name "Orcas" - March 2007 Community Technology Preview (CTP) is available for download. This is the first mostly feature complete Visual Studio v.next version (Visual Studio 2007 I bet). 6Gb download, so before click on the link take a look at what's new and decide if you need it. It's Pre-release and Community Technology Preview too. Anyway here are some highlights: LINQ The LINQ Project: this CTP represents a major milestone in the LINQ project. For more information about LINQ click here. VB 9.0 Language Support: This CTP contains the following language features: Query Expressions: B......

2007 Feb 21

18 of 174 | R.I.P. GotDotNet - Microsoft decided to shut down GotDotNet site by July 2007. The official announcement goes like this: Microsoft will be phasing out the GotDotNet site by July 2007. Microsoft will phase out all GotDotNet functionality by July 2007. We will phase out features according to the schedule below. During the phase-out we will ensure that requests for features or pages that are no longer available will render enough information for you to understand what has changed. If you have any questions please don’t hesitate to contact the GotDotNet Support team.We are phasing out GotDotNet for the following reasons: Microsoft wants to eliminate redundant functionality between GotDotNet and othe......

2007 Feb 14

19 of 174 | XML Inclusions reversal or transclusions strike back - Kzu, being also one of the Mvp.Xml project users has this wild feature request. He wants to reverse XInclude resolving back. The scenario is simple: you load XML document A.xml containing XML Inclusions for B.xml and C.xml, XInclude processor resolves XML Inclusions, you get a combined document, edit it and then you save it back to A.xml, B.xml and C.xml. So if you have modified an element coming from B.xml then B.xml gets updated on save. Well, that sounds like a reasonable feature, but how it can be done? To be able to reverse XML Inclusions one has to know exactly where each node came from, i.e. to preserve original context in a post-XInclude document. Inclu......

2007 Feb 06

20 of 174 | Generating XML entity references (&foo;) with XSLT: XSLT 2.0 to the rescue - Here is a problem: XSLT 1.0 sucks on generating XML character or entity references. I mean getting &foo; out of XSLT 1.0 is hard. The only ugly solution is disable-output-escaping hack, but it's a) optional, b)doesn't work in all scenarios (only when XSLT engine controls output serialization into bytes and c) works only on text nodes. Latter is real showstopper - you can't generate character or entity reference in attribute using XSLT 1.0. But now that we have XSLT 2.0, which is oh so better. What's XSLT 2.0 solution for the problem? In XSLT 2.0 disable-output-escaping is deprecated. New facility for the problem is called Character Maps.......

21 of 174 | Why XML - Everybody who speaks English can communicate with anybody else who also happens to speak English. You can talk, you can mail, you can read books written in English by others. Sure you can invent your own language, no big deal. You can even make somebody learn it and then talk to her. But most prefer easy way and speak XML, I mean English. [Well, technically speaking majority on this planet prefer Chinese anyway]. ...

2007 Feb 04

22 of 174 | On embedding XSLT stylesheets into assemblies - I was writing about loading XSLT stylesheets embedded into assemblies (dll or exe) recently and Richard Quinn asked this very legitimate question: But why oh why would anyone embed their XSLT in the assembly? The point is to separate design from logic. Even if the xslt does a non-presentational transform it _will_ be a pain to have to redeploy the assembly instead of just the stylesheet. Or not? Well, having XSLT stylesheets externally no doubt has many benefits. But embedding XSLT stylesheets into deploy units (be it dll, exe or jar) is also done not without a reason. After all two the most often used in the wild XSLT stylesheets are embedded. I'm talk......

2007 Jan 30

23 of 174 | Microsoft to implement XSLT 2.0 - Now it's official, from the Microsoft XML Team: Our users have made it very clear that they want an XSLT 2.0 implementation once the Recommendation is complete.   A team of XSLT experts is now in place to do this, the same people who have been working on  the XSLT enhancements that will be shipped in the forthcoming "Orcas" release of Visual Studio / .NET 3.5.  Orcas development work is winding down in advance of Beta releases over the next several months, so there is no possibility of shipping  XSLT 2.0 in Orcas.   The XSLT team will, however, be putting out Community Technology Previews (CTP) with the XSLT 2 functionality and appropriate tooli......

2007 Jan 25

24 of 174 | Meanwhile Microsoft publishes Rich Text Format (RTF) Specification, version 1.9 - While OOXML/ODF war starts to heat up, Microsoft published new version of their another document format "Word 2007: Rich Text Format (RTF) Specification, version 1.9": The Rich Text Format (RTF) Specification provides a format for text and graphics interchange that can be used with different output devices, operating environments, and operating systems. Version 1.9 of the specification contains the latest updates introduced by Microsoft Office Word 2007. If somebody forgot, RTF is  proprietary but widely supported non-XML document markup format, which looks like this: {\rtf1\ansi{\fonttbl\f0\fswiss Helvetica;}\f0 Hello!\par This is some {\b bold} text.\par } ......

2007 Jan 23

25 of 174 | XQuery, XSLT 2 and XPath 2 go Recommendation - This was meant to be one big huge milestone. If only it was done 3 years ago. I hope it's not too late though: XQuery, XSLT 2 and XPath 2 Are W3C Recommendations 2007-01-22: The World Wide Web Consortium has published eight new standards in the XML family for data mining, document transformation, and enterprise computing from Web services to databases. "Over 1,000 comments from developers helped ensure a resilient and implementable set of database technologies," said Jim Melton (Oracle). XSLT transforms documents into different markup or formats. XML Query can perform searches, queries and joins over collections of documents. Using XPath expressions, XSLT 2 and XQu......

2007 Jan 21

26 of 174 | Loading XSLT stylesheets embedded into an assembly - the right way - Everybody knows that XSLT stylesheet can be embedded into an assembly by setting in Visual Studio its "BuildAction" property to "Embedded Resource". Such stylesheet then can be loaded using Assembly.GetManifestResourceStream() method. But in fact, this is actually wrong way of loading embedded stylesheets, because once smarty-pants XML developer goes and breaks XSLT stylesheet into modules it suddenly stops working - xsl:import/xsl:include are not compatible with loading stylesheet via  Assembly.GetManifestResourceStream(). The right way of loading embedded stylesheets is via XmlResolver. Having custom XmlResolver loading stylesheet from an assembly solves th......

2007 Jan 03

27 of 174 | 2006 - Well, new year is here and I couldn't agree more with Kent Tegels - I'm glad 2006 is finally over. 2006 sucked on so many levels, but mostly on a personal one. 2007 must be a better year. This is my unexpressive but hopefully achievable new year resolution. As a good sign the year started with Microsoft MVP award. This is fourth year in a row I'm getting MVP award (for XML of course) and this time I was really worried about getting reawarded - it was lousy year and I didn't accomplish much. Congratulations to all fellow MVPs getting their awards again this year. ...

2006 Dec 19

28 of 174 | Using ms:string-compare() and the rest MS extension functions in XPath-only context - XslCompiledTransform implements the following useful MSXML extension functions. But what if you need to use them in XPath-only context - when evaluating XPath queries using XPathNavigator? Function Signature and description ms:string-compare number ms:string-compare(string x, string y[, string language[, string options]])Performs lexicographical string comparison. ms:utc string ms:utc(string time)Converts the prefixed date/time related values into Coordinated Universal Time and into a fixed (normalized) representation that can be sorted and compared lexicographically. ms:namespace-uri string ms:namespace-uri(string name)Resolves the prefix part of a qualified name into......

2006 Dec 12

29 of 174 | HtmlAgilityPack - DOM and XPath over HTML - I saw today Josh Christie post about "Better HTML parsing and validation with HtmlAgilityPack". HtmlAgilityPack is an open source project on CodePlex.  It provides standard DOM APIs and XPath navigation -- even when the HTML is not well-formed! Well, DOM and XPath over malformed HTML isn't new idea. I've been using XPath when screenscraping HTML for years - it seems to me way more reliable method that regular expressions. All you need in .NET is to read HTML as XML using wonderful SgmlReader from Chris Lovett. SgmlReader is an XmlReader API over any SGML document such as HTML. But what I don't get is why would anyone (but browser vendors) ......

2006 Dec 10

30 of 174 | nxslt v2.1 released - now including NAnt/MSBuild task - I just uploaded nxslt v2.1 release. In addition to the nxslt.exe command line tool it now also includes nxslt task implementation for NAnt and MSBuild. Why another XSLT task? Because existing ones suck. NAnt includes standard "style" task, but it uses obsolete slow and buggy XslTransform engine to perform transformations. MSBuild doesn't include XSLT task at all, while the Xslt task from the MSBuild Community Tasks Project is broken. Not no mention these tasks are barebone ones. If you need a better XSLT task for NAnt or MSBuild - nxslt task is for you. Here is some highlights on this new nxslt task. nxslt task is a free feature-rich task for NAnt an......

2006 Dec 06

31 of 174 | Java 6 gets pull XML API - Better late than never - forthcoming Java 6 (currently Release Candidate) will include StAX, pull based streaming XML API.  .NET has pull based XML parser (XmlReader) from the very beginning and Microsoft was arguing .NET's XmlReader is better than SAX since at least 2002. No, I'm not saying Java catches .NET up with one more feature, no. I'm just glad I wil be able to parse XML using the same model and very similar API on both platforms. ...

32 of 174 | The Coolest XML Project Contest - I completely forgot that I still have one Visual Studio 2005 Team Suite with MSDN Premium Subscription gift card to give away. And it expires 12/31! Oh boy, what do I do now??? So for the next 2 weeks I'll be holding the "The Coolest XML Project Contest". Here is the deal. If you are working on a cool project, product, web site, service or whatever no matter open source or commercial one, which uses any XML technology in any way (hey, isn't anything matches this description nowadays?) you have a chance to win this $10K worth gray box from Microsoft called "Visual Studio 2005 Team Suite w......

2006 Dec 05

33 of 174 | NAnt doesn't suck, but MSBuild does it big time - I was building NAnt and MSBuild tasks for the nxslt tool last two days and the bottom line of my experience is "previously I thought NAnt sucks, but now I know NAnt is brilliant and it's MSBuild who sucks really big way". My complaints about NAnt were that NAnt being .NET Ant clone somehow has different license - while Java Ant is under Apache License, NAnt is under GPL. Now that Sun GPL-ed Java it might sound no big deal, but I personally was in a situation when a project manager said no we won't use NAnt because it's GPL and we don't want such a component in our big bucks product. NAnt core dlls aren't signed. That in turn means I can't sign my assembly and so can't put ......

2006 Dec 04

34 of 174 | MSBuild custom task with a subtree? - I'm missing something obvious and spent already about two hours on that simple problem. I hope somebody profficient in MSBuild drops me a line. How do I build MSBuild custom task that has XML subtree? Here is my NAnt task:<nxslt in="books.xml" style="books.xsl" out="out/catalog.html"> <parameters> <parameter name="param1" namespaceuri=" " value="val1"/> </parameters> </nxslt> How do I build custom MSBuild task that accepts such <parameters> subtree??? The documentation on MSBuild sucks. I mean it's fine if you just using tasks, but if you want to build your own task you screwd up. ...

2006 Nov 28

35 of 174 | XProc? - I've been reading about XProc, new XML Pipeline language proposed by W3C. Used to control and organize the flow of documents, the XProc language standardizes interactions, inputs and outputs for transformations for the large group of specifications such as XSLT, XML Schema, XInclude and Canonical XML that operate on and produce XML documents. The "Proc" part stands for "Processing", so it's XML processing language.  Here is a sample "validate and transform" pipeline just to give you a taste of what XProc is about:   Here is how it's expressed:<p:pipeline name="fig2" xmlns:p="http://example.org/PipelineNamespace"> <p:input port="doc" sequence="......

2006 Nov 24

36 of 174 | XML Notepad 2006 goes 2007 - Just couple of months after XML Notepad 2006 release Microsoft ships another version,  now called XML Notepad 2007. They even went and edited the article "XML Notepad 2006 Design" to be "XML Notepad 2007 Design". Cool. XML Notepad 2006 was released on the 1st September 2006, and 2 months later it had 175,000 downloads! So it looks like this little utility has found a useful place in your toolkit which is exactly what we were hoping. Thanks for all the great feedback and bug reports; many of which have been incorporated and fixed in this new version. While this is mostly a bug fix release (like fixing the install on Vista!) there are also a few new features thr......

2006 Nov 19

37 of 174 | Reporting XSLT compilation errors in .NET - Reporting errors in XSLT stylesheets is a task that almost nobody gets done right. Including me - error reporting in nxslt sucks in a big way. Probably that's because I'm just lazy bastard. But also lets face it - XslCompiledTransform API doesn't help here. Whenever there are XSLT loading (compilation) errors XslCompiledTransform.Load() method throws an XsltException containing description of the first error encountered by the compiler. But as a matter of fact internally XslCompiledTransform holds list of all errors and warnings (internal Errors property). It's just kept internal who knows why. Even Microsoft own products such as Visual Studio don't use this i......

2006 Nov 16

38 of 174 | How to get line number for a node in XSLT - It's surprisingly easy in .NET 2.0. Obviously it can't be done with pure XSLT, but an extension function returning line number for a node takes literally two lines. The trick is to use XPathDocument, not XmlDocument to store source XML to be transformed. The key is IXmlLineInfo interface. Every XPathNavigator over XPathDocument implements this interface and provides line number and line position for every node in a document. Here is a small sample: using System; using System.Xml; using System.Xml.XPath; using System.Xml.Xsl; public class Test { static void Main() { XPathDocument xdoc = new XPathDocument("books.xml"); XslCompiledTransform xslt = ne......

2006 Oct 13

39 of 174 | .NET XmlReader API flaw - .NET's XmlReader is a great XML parser, but it has one big flaw in its API: XmlReader doesn't expose attribute types. XML actually defines 8 attribute types: CDATA, ID, IDREF, IDREFS, ENTITY, ENTITIES, NMTOKEN, NMTOKENS. Yes, it's DTD, which apparently Microsoft considers to be dead,  but ID, IDREF, IDREFS types are really important ones. They provide support for cross-references and many XML languages rely on them, particularly XPath, XSLT, XQuery, XPointer, XInclude. That means XmlReader cannot be used to develop third-party implementations of those languages unless one sticks to XPathDocument/XmlDocument, which know attribute types internally. I wonder if XL......

2006 Oct 12

40 of 174 | XSLT scripting (msxsl:script) in .NET - pure evil - Another coding horror story was reported in the microsoft.public.dotnet.xml newsgroup: I've been experiencing OutOfMemory errors on our prodution webserver for a few weeks now. I've finally managed to isolate (I think) the problem to our use of c# script blocks in our xsl files. While debugging I discovered that the app domain for one of our sites had 13000+ assemblies loaded. Cool. This is just a remainder for those who use XSLT scripting (msxsl:script) in .NET: watch out, this feature is pure evil - it leaks memory and there is nothing you can do about it. The problem is that when XSLT stylesheet is loaded in .NET, msxsl:script is compiled into an assembly via CodeDOM&nbs......

2006 Oct 03

41 of 174 | Joe Fawcett is blogging - Joe Fawcett, XML expert and my fellow XML MVP  has started a blog. Highly recommended. Subscribed. ...

2006 Aug 22

42 of 174 | Extreme Markup Languages 2006 Proceedings Online - This is just a paradise for XML geeks: Extreme Markup Languages 2006 Conference Proceedings Online. Happy reading: Blazevic, Mario. "Streaming component combinators." In Proceedings of Extreme Markup Languages 2006. Brown, Alex. "Frozen streams: an experimental time- and space-efficient implementation for in-memory representation of XML documents using Java." In Proceedings of Extreme Markup Languages 2006. Bryan, Martin. "DSRL - Bringing Revolution to XML Workers." In Proceedings of Extreme Markup Languages 2006. Chatti, Noureddine, Sylvie Calabretto and Jean Marie Pinon. "MultiX: an XML based formalism to encode multi-structured documents." In Proceedings of Extreme Markup La......

43 of 174 | Free Microsoft Training CD-ROMs - AppDev is giving away these Microsoft training CDs. Free shipping in the US, nominal shipping charge outside. Quite impressive list: Visual C# 2005: Developing Applications Visual Basic 2005: Developing Applications ASP.NET Using Visual C# 2005 ASP.NET Using Visual Basic 2005 Visual Studio 2005 Tools for Microsoft Office Exploring ASP.NET "Atlas" and Web 2.0 Exploring Visual C# 2005 Exploring Visual Basic 2005 Exploring ASP.NET Using Visual C# 2005 Exploring ASP.NET Using Visual Basic 2005Visual Studio .NET Developing Applications Using Visual C# .NETVisual Basic .NET ASP.NET Using Visual C# .NET ASP.NET Using Visual Basic .NET Exploring BizTalk Server 2006 Exploring Microsoft SQ......

2006 Aug 13

44 of 174 | Introducing AdSenseWatch Desk Band - This Lebanon war had a terrible impact on my personal productivity. Too much TV, too much internet, too much pain, too little work. Hope it ends soon. Anyway I decided I need some short victorious war, oops I mean small interesting project to get me back on track. I've seen AdSense Notifier plugin for Firefox another day and I thought - cool, but I don't run Firefox 100% time, I want it on Windows taskbar, not a browser statusbar. So I had a spike project and got it working in just one night. Then I spent another two weeks polishing it. Ahhhhh, a joy of good old pure win32, MFC-free, just Windows and you and nothing in between. Unmanaged C++, LPTSTR, HWND, messages, win32 multith......

45 of 174 | Streaming XML filtering in Java and .NET - XML processing is changing. In Java SAX slowly but steadily goes away or at least goes into low level and nowadays Java with StAX is not so different from .NET XmlReader. I found it pretty interesting to compare approaches to streaming filtering XML in Java and .NET. Filtering is a very useful technique for transforming XML on the fly, while XML is being read. Filtering out parts or branches application isn't interested to process is a great way to simplify XML reading code, which is especially important in streaming XML processing which usually tends to be more complicated than in-memory based (XML DOM) processing. Let's say we have this dummy XML and we want to extract "interes......

2006 Aug 07

46 of 174 | Service Modeling Language based on XML Schema and Schematron - Microsoft, BEA, IBM, Cisco, Intel , HP etc mix XML Schema, Schematron and XPointer to create a draft of the Service Modeling Language (SML) used to model complex IT services and systems, including their structure, constraints, policies, and best practices. A model in SML is realized as a set of interrelated XML documents. The XML documents contain information about the parts of an IT service, as well as the constraints that each part must satisfy for the IT service to function properly. Constraints are captured in two ways: 1. Schemas - these are constraints on the structure and content of the documents in a model. SML uses a profile of XML Schema 1.0 [2,3] as the schema lan......

2006 Jul 26

47 of 174 | Anton Lapounov is blogging - Anton Lapounov is blogging! He's one of the brilliant guys responsible for XSLT in the Microsoft XML Team. If you are subscribed to my blog, you want to subscibe to "Anton Lapounov: XML XSLT and Beyond" blog too. ...

2006 Jul 14

48 of 174 | MSXML 6.0 SDK finally released - Microsoft finally released MSXML6 (aka Microsoft Core XML Services) SDK. I've been told it was expected back in December. Anyway, it's ready. Now it would be nice if Microsoft updated MSXSL utility to support MSXML6 (I know it was also ready back in December too). ...

2006 Jul 11

49 of 174 | How to validate XSLT output in .NET 2.0 - How would you validate XSLT output on the fly without caching transformation result as a whole? That's easy - just use MvpXslTransform class that adds to the XslCompiledTransform class ability to transform into XmlReader and wrap that reader witth a validating reader. As a result - streaming validation, no memory hogging and ability to abort transformation at first validation error. Simple sample below. XPathDocument doc = new XPathDocument("source.xml"); MvpXslTransform xslt = new MvpXslTransform(); xslt.Load("XSLTFile1.xslt"); XmlReader resultReader = xslt.Transform(new XmlInput(doc), null); XmlReaderSettings settings = new XmlReaderSettings(); settings.Valid......