Subject: Re: [xsl] [string to node]|
From: David Carlisle <davidc@xxxxxxxxx>
Date: Mon, 22 Feb 2010 09:46:21 +0000
In both cases it seems as though $a contains only 1 thing, a string. (You can test that it is not a node set by using $a in the select= of a for-each -- you should get a runtime error, since it is a string.)
No, it's a result tree fragment, not a string.
Oh, right. Thanks for the correction. (He says with his tail between his legs.) But if I understand correctly, as a result tree fragment, only those operations that can be performed on strings are permitted (i.e., can't do path stuff or predicates), and you can't use a result tree fragment as the value of select= of for-each (or apply- templates, for that matter), because a result tree fragment is not a node-set, even though when you do get to use one it behaves as node- set. (And select= of for-each and apply-templates takes a node-set.)
exslt:node-set (and xalan:nodeset, saxon;node-set, msxsl:node-set, etc) work with result tree fragments not strings.
________________________________________________________________________ The Numerical Algorithms Group Ltd is a company registered in England and Wales with company number 1249803. The registered office is: Wilkinson House, Jordan Hill Road, Oxford OX2 8DR, United Kingdom.