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

RE: using msxml.dll's xslt with c++

Subject: RE: using msxml.dll's xslt with c++
From: Mark Birbeck <Mark.Birbeck@xxxxxxxxxxxxx>
Date: Fri, 3 Mar 2000 18:28:45 -0000
cxmldomdocument
Ryan connolly wrote:
> I'm able to do the simple transformation -- merge an XML 
> document with a
> XSL stylesheet, but the problems start when I start using entity
> references in the XML document.  As soon as I include an entity
> reference (just a reference to another system file), the 
> transformation
> result file is nearly blank.  Yet the same XML/XSL file combinations
> loads and displays correctly in IE5.

Might be worth putting your code up, so we can see what might be wrong,
but in the meantime here's some thoughts.

There are a few things you have to watch. First make sure that you wait
for the XML and XSL documents to finish loading before you try and do a
transformation. It may be that with the external references they are
taking longer to load, which is why it goes wrong then. Check the
property. Also there are flags for resolving externals and stuff which
might also be worth investigating.

If it helps, here's the constructor I use for my XML document class,
that sets the flags I just mentioned to suitable default values:

class CXMLDOMDocument
{
public:
	CXMLDOMDocument();
	CXMLDOMDocument(IXMLDOMDocument *pIDoc);
	virtual ~CXMLDOMDocument();

	[various methods]
private:
	IXMLDOMDocument *m_pDoc;
};

CXMLDOMDocument::CXMLDOMDocument()
{
	HRESULT hr = CoCreateInstance(CLSID_DOMDocument, NULL,
		CLSCTX_INPROC_SERVER, IID_IXMLDOMDocument,
		(LPVOID *)&m_pDoc);
	if (S_OK == hr)
	{
		m_pDoc->put_async(VARIANT_FALSE);
		m_pDoc->put_resolveExternals(VARIANT_FALSE);
		m_pDoc->put_validateOnParse(VARIANT_FALSE);
	}
	else
		m_pDoc = NULL;

}

Best regards,

Mark Birbeck
x-port.net Ltd.


 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.