472,145 Members | 1,513 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,145 software developers and data experts.

Not recognized extension element on transform

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
5 8346
* 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

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
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
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
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.

Similar topics

reply views Thread by bruce mcdonald | last post: by
1 post views Thread by Fisch von Gestern | last post: by
5 posts views Thread by Jeffry van de Vuurst | last post: by
reply views Thread by Ganesh Kolappan via .NET 247 | last post: by
reply views Thread by Saiars | last post: by
reply views Thread by leo001 | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.