Re: [xsl] best boolean practice

Subject: Re: [xsl] best boolean practice
From: Ihe Onwuka <ihe.onwuka@xxxxxxxxx>
Date: Tue, 30 Jul 2013 20:37:46 +0100
My personal preference is to use the presence or absence of an empty
element e.g <isMasked/>.

That way you don't have to worry about what to do if someone gives the
node a value of "widget" when it is supposed to be boolean.

On Tue, Jul 30, 2013 at 6:54 PM, Terence Kearns <spasmoid@xxxxxxxxx> wrote:
> Just a quickie. I'm writing some code to produce XML which will later
> be transformed and selected on, and I am wondering what will be the
> best way to represent boolean values as far as XSL designers are
> concerned?
>
> value="yes"
> value="true"
> value="1"
>
> does it even make a difference at all?
>
> I'm thinking attributes will definitely be more intuitive than
> elements. Am I right?
> So this is not quite as good <value>yes</value> (certainly uses up
> more characters).
>
>
>
> --
> http://TerenceKearns.com | ABN 58705023254 | ph 0412 235 575

Current Thread