Hi guys,

I have an XSL which uses the following:

<xsl:import href="../lib/ads.xsl" />

and in my XSL i'm using a "Names Template" which is defined in that import.

I'm loading this XSL using the following commands:

CComPtr<IXMLDOMDocument2> pDoc;




CComPtr<IXSLTemplate> pTemp;



I'm getting an error "Named template 'ads' does not exist in the stylesheet".

When I tried using "msxml2.FreeThreadedDOMDocument.5.0" and "msxml2.XSLTemplate.5.0" it works fine.

I thought it might be an old version problem. but when i tried using "msxml2.FreeThreadedDOMDocument.6.0" and "msxml2.XSLTemplate.6.0" it did not work again.

Anyone has an idea or refer me to the problem i've got


Re: Visual C++ General XSLTemplate

Holger Grund

I'm not really an MSXML expert and it's probably off-topic for this forum anyway, but it could be due to the MS security paranoia. I think MSXML 6 change some defaults for existing settings and added a couple of properties to be secure by default. An import - even file based - might be subject to the limitations by default.

You may ask this question in the XML newsgroups (


Re: Visual C++ General XSLTemplate


I started having this same problem, right around the same date.... tried all sorts of suffixes (.4.0 .5.0) but to no avail. Seems that it broke with the release of an XML patch on 8/14/2007.

anyone, please recommend how to fix!