[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] MSXML 4.0 (July) BUG: appendChild (RTF)
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('<new/>'); 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
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|