Re: [xsl] XSLT Hello World

Subject: Re: [xsl] XSLT Hello World
From: Wendell Piez <wapiez@xxxxxxxxxxxxxxx>
Date: Tue, 25 Mar 2014 14:15:32 -0400
Hi,

Here is my "Good Riddance, World":

<xsl:template match="/*">
   <xsl:choose>
      <xsl:when test="text() != text()">You win!</xsl:when>
      <xsl:otherwise>You lose!</xsl:otherwise>
   </xsl:choose>
</xsl:template>

This is homework for Day One of Intro to XSLT. The problem is to write
the source document that produces the desired outcome.

Cheers, Wendell


On Tue, Mar 25, 2014 at 12:10 PM, Andrew Welch <andrew.j.welch@xxxxxxxxx> wrote:
>>
>> Yes but unless you have a very strange definition of "2 sequences are
>> different" don't use != on that day.
>>
>> != is true if _any_ element of a is not equal to any element of b so it
>> is only false if all items of both sequences are equal to the same value.
>
> ah of course... took a while for the penny to drop there.. you are
> right, this really does fall into the 'you never want to use it'
> category.
>
>
> --
> Andrew Welch
> http://andrewjwelch.com
>



-- 
Wendell Piez | http://www.wendellpiez.com
XML | XSLT | electronic publishing
Eat Your Vegetables
_____oo_________o_o___ooooo____ooooooo_^

Current Thread