I'm writing an xslt template for html output. I'm using the XslTransform class, and loading the xslt from an embedded resource string. The error I'm getting is in the load function and is "'xsl:apply-template' cannot be a child of 'xsl:for-each' element". Now this doesn't make any sense to me, as I've used apply-template countless times under a for-each element. I usually use the MSXML COM objects for xslt transforms, but I'm trying to move a completely managed platform. Is this a restriction in xslt that only .net enforces? Or am I doing something wrong in my load function?
_questionFormatter = new XslTransform(); Assembly thisAssembly = Assembly.GetExecutingAssembly(); Stream stream = thisAssembly.GetManifestResourceStream("NBR.WebSurvey.FormatQuestions.xslt") ; if (stream != null) { XmlReader reader = new XmlTextReader(stream); _questionFormatter.Load(reader); reader.Close(); stream.Close(); } Thanks, Erick You can read messages from the DOTNET archive, unsubscribe from DOTNET, or subscribe to other DevelopMentor lists at http://discuss.develop.com.