This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]