Microsoft Knowledge Base Article
This article contents is Microsoft Copyrighted material.
©2005-©2007 Microsoft Corporation. All rights reserved.
Terms
of Use |
Trademarks
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
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.
The problem is discussed here for reference purposes only.
Use the
current namespace and its corresponding methods instead of the previous namespaces and methods.
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://kbalertz.com/Feedback.aspx?kbNumber=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:
Steps to Reproduce Behavior
- 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>
- 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="http://support.microsoft.com">
<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>
- 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.
| kbbug kbfix kbmsxml300sp1fix kbmsxmlnosweep KB291595 |
Community Feedback System
Very often, it takes hours to solve a problem. Very often, you've looked high
and low, and have tried a lot of solutions. When you finally found it, chances
are, it was because someone else helped you. Here's your chance to give back.
Use our community feedback tool to let others know what worked for you and what
didn't.
Please also understand that the community feedback system is not warranted to be
correct, it's simply a system that we've built to let people try and help each
other. If something in a feedback response doesn't make sense to you, or you're
not comfortable making changes that the feedback talks about (like registry
edits), please consult a professional.
Thank you for using kbAlertz.com Feedback System.
-- Scott Cate