I am trying an XSLT transformation using the XslCompiledTransform class. I
get an exception when I call the Transform method. It seems to point to these
two lines:
<xsl:namespace name="{$schemaPrefix}" select="$schemaNamespace"/>
<xsl:namespace name="{$prefix}" select="$targetNamespace"/>
The exception looks like:
System.Xml.Xsl.XslTransformException: 'select' is not a recognized extension
element. An error occurred at c:\temp\xsdtowsdl.xsl(65,13).
at System.Xml.Xsl.Runtime.XmlQueryRuntime.ThrowExcept ion(String text)
at <xsl:template name="definitions">(XmlQueryRuntime
{urn:schemas-microsoft-com:xslt-debug}runtime, XPathNavigator
{urn:schemas-microsoft-com:xslt-debug}current)
at Root(XmlQueryRuntime {urn:schemas-microsoft-com:xslt-debug}runtime)
at Execute(XmlQueryRuntime {urn:schemas-microsoft-com:xslt-debug}runtime)
at System.Xml.Xsl.ExecuteDelegate.Invoke(XmlQueryRunt ime runtime)
at System.Xml.Xsl.XmlILCommand.Execute(Object defaultDocument,
XmlResolver da
taSources, XsltArgumentList argumentList, XmlSequenceWriter results)
at System.Xml.Xsl.XmlILCommand.Execute(Object defaultDocument,
XmlResolver dataSources, XsltArgumentList argumentList, XmlWriter writer,
Boolean closeWriter)
at System.Xml.Xsl.XmlILCommand.Execute(IXPathNavigabl e contextDocument,
XmlResolver dataSources, XsltArgumentList argumentList, XmlWriter results)
at System.Xml.Xsl.XslCompiledTransform.Transform(IXPa thNavigable input,
XsltArgumentList arguments, XmlWriter results)
The transformation seems to work OK when run from XmlSpy but I don't know
why this exception is raised. Any ideas?
Thank you.
Kevin Burton