[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: A beef with XSLT Sometimes too complicated
> for $i in (for $j in $someSeq return some($j)) return ...? sorry you can nest as many for as you like but it can't be done (I claim) > But I'm really not even sure I follow what you math-heads are getting in xquery you can go let $s := (1,2,3) return count($s) and get 3 in xslt you can go <xsl:variable name="s" select="(1,2,3)"/> <xsl:sequence select="count($s)"/> and get 3 as well. But in XPath You don't have all of XQuery's FLWOR (For-Let-Where-OrderBy-Return) expression, in particular you don't have the Let clause so you can't go let $s := (1,2,3) if you have an xquery that binds a single item to a variable let $i := count(foo) return .....$s then you can do the same binding in XPath by replacing the let by a for for $s in count(foo) return .... $s but if the let clause is binding the variable to a sequence of zero or more than one items there is no way to bind that sequence to a variable in Xpath. All the XPath binding expressions, namely for, some, every iterate through a sequence and bind the variable to (at eaxh iteration) a single item. This is often annoying (if you get annoyed by such things). David
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|