this is a german Web-Mirror of MHONARC.ORG powered by Domainunion AG

xsl-list
[Top] [All Lists]

Re: [xsl] best boolean practice

2013-07-30 14:37:57
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(_at_)gmail(_dot_)com> 
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).



--
https://TerenceKearns.com | ABN 58705023254 | ph 0412 235 575

--~------------------------------------------------------------------
XSL-List info and archive:  https://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: https://lists.mulberrytech.com/xsl-list/
or e-mail: 
<mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--


--~------------------------------------------------------------------
XSL-List info and archive:  https://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: https://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--

<Prev in Thread] Current Thread [Next in Thread>