HighTechTalks DotNet Forums  

XslTransform.Transform fails when xsl contains node-set() Function

Dotnet XML microsoft.public.dotnet.xml


Discuss XslTransform.Transform fails when xsl contains node-set() Function in the Dotnet XML forum.



Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old   
John Sever
 
Posts: n/a

Default XslTransform.Transform fails when xsl contains node-set() Function - 04-02-2004 , 05:39 AM






My transform in cludes a variable that holds a node set from the node-set()
extension function. It the transformation works fine when using MSXML2 or
msxsl.exe but not in VB.Net.

My code looks something like this:

Dim XP as New XPathDocument(XMLFileName)
Dim XSLT as New XslTransform
XSLT.Load(XSLTFileName)
Dim Out as New MemoryStream
XSLT.Transform(XP.CreateNavigaotr, Nothing, Out, Nothing) <-- Fails on this
line
Out.Position = 0
Dim XML as New XmlDocument
XML.LoadXml(New StreamReader(Out).ReadToEnd)

The exception says:
System.Xml.Xsl.XsltException: Function 'msxsl:node-set()' has failed. --->
System.Xml.Xsl.XsltException: Cannot convert the operand to 'Result tree
fragment'.

I've spent days trying to figure it out with no luck. Any suggestions?



Reply With Quote
  #2  
Old   
Martin Honnen
 
Posts: n/a

Default Re: XslTransform.Transform fails when xsl contains node-set() Function - 04-02-2004 , 07:22 AM








John Sever wrote:
Quote:
My transform in cludes a variable that holds a node set from the node-set()
extension function. It the transformation works fine when using MSXML2 or
msxsl.exe but not in VB.Net.

My code looks something like this:

Dim XP as New XPathDocument(XMLFileName)
Dim XSLT as New XslTransform
XSLT.Load(XSLTFileName)
Dim Out as New MemoryStream
XSLT.Transform(XP.CreateNavigaotr, Nothing, Out, Nothing) <-- Fails on this
line
Out.Position = 0
Dim XML as New XmlDocument
XML.LoadXml(New StreamReader(Out).ReadToEnd)

The exception says:
System.Xml.Xsl.XsltException: Function 'msxsl:node-set()' has failed. ---
System.Xml.Xsl.XsltException: Cannot convert the operand to 'Result tree
fragment'.

I've spent days trying to figure it out with no luck. Any suggestions?
I don't think that .NET supports the node-set function.
--

Martin Honnen
http://JavaScript.FAQTs.com/



Reply With Quote
  #3  
Old   
Dimitre Novatchev [MVP XML]
 
Posts: n/a

Default Re: XslTransform.Transform fails when xsl contains node-set() Function - 04-02-2004 , 08:25 AM



And where is your XSLT code?


"John Sever" <johnsever (AT) cascon (DOT) com> wrote

Quote:
My transform in cludes a variable that holds a node set from the
node-set()
extension function. It the transformation works fine when using MSXML2 or
msxsl.exe but not in VB.Net.

My code looks something like this:

Dim XP as New XPathDocument(XMLFileName)
Dim XSLT as New XslTransform
XSLT.Load(XSLTFileName)
Dim Out as New MemoryStream
XSLT.Transform(XP.CreateNavigaotr, Nothing, Out, Nothing) <-- Fails on
this
line
Out.Position = 0
Dim XML as New XmlDocument
XML.LoadXml(New StreamReader(Out).ReadToEnd)

The exception says:
System.Xml.Xsl.XsltException: Function 'msxsl:node-set()' has failed. ---
System.Xml.Xsl.XsltException: Cannot convert the operand to 'Result tree
fragment'.

I've spent days trying to figure it out with no luck. Any suggestions?





Reply With Quote
  #4  
Old   
Dimitre Novatchev [MVP XML]
 
Posts: n/a

Default Re: XslTransform.Transform fails when xsl contains node-set() Function - 04-02-2004 , 08:44 AM




"Dimitre Novatchev [MVP XML]" <dnovatchev (AT) yahoo (DOT) com> wrote

Quote:
And where is your XSLT code?
By asking this I wanted to say that I have many examples of code, containing
the xxx:node-set() extension function, that works OK with the .Net Framework
1.1

Also, Msxml2 didn't implement XSLT -- it did implement an obsolete WD
dialect, which is no longer supported in either MSXML4 or .Net XslTransform.

Actually, what the error message says is quite clear -- you haven't provided
an RTF as argument to msxsl:node-set(), but something else -- e.g a string
or a number.

Show us your code and anyone will be able to point out the exact cause of
this error.


Cheers,

Dimitre Novatchev [XML MVP],
FXSL developer, XML Insider,

http://fxsl.sourceforge.net/ -- the home of FXSL
Resume: http://fxsl.sf.net/DNovatchev/Resume/Res.html


Quote:

"John Sever" <johnsever (AT) cascon (DOT) com> wrote in message
news:ukChw6JGEHA.3880 (AT) TK2MSFTNGP10 (DOT) phx.gbl...
My transform in cludes a variable that holds a node set from the
node-set()
extension function. It the transformation works fine when using MSXML2
or
msxsl.exe but not in VB.Net.

My code looks something like this:

Dim XP as New XPathDocument(XMLFileName)
Dim XSLT as New XslTransform
XSLT.Load(XSLTFileName)
Dim Out as New MemoryStream
XSLT.Transform(XP.CreateNavigaotr, Nothing, Out, Nothing) <-- Fails on
this
line
Out.Position = 0
Dim XML as New XmlDocument
XML.LoadXml(New StreamReader(Out).ReadToEnd)

The exception says:
System.Xml.Xsl.XsltException: Function 'msxsl:node-set()' has
failed. ---
System.Xml.Xsl.XsltException: Cannot convert the operand to 'Result tree
fragment'.

I've spent days trying to figure it out with no luck. Any suggestions?







Reply With Quote
  #5  
Old   
NaraendiraKumar R. R.
 
Posts: n/a

Default Re: XslTransform.Transform fails when xsl contains node-set() Function - 04-02-2004 , 01:13 PM



I've have been able to use msxsl:the node-set() function successfully in
..NET 1.0 & .NET 1.1.

Could you share the XSLT &/or XML with us?



----
"Martin Honnen" <mahotrash (AT) yahoo (DOT) de> wrote

Quote:

John Sever wrote:
My transform in cludes a variable that holds a node set from the
node-set()
extension function. It the transformation works fine when using MSXML2
or
msxsl.exe but not in VB.Net.

My code looks something like this:

Dim XP as New XPathDocument(XMLFileName)
Dim XSLT as New XslTransform
XSLT.Load(XSLTFileName)
Dim Out as New MemoryStream
XSLT.Transform(XP.CreateNavigaotr, Nothing, Out, Nothing) <-- Fails on
this
line
Out.Position = 0
Dim XML as New XmlDocument
XML.LoadXml(New StreamReader(Out).ReadToEnd)

The exception says:
System.Xml.Xsl.XsltException: Function 'msxsl:node-set()' has
failed. ---
System.Xml.Xsl.XsltException: Cannot convert the operand to 'Result tree
fragment'.

I've spent days trying to figure it out with no luck. Any suggestions?

I don't think that .NET supports the node-set function.
--

Martin Honnen
http://JavaScript.FAQTs.com/




Reply With Quote
  #6  
Old   
AT
 
Posts: n/a

Default Re: XslTransform.Transform fails when xsl contains node-set() Function - 04-08-2004 , 09:06 AM



Hi John,

I'd like to know if this issue has been resolved yet. Is there anything
that I can help. I'm still monitoring on it. If you have any questions,
please feel free to post them in the community.

Kevin Yu
=======
"This posting is provided "AS IS" with no warranties, and confers no
rights."


Reply With Quote
Reply




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.