[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

MSXML 4.0 (July) BUG: appendChild (RTF)

Subject: MSXML 4.0 (July) BUG: appendChild (RTF)
From: "Alexander Gutman" <gutman@xxxxxxxxxxxxxxx>
Date: Sun, 29 Jul 2001 14:33:17 +0700
appendchild type mismatch
Hello, friends.

Let's use MSXML 3.0 and transform any XML document via this:

  <xsl:transform version="1.0"
    xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
    xmlns:msxsl="urn:schemas-microsoft-com:xslt"
    xmlns:x="urn:extension">

    <msxsl:script language="JScript" implements-prefix="x">
      var ver = '3.0';
      var xml = new ActiveXObject('Msxml2.DOMDocument.'+ver);
      xml.loadXML('&lt;new/&gt;');
      function add(rtf){
        xml.documentElement.appendChild(rtf);
        return true;
      }
    </msxsl:script>

    <xsl:template match="/">
      <result>
        <xsl:variable name="rtf"><one/><two/></xsl:variable>
        <xsl:if test="x:add($rtf)"/>
      </result>
    </xsl:template>

  </xsl:transform>

Then we obtain a "Type mismatch" error, as expected.
But if we replace the ver's value with '4.0'
and use MSXML 4.0 (July), then we obtain the following:

  The instruction at "0x69b6013c" referenced memory at "0x80004002".
  The memory could not be "read".

In MSXML 4.0 SDK we read:

  The DocumentFragment node has special, defined behavior
  for IXMLDOMNode insert operations that makes it especially
  convenient for developers. When an IXMLDOMDocumentFragment
  is inserted into a DOMDocument node (or other node that
  can take children), the children of the DocumentFragment are
  inserted into the node rather than the DocumentFragment itself.

I think, the above-reported bug is an attempt to realize this behavior.
Whenever the bug will be fixed, the above example will probably work.

-- 
Alexander E. Gutman

 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.