Article ID: 291595 - Last Review: October 16, 2002 - Revision: 1.4

FIX: XQL Operator "//" Matching in MSXML 3.0 Is Not Backward Compatible

This article was previously published under Q291595

On This Page

Expand all | Collapse all

SYMPTOMS

The "http://www.w3.org/TR/WD-xsl" namespace in MSXML versions earlier than 3.0 allows the XQL recursive descent (//) operator to be followed by nothing. The "http://www.w3.org/1999/XSL/Transform" namespace in MSXML version 3.0 does not allow the // operator to be followed by nothing.

RESOLUTION

The problem is discussed here for reference purposes only.

Use the current namespace and its corresponding methods instead of the previous namespaces and methods.

STATUS

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

This bug was corrected in Microsoft XML 3.0 Service Pack 1.

For additional information on other fixes included in Microsoft XML 3.0 Service Pack 1, click the article number below to view the article in the Microsoft Knowledge Base:
292935  (http://support.microsoft.com/kb/292935/EN-US/ ) INFO: List of Issues Fixed in Microsoft XML 3.0 Service Pack 1
For the latest information and downloads of MSXML, refer to the following MSDN Web site at:
http://msdn.microsoft.com/xml/default.asp (http://msdn.microsoft.com/xml/default.asp)

MORE INFORMATION

Steps to Reproduce Behavior

  1. Paste the following code into a new text document, and save the file as Repro.xml:
    <?xml version='1.0' encoding='ISO-8859-1'?>
    <?xml-stylesheet type="text/xsl" href="repro.xsl"?>
    <ROOT>
     <MESSAGE>
      <font color="red">red text</font>
     </MESSAGE>
    </ROOT> 
    					
  2. Paste the following text into another new document, and save the file as Repro.xsl in the same location as the XML file you just created:
    <?xml version='1.0' encoding='ISO-8859-1'?>
    <xsl:stylesheet xmlns:xsl="http://www.w3.org/TR/WD-xsl">
      <xsl:template match="/">
        <xsl:apply-templates select="ROOT" />
      </xsl:template>
      <xsl:template match="ROOT">
        <xsl:for-each select="MESSAGE">
          <xsl:apply-templates select="." />
        </xsl:for-each>
      </xsl:template>
      <xsl:template match="MESSAGE//"><xsl:copy><xsl:apply-templates select="@*"/><xsl:apply-templates /></xsl:copy></xsl:template>
    </xsl:stylesheet>
    					
  3. In Microsoft Internet Explorer, browse to Repro.xml. In MSXML 2.5, the output data shows the following:
    <MESSAGE><font color="red">red text</font></MESSAGE> 
    					
    In MSXML 3.0, the output data shows the following:
    <MESSAGE><font>red text</font></MESSAGE>
    					
    Note that the color="red" attribute section is missing in the MSXML 3.0 output data. The output text "red text" appears in red colour in MSXML 2.5 and in black MSXML 3.0.

APPLIES TO
  • Microsoft XML Parser 3.0
Keywords: 
kbbug kbfix kbmsxml300sp1fix kbmsxmlnosweep KB291595
 

Article Translations