By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
444,190 Members | 1,503 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 444,190 IT Pros & Developers. It's quick & easy.

Not recognized extension element on transform

P: n/a
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
Dec 3 '06 #1
Share this Question
Share on Google+
5 Replies


P: n/a
* Kevin Burton wrote in microsoft.public.dotnet.xml:
>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"/>
XSLT 1.0 does not include a xsl:namespace element.
>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).
The 'select' above is not an element, so either you misread the error
message or it is very poorly phrased.
--
BjŲrn HŲhrmann ∑ mailto:bj****@hoehrmann.de ∑ http://bjoern.hoehrmann.de
Weinh. Str. 22 ∑ Telefon: +49(0)621/4309674 ∑ http://www.bjoernsworld.de
68309 Mannheim ∑ PGP Pub. KeyID: 0xA4357E78 ∑ http://www.websitedev.de/
Dec 3 '06 #2

P: n/a

I just posted the error message (stack trace). I think that the processor is
confused since the xsl:namespace is not a recognized element.

Thank you for the response. This is good information. Where could I look to
find the supported elements?

Kevin

"Bjoern Hoehrmann" wrote:
* Kevin Burton wrote in microsoft.public.dotnet.xml:
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"/>

XSLT 1.0 does not include a xsl:namespace element.
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).

The 'select' above is not an element, so either you misread the error
message or it is very poorly phrased.
--
Björn Höhrmann · mailto:bj****@hoehrmann.de · http://bjoern.hoehrmann.de
Weinh. Str. 22 · Telefon: +49(0)621/4309674 · http://www.bjoernsworld.de
68309 Mannheim · PGP Pub. KeyID: 0xA4357E78 · http://www.websitedev.de/
Dec 4 '06 #3

P: n/a
Apparently this element is included with XSLT 2.0 (XmlSpy seems to recognize
this). How can I get the .net Xsl classes to use 2.0?
"Bjoern Hoehrmann" wrote:
* Kevin Burton wrote in microsoft.public.dotnet.xml:
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"/>

XSLT 1.0 does not include a xsl:namespace element.
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).

The 'select' above is not an element, so either you misread the error
message or it is very poorly phrased.
--
Björn Höhrmann · mailto:bj****@hoehrmann.de · http://bjoern.hoehrmann.de
Weinh. Str. 22 · Telefon: +49(0)621/4309674 · http://www.bjoernsworld.de
68309 Mannheim · PGP Pub. KeyID: 0xA4357E78 · http://www.websitedev.de/
Dec 4 '06 #4

P: n/a
Kevin Burton wrote:
Where could I look to
find the supported elements?
MSDN has this reference
<http://msdn2.microsoft.com/en-us/library/ms256069.aspx>, it is
originally for MSXML, Microsoft's COM based XML software package but
XslCompiledTransform in .NET supports XSLT 1.0 as well and the same
extension element (mxsl:script).

--

Martin Honnen --- MVP XML
http://JavaScript.FAQTs.com/
Dec 4 '06 #5

P: n/a
Kevin Burton wrote:
Apparently this element is included with XSLT 2.0 (XmlSpy seems to recognize
this). How can I get the .net Xsl classes to use 2.0?
XslCompiledTransform does only support XSLT 1.0. If you currently want
to use XSLT 2.0 with .NET then you need to use Saxon from
<http://www.saxonica.com/>.
--

Martin Honnen --- MVP XML
http://JavaScript.FAQTs.com/
Dec 4 '06 #6

This discussion thread is closed

Replies have been disabled for this discussion.