> > I am moving some code forward from .NET 1.1. I was able to load the XSL file
> > and perform the transform. The MSDN documentation looks like it should be
[quoted text clipped - 11 lines]
> error message and if it refers to the stylesheet show us the relevant
> part of that.
> System.Xml.Xsl.XslCompiledTransform xslt = new XslCompiledTransform();
>
[quoted text clipped - 7 lines]
> The above code is within a try catch block and my error simply states
> e.Message = "XSLT compile error."
Well then don't be so lazy next time and examine the thrown exception
chain yourself with the debugger or by changing that try/catch code.
> What's odd is that the XSL worked fine in .NET 1.1
XML parsing has changed, lots of stuff that works with .NET 1.x for
security reason requires explict settings in .NET 2.0 to work.
> VersionTable.xsl:
>
[quoted text clipped - 3 lines]
> <!ENTITY mdash "—">
> <!ENTITY ndash "–"> ]>
One problem is the DOCTYPE declaration, the .NET 2.0 XML parser by
default gives an error on that, you have to explictly enable DTD
processing so you need code alike
XslCompiledTransform xsltProcessor = new XslCompiledTransform();
XmlReaderSettings settings = new XmlReaderSettings();
settings.ProhibitDtd = false;
settings.ValidationType = ValidationType.None;
xsltProcessor.Load(XmlReader.Create(@"VersionTable.xsl", settings));
to load that stylesheet.

Signature
Martin Honnen --- MVP XML
http://JavaScript.FAQTs.com/
andrewcw - 30 Jul 2006 17:00 GMT
Thank You very much ! It works !!!

Signature
Andrew
> > System.Xml.Xsl.XslCompiledTransform xslt = new XslCompiledTransform();
> >
[quoted text clipped - 35 lines]
>
> to load that stylesheet.