<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.msdn.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Indexing XML, XML ids and a better GetElementByID method on the XmlDocument class</title><link>http://blogs.msdn.com/mfussell/archive/2004/02/12/71700.aspx</link><description>One question that I get is &amp;#8220;How can you index an XML document? If you had indexes, all your lookups would be many times faster rather than having to walk the entire XML document?&amp;#8221; The XML 1.0 specification has no ability to index a document</description><dc:language>en-US</dc:language><generator>CommunityServer 2.1 SP1 (Build: 61025.2)</generator><item><title>Indexing XML with a Custom XmlDocument</title><link>http://blogs.msdn.com/mfussell/archive/2004/02/12/71700.aspx#71893</link><pubDate>Thu, 12 Feb 2004 19:15:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:71893</guid><dc:creator>The XML Files</dc:creator><description /></item><item><title>Indexer un document XML</title><link>http://blogs.msdn.com/mfussell/archive/2004/02/12/71700.aspx#71940</link><pubDate>Thu, 12 Feb 2004 21:02:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:71940</guid><dc:creator>Julien Cheyssial's Blog (FR)</dc:creator><description /></item><item><title>re: Indexing XML, XML ids and a better GetElementByID method on the XmlDocument class</title><link>http://blogs.msdn.com/mfussell/archive/2004/02/12/71700.aspx#72415</link><pubDate>Fri, 13 Feb 2004 12:37:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:72415</guid><dc:creator>Dimitre Novatchev</dc:creator><description>This would be a very useful feature and will be best extended not only to store an id attribute's value but to generate and maintain an id for every type of node.&lt;br&gt;&lt;br&gt;Yes, I need something with the functionality of the standard XSLT function generate-id() with time complexity much better than the O(N^2) exhibited by the current .Net XSLT implementation.&lt;br&gt;&lt;br&gt;Therefore, why not just fix generate-id() itself and also the current xsl:key implementation?&lt;br&gt;&lt;br&gt;Let me assure you that this is really very much needed by all XSLT programmers and not just an exercise for the curious of us.&lt;br&gt;&lt;br&gt;Cheers,&lt;br&gt;&lt;br&gt;Dimitre Novatchev [XML MVP],&lt;br&gt;FXSL developer, XML Insider,&lt;br&gt;&lt;br&gt;&lt;a target="_new" href="http://fxsl.sourceforge.net/"&gt;http://fxsl.sourceforge.net/&lt;/a&gt; -- the home of FXSL&lt;br&gt;Resume: &lt;a target="_new" href="http://fxsl.sf.net/DNovatchev/Resume/Res.html"&gt;http://fxsl.sf.net/DNovatchev/Resume/Res.html&lt;/a&gt;&lt;br&gt;</description></item><item><title>re: Indexing XML, XML ids and a better GetElementByID method on the XmlDocument class</title><link>http://blogs.msdn.com/mfussell/archive/2004/02/12/71700.aspx#72948</link><pubDate>Sat, 14 Feb 2004 13:23:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:72948</guid><dc:creator>RichB</dc:creator><description>{pedant}&lt;br&gt;&lt;br&gt;You have used invalid URN syntax.&lt;br&gt;&lt;br&gt;rfc2141 (URN Syntax) states:&lt;br&gt;&lt;br&gt;All URNs have the following syntax (phrases enclosed in quotes are REQUIRED):&lt;br&gt;&lt;br&gt;            &amp;lt;URN&amp;gt; ::= &amp;quot;urn:&amp;quot; &amp;lt;NID&amp;gt; &amp;quot;:&amp;quot; &amp;lt;NSS&amp;gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;{/pedant}</description></item><item><title>re: Indexing XML, XML ids and a better GetElementByID method on the XmlDocument class</title><link>http://blogs.msdn.com/mfussell/archive/2004/02/12/71700.aspx#74587</link><pubDate>Tue, 17 Feb 2004 06:34:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:74587</guid><dc:creator>Mark Fussell</dc:creator><description>Yes, the implementation of xsl:key in the .NET XSLT 1.0 and 1.1 processor had a bad bug. In the next Service Pack (SP) due to be released for .NET 1.0 and .NET 1.1 this has been fixed. I am sure that you know of this KB &lt;a target="_new" href="http://support.microsoft.com/default.aspx?scid=kb;EN-US;324478"&gt;http://support.microsoft.com/default.aspx?scid=kb;EN-US;324478&lt;/a&gt;&lt;br&gt;&lt;br&gt;The generate-id function although useful for generating id values for HTML anchors via href, cannot be used with the xsl:key or xsl:id functions which is a limitation. However adding a new user defined method to XSL to do this is a good idea. I will also look into the 0^2 behavior. As I mentioned at PDC 2003 we have done a lot of work to increase the perf of the XSLT processor in .NET V2.0</description></item><item><title>re: Indexing XML, XML ids and a better GetElementByID method on the XmlDocument class</title><link>http://blogs.msdn.com/mfussell/archive/2004/02/12/71700.aspx#75839</link><pubDate>Wed, 18 Feb 2004 22:13:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:75839</guid><dc:creator>Dimitre Novatchev</dc:creator><description>generate-id() *can* be used with xsl:key (e.g. in the &amp;quot;use&amp;quot; attribute) and correspondingly with the key() function and this use is not at all rare.&lt;br&gt;&lt;br&gt;If you need concrete examples, I will be glad to provide them.&lt;br&gt;&lt;br&gt;As for the coming fix, I knew this a year ago -- the problem is the fix is still not available.&lt;br&gt;&lt;br&gt;Please, understand me correctly -- we are accustomed with the unprecedented quality and performance of MSXML4 and would expect the same from dotNet XslTransform, especially taking into account that it is much more easier to write an XSLT processor in a modern, garbage-collected language than in C++.&lt;br&gt;&lt;br&gt;Thank you,&lt;br&gt;&lt;br&gt;Dimitre Novatchev.&lt;br&gt;&lt;br&gt; </description></item><item><title>re: Indexing XML, XML ids and a better GetElementByID method on the XmlDocument class</title><link>http://blogs.msdn.com/mfussell/archive/2004/02/12/71700.aspx#76046</link><pubDate>Thu, 19 Feb 2004 04:52:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:76046</guid><dc:creator>Steve Saxon</dc:creator><description>This is a pretty neat way to work around the DTD/schema limitation.&lt;br&gt;&lt;br&gt;Probably worth pointing out it would be really easy to build much the same thing for XPathDocument (now that the DOM is dead!).&lt;br&gt;&lt;br&gt;You would derive from XPathDocument, and have a custom XmlReader that worked together with the reader. You hook the reader's Read() method to trap when you're on an element, and as one flys by, you look for the id attribute and pass it back to your XPathDocument-derived class through some internal method.&lt;br&gt;&lt;br&gt;If you then added the XPath function extension to bind the id, that would work for this too, by the power of XPathNavigator.&lt;br&gt;&lt;br&gt;BTW, the link for the XPath function extensions should be;&lt;br&gt;&lt;a target="_new" href="http://msdn.microsoft.com/library/en-us/dnexxml/html/xml10212002.asp"&gt;http://msdn.microsoft.com/library/en-us/dnexxml/html/xml10212002.asp&lt;/a&gt;</description></item><item><title>re: Indexing XML, XML ids and a better GetElementByID method on the XmlDocument class</title><link>http://blogs.msdn.com/mfussell/archive/2004/02/12/71700.aspx#76135</link><pubDate>Thu, 19 Feb 2004 08:50:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:76135</guid><dc:creator>little things...</dc:creator><description>Missing from here:&lt;br&gt;- how to handle node removal from the document?&lt;br&gt;- how to handle node insertion in a document fragment?</description></item><item><title>re: Indexing XML, XML ids and a better GetElementByID method on the XmlDocument class</title><link>http://blogs.msdn.com/mfussell/archive/2004/02/12/71700.aspx#76285</link><pubDate>Thu, 19 Feb 2004 13:59:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:76285</guid><dc:creator>Dimitre Novatchev</dc:creator><description>For a pure XSLT solution of a closely related problem -- to assign ids to nodes -- see the thread &amp;quot;Counting nodes efficiently&amp;quot; in the xsl-list:&lt;br&gt;&lt;br&gt;&lt;a target="_new" href="http://aspn.activestate.com/ASPN/Mail/Message/XSL-List/2002866"&gt;http://aspn.activestate.com/ASPN/Mail/Message/XSL-List/2002866&lt;/a&gt;&lt;br&gt;&lt;br&gt;The generated &amp;quot;_id&amp;quot; attribute can be easily used with a corresponding definition of an xsl:key and then with the key() function.</description></item><item><title>XML Bestiary: IndexingXPathNavigator</title><link>http://blogs.msdn.com/mfussell/archive/2004/02/12/71700.aspx#90424</link><pubDate>Tue, 16 Mar 2004 16:21:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:90424</guid><dc:creator>Signs on the Sand</dc:creator><description>Here I go again with another experimental creature from my XML Bestiary: IndexingXPathNavigator. This one was inspired by Mark Fussell's &amp;quot;Indexing XML, XML ids and a better GetElementByID method on the XmlDocument class&amp;quot;. I've been experimenting with Mark's extended XmlDocument, played a bit with XPathDocument and &amp;quot;idkey()&amp;quot; extension function Mark...</description></item><item><title>xml:id gets First Working Draft</title><link>http://blogs.msdn.com/mfussell/archive/2004/02/12/71700.aspx#111497</link><pubDate>Mon, 12 Apr 2004 14:49:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:111497</guid><dc:creator>Signs on the Sand</dc:creator><description>In related news - The XML Core Working Group has released the First Public Working Draft of xml:id Version 1.0. The specification introduces a predefined attribute name that can always be treated as an ID and hence can always be recognized. What can be said? At last! Finally! xml:id Version...</description></item></channel></rss>