INFO: List of Issues Fixed in MSXML 4.0 SP2 (Part 3 of 4)

Article translations Article translations
Article ID: 818084 - View products that this article applies to.
This article has been archived. It is offered "as is" and will no longer be updated.
Expand all | Collapse all

SUMMARY

The Current() Function Is Not Evaluated Correctly in the XPath Expression That is Specified for the Use Attribute of an Xsl:key

In MSXML4.0 RM and SP1, when you use the current() function to relate the value of the current matched node to a node that is not a child element or an attribute of the matched node, output is not generated on executing the XSLT transformation.

To reproduce the problem, use the following .xml and .xsl files:

Test.xsl
<?xml version="1.0"?>
<xsl:stylesheet version="1.0"
        xmlns:xsl="http://www.w3.org/1999/XSL/Transform">

  <xsl:output method="xml" omit-xml-declaration="yes" indent = "yes"/>

  <xsl:key name = 'test' match = 'Book' use = "/testcase/BooksAuthors/BookAuthor[@bookid = current()/@bookid]/@authorid"/>

  <xsl:template match = "/">
    <TESTRESULT>
      <xsl:for-each select = "key('test','1')">
        <xsl:copy-of select = "."/>
      </xsl:for-each>
    </TESTRESULT>
  </xsl:template>
</xsl:stylesheet>
Test.xml
<testcase>
  <Authors>
    <Author authorid = "1" name = "author 1"/>
    <Author authorid = "2" name = "author 2"/>
    <Author authorid = "3" name = "author 3"/>
  </Authors>
  <Books>
    <Book bookid = "a" name = "book a"/>
    <Book bookid = "b" name = "book b"/>
    <Book bookid = "c" name = "book c"/>
  </Books>
  <BooksAuthors>
    <BookAuthor bookauthorid = "x" bookid = "a" authorid = "1"/>
    <BookAuthor bookauthorid = "y" bookid = "a" authorid = "2"/>
    <BookAuthor bookauthorid = "z" bookid = "b" authorid = "1"/>
    <BookAuthor bookauthorid = "w" bookid = "b" authorid = "3"/>
  </BooksAuthors>
</testcase>

Fix: XmlHttp.Send Method Does Not Accept VT_BSTR | VT_BYREF Variables

In MSXML 4.0 RTM and SP1, when you use the XmlHttp object to execute HTTP requests by passing VT_BSTR | VT_BYREF strings to the Send method, you receive the following error message:
Parameter is incorrect

Fix: Program Stops Responding When You Use 'xsl:message terminate="yes"' in Xsl:variable

In MSXML 4.0 RTM and SP1, the program stops responding (or hangs) when you use 'xsl:message with terminate="yes"' in an xsl:variable.

Message.xsl
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" >
<xsl:template match="/">
<xsl:variable name="var">
<xsl:message terminate="yes">crash and hang</xsl:message>
</xsl:variable>
</xsl:template>
</xsl:stylesheet>

Fix: The Current() Function Is Not Evaluated Correctly When Used in the @Select Attribute of <xsl:sort>

In MSXML 4.0 RTM and SP1, when you use the current() function in the @select attribute of <xsl:sort>, the current() function is not evaluated correctly.

To reproduce the problem, use the following .xml and .xsl files:

Sort.xsl
<?xml version="1.0"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="xml" indent="yes"/>
<xsl:template match="/">
<output>
<xsl:for-each select="root/*">
<xsl:sort select="count(preceding-sibling::*[name() != name(current())][1]/preceding-sibling::*)" data-type="number" order="ascending"/>
<xsl:sort select="@priority" data-type="number" order="ascending"/>
<xsl:copy-of select="."/>
</xsl:for-each>
</output>
</xsl:template>
</xsl:stylesheet>
Sort.xml
<root>
<itemA priority="2"/>
<itemA priority="7"/>
<itemA priority="5"/>
<itemA priority="3"/>
<itemB priority="1"/>
<itemB priority="0"/>
<itemA priority="8"/>
<itemA priority="6"/>
<itemC priority="2"/>
<itemC priority="1"/>
<itemC priority="3"/>
<itemA priority="9"/>
<itemA priority="4"/>
</root>

Fix: Resetting an Empty Nodelist Causes a Null Reference and General Protection Failure

In MSXML4.0 RTM and SP1, when the empty nodelist is reset, it causes a general protection failure because of a Null reference.

Fix: Program Stops Responding Under Stress When You Run Transformations on Cached XML

In MSXML 4.0 RTM and SP1, memory corruption causes random crashes during XSL transformations on multiple-processor computers. This behavior occurs under stress when you execute transformations from multiple threads on cached XML data.

Fix: Format-Number of Certain 18 Digit Numbers Causes Access Violation

In MSXML4.0 RTM and SP1, when you use the format-number function in XSLT while transforming XML data, an access violation occurs. The problem occurs when you use 18 digit numbers.

To reproduce the problem, use the following .xml and .xsl files:

Format.xsl
<?xml version='1.0'?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<xsl:template match="/">
<xsl:for-each select="Test/Data">
<xsl:value-of select="."/>
<!--xsl:value-of select="format-number(current(),'#.#######')"/-->
</xsl:for-each> 
</xsl:template>
</xsl:stylesheet>
Format.xml
<Test>
<Data>101101900000350196</Data>
</Test>

Fix: Get_schemaLocation() Causes Access Violation for Included Schemas

In MSXML4.0 RTM and SP2, when you try to use the get_schemaLocation() method for included schemas, an access violation occurs.

REFERENCES

For additional information, click the following article numbers to view the articles in the Microsoft Knowledge Base:
818081 INFO: List of Issues Fixed in MSXML 4.0 SP2 (Part 1 of 4)
818083 INFO: List of Issues Fixed in MSXML 4.0 SP2 (Part 2 of 4)
818085 INFO: List of Issues Fixed in MSXML 4.0 SP2 (Part 4 of 4)

Properties

Article ID: 818084 - Last Review: February 27, 2014 - Revision: 1.2
APPLIES TO
  • Microsoft XML Core Services 4.0 Service Pack 1
Keywords: 
kbnosurvey kbarchive KB818084

Contact us for more help

Contact us for more help
Connect with Answer Desk for expert help.
Get more support from smallbusiness.support.microsoft.com