Microsoft KB Archive/262125

= FIX: XSL &quot;//&quot; Pattern Returns Each Node Twice from a Linked XML Document =

Article ID: 262125

Article Last Modified on 10/15/2002

-

APPLIES TO


 * Microsoft XML Parser 2.0

-



This article was previously published under Q262125



SYMPTOMS
The MSXML 2.0 parser returns each node in the Document Object Model (DOM) two times when the XSL search pattern &quot;//&quot; is used. This occurs only when an XSL stylesheet is used to transform a linked XML document.



RESOLUTION
To work around this problem, upgrade to the MSXML 2.5 or later parser, or use explicit search patterns rather than the &quot;//&quot; pattern to retrieve nodes from a linked XML document.



STATUS
Microsoft has confirmed that this is a bug in the Microsoft products that are listed at the beginning of this article.

This bug has been corrected in version 2.5 of the MSXML parser. To download the latest version of the parser, go to http://msdn.microsoft.com/xml/default.asp.



Steps to Reproduce Behavior
To reproduce this behavior, insert the following code into a new document, and save the document as repro.xsl:  Using &quot;xsllink/XML/ITEM&quot;, each node is returned one time.

In MSXML 2.0, this &quot;//ITEM&quot; outputs every node two times.  Insert the following code into a new document, and save it in the same location as the previous document as data.xml:   1 2 3  </XML> Finally, insert the following code into a new document, and save it in the same location as the previous two documents as bug.xml: <?xml:stylesheet type=&quot;text/xsl&quot; href=&quot;repro.xsl&quot;?> <XML xmlns:dt=&quot;urn:uuid:C2F41010-65B3-11d1-A29F-00AA00C14882/&quot;>  1</SUBITEM1> 2</SUBITEM2> 3</SUBITEM3> </WWITEM> </XML> Using an Internet Explorer Web browser on a computer with version 2.0 of the MSXML parser installed, browse to the bug.xml file. The data returned from the query using the &quot;//&quot; pattern represents each node two times.

Keywords: kbbug kbfix kbmsxml250fix kbmsxmlnosweep KB262125

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.