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

RE: MSXML3 transformNodeToObject method error

Subject: RE: MSXML3 transformNodeToObject method error
From: "Martin Rowlinson \(MarrowSoft\)" <marrow@xxxxxxxxxxxxxx>
Date: Wed, 20 Aug 2003 07:12:44 +0100
transformnodetoobject
Hi Brook,

If you are going to use .transformNodeToObject() you would be well
advised not to specify the second parameter (the output) as an XML DOM
if the stylesheet is producing HTML (i.e. method="html").  This is
because HTML output will often not constitute well-formed XML -
therefore an attempt to push it into an XML DOM will result in an error.

The second parameter of .transformNodeToObject() can also be any object
whose interface supports a .write() method - allowing the output to be
written directly to that object.  In your case, using ASP, you could
specify the Response object, e.g.
     source.transformNodeToObject(stylesheet, Response);

However...

> When I run it, I get this error:
>
>    The stylesheet does not contain a document element. The stylesheet
may
> be empty, or it may not be a well-formed XML document.

Sounds like the stylesheet wasn't actually loaded into the DOM
successfully.
The .load() method returns a boolean result denoting the success of the
load - you'd be as well to check that result ;)

HTH
Marrow
http://www.marrowsoft.com - home of Xselerator (XSLT IDE and debugger)
http://www.topxml.com/Xselerator




 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.