[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: selecting following attribute
On 9/17/2010 11:02 AM, Terry Ofner wrote: > My question: How do I select the first following @startNum? > > This formulation > > <xsl:value-of select="following::*/@startNum[1] -1"/> > > returns this error in Oxygen: Saxon B 9.0.0.6: A sequence of more than one item is not allowed as the first operand of '-' I think besides what David Carlisle said, you could at least get better typechecking by using number(): <xsl:value-of select="number((following::*/@startNum)[1]) - 1"/> Then if there was no following @startNum, the error would be thrown by number(). Or else you would get NaN? Lars
|
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
|