[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: nodeset extension in .Net?

Subject: Re: nodeset extension in .Net?
From: Dimitre Novatchev <dnovatchev@xxxxxxxxx>
Date: Mon, 5 Aug 2002 05:40:43 -0700 (PDT)
.net node set
--- "bryan" <bry at itnisk dot com> wrote:

> 
> I seem to remember that in .Net there isn't a node-set extension
> function, and that node-sets are accessible. Does anyone know if this
> is
> correct, cause I'm getting some results here that lead me to conclude
> that I need a node-set() function and can't just merrily run an xpath
> against my parameter.

.Net supports the node-set() extension function. If you search for
"Support for the msxsl node-set Function" in the .Net Framework, you'll
find this:

" .NET Framework Developer's Guide   

Support for the msxsl:node-set() FunctionSee Also
XslTransform Class Implements the XSLT Processor
The msxsl:node-set function enables you to convert a result tree
fragment or node tree into a node set. The resulting node set always
contains a single node and is the root node of the tree.

Example

In the following example, $var is a variable that is a node tree in the
stylesheet. The for-each statement combined with the node-set function
allows the user to iterate over this node tree as a node set.

<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
                xmlns:msxsl="urn:schemas-microsoft-com:xslt"
                xmlns:user="http://mycompany.com/mynamespace"
                version="1.0">
    <xsl:variable name="states">
        <node1>AL</node1>
        <node1>CA</node1>
        <node1>CO</node1>
        <node1>WA</node1>
    </xsl:variable>

    <xsl:template match="/">
            <xsl:for-each select="msxsl:node-set($states)/node1"/> 
    </xsl:template>
</xsl:stylesheet>
See Also
XslTransform Class Implements the XSLT Processor


--------------------------------------------------------------------------------

Send comments on this topic. 

© 2001 Microsoft Corporation. All rights reserved."


Only one remark: Two months ago users of FXSL noted that in .Net 
node-set($rtf) crashes if not($rtf)

Hope this helped.



=====
Cheers,

Dimitre Novatchev.
http://fxsl.sourceforge.net/ -- the home of FXSL

__________________________________________________
Do You Yahoo!?
Yahoo! Health - Feel better, live better
http://health.yahoo.com

 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.