[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: shortest way to write this xsl:if statement
> = as Ken has very patiently described is an existential quantifier. If > you want regular equality testing use eq. > > There are two categories of XPath comparators. General comparison > operators like = that do existential quantification and value > comparison operators like eq that compare atomic values. One thing to be aware of is you have to be careful when using eq when the sequence type is xs:boolean, for example: <xsl:variable name="foo" select="/aaa eq '123'" as="xs:boolean"/> will fail with an exception if /aaa returns the empty sequence. However: <xsl:variable name="foo" select="/aaa = '123'" as="xs:boolean"/> ...will succeed as when you use = if either side is the empty sequence it returns false, and not () -- Andrew Welch http://andrewjwelch.com
|
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
|