473,406 Members | 2,954 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

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

XSLT extension object returning a node set

Hi,

I want to write an XSLT extension object that returns a node set.
I intend to use the extension object in a select attribute of a for-each xsl
element.
eg. <xsl:for-each select="myobj:mynodes()">.... </xsl:for-each>

I am currently returning XmlNodeList from my extension object method, but
this method is not being called. Instead I get the exception "The
expression passed to this method should result in a NodeSet"

Any ideas much appreciated.
Thanks
Martin
Nov 12 '05 #1
2 2921
Looks like I need XPathNodeIterator

"Martin" <x@y.z> wrote in message
news:u4****************@TK2MSFTNGP15.phx.gbl...
Hi,

I want to write an XSLT extension object that returns a node set.
I intend to use the extension object in a select attribute of a for-each
xsl element.
eg. <xsl:for-each select="myobj:mynodes()">.... </xsl:for-each>

I am currently returning XmlNodeList from my extension object method, but
this method is not being called. Instead I get the exception "The
expression passed to this method should result in a NodeSet"

Any ideas much appreciated.
Thanks
Martin

Nov 12 '05 #2
Do have a look at the source code of EXSLT.NET

In case you don't like the fact that this uses reflection, a more general
idea and its implementation is described here:

http://www.xml.com/pub/a/2003/08/06/exslt.html

Although the implementation is for MSXML4, at the time I did implement the
same for .NET.

Cheers,

Dimitre Novatchev.
"Martin" <x@y.z> wrote in message
news:u4****************@TK2MSFTNGP15.phx.gbl...
Hi,

I want to write an XSLT extension object that returns a node set.
I intend to use the extension object in a select attribute of a for-each
xsl element.
eg. <xsl:for-each select="myobj:mynodes()">.... </xsl:for-each>

I am currently returning XmlNodeList from my extension object method, but
this method is not being called. Instead I get the exception "The
expression passed to this method should result in a NodeSet"

Any ideas much appreciated.
Thanks
Martin

Nov 12 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Sergio del Amo | last post by:
Hi, I use the xslt functions provided by php. I am running in my computer the package xampp(www.apachefriends.org) which includes php/apache/mysql .. In this package the php includes the sablotron...
3
by: Justine Hlista | last post by:
I'm using xalan-j_2_6_0 and trying to get an example from Michael Kay's book to work: <xsl:template match="/"> <xsl:variable name="rainbow"> <color>red</color> <color>blue</color>...
2
by: Matt Frame | last post by:
In my old VB6 application I have an xslt extension object that builds a small cross reference document and returns it as a NodeList in my XSLT. I can then use it with xpath expressions as...
3
by: Stephan Brunner | last post by:
Hi I have created two flavors of an XSLT stylesheet to transform all attributes of an XML document to elements: They both work as expected with MSXML and XMLSPY but throw an exception ...
5
by: Douglas Steen | last post by:
Here's what I have (in snippets) ** XML ** <parent> <child> <grandchild/> </child> </parent> ** XSLT ** <xsl:template match="/parent">
2
by: Simon_Keep | last post by:
Hi, I have an Xslt extension object that returns a node-set to the xslt stylesheet which then uses an xsl:copy-to statement to write it to the output. The problem I am having is that the...
5
by: Matt | last post by:
I need help with passing a generated node set from a style sheet into my customer msxsl extension. I have the following node set that I am creating: <xsl:variable name="sql"> <SQL>...
2
jkmyoung
by: jkmyoung | last post by:
Here's a short list of useful xslt general tricks that aren't taught at w3schools. Attribute Value Template Official W3C explanation and example This is when you want to put dynamic values...
11
by: Ebenezer | last post by:
Let's suppose I have some nodes in an XML file, with an URL attribute: <node url="mypage.php?name1=value1&foo=bar&foo2=bar2&name2=value0" /> <node...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.