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

Re: Convert string from param to a nodeset in 2.0

Subject: Re: Convert string from param to a nodeset in 2.0
From: Colin Paul Adams <colin@xxxxxxxxxxxxxxxxxx>
Date: 15 Oct 2004 14:39:15 +0100
convert string to uri
>>>>> "Andrew" == Andrew Welch <ajwelch@xxxxxxxxxxxxxxx> writes:

    Andrew> Is there any way in xslt 2.0 to convert a string to a
    Andrew> node-set that is passed in as a parameter?

    Andrew> That is, I would like the calling application to be able
    Andrew> to pass in the string "<foo><bar/></foo>" and then operate
    Andrew> on that string as if it were a node-set.  I want to
    Andrew> convert the string inside the stylesheet, not force the
    Andrew> calling application to create the nodeset.

    Andrew> I believe I need to specify type string on the parameter
    Andrew> that receives the string, and then perform another
    Andrew> operation on that.  I'm sure I'm missing something obvious
    Andrew> here...

Andrew, this is not defined by XSLT 2.0, so it depends upon the
processor.
If your processor allows you to pass XPath expressions as parameter
values, then you could pass something like:

document ("string:<foo><bar/></foo>")

assuming that the URI resolver can handle a URI scheme of string
meaning an inline document
-- 
Colin Paul Adams
Preston Lancashire

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.