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

Re: How do you convert a string to a node-set?

Subject: Re: How do you convert a string to a node-set?
From: Mike Brown <mike@xxxxxxxx>
Date: Tue, 26 Mar 2002 02:38:29 -0700 (MST)
progress convert to string
Steve Renshaw wrote:
> How do you convert a string to a node-set? Is it possible with MSXSL3?
> This doesn't do the trick:
> <xsl:variable name="var" 
> select="msxsl:node-set('&lt;a&gt;3&lt;/a&gt;&lt;b&gt;4&lt;/b&gt;')"/>

Markup in an XPath/XSLT string object is not really meant to be parsed. How
did you end up with an XML fragment in a string in the first place? Solve that
problem, and this one will go away.

I believe the only other way is to use an extension function or extension
element of your own design. It would need to invoke MSXML to parse the string
as it would an external general entity (since the XML is not a well-formed
document... your example <a>3</a><b>4</b> does not have a document element).

   - Mike
____________________________________________________________________________
  mike j. brown                   |  xml/xslt: http://skew.org/xml/
  denver/boulder, colorado, usa   |  resume: http://skew.org/~mike/resume/

 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.