At 2013-07-31 03:54 +1000, Terence Kearns 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
does it even make a difference at all?
If you are using schema validation, then in the lexical space "1" and
"true" represent true(), and "0" and "false" represent false() ...
If you are not using schema validation, consider your audience and
consider the concept.
Then consider how the concept is presented to the audience:
but there is nothing really wrong with:
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
Depends really on how you've represented other concepts in your
document model. Being consistent to your users is, to me, the
governing factor since you can put a string value in either an
attribute or an element. Do you use attributes for other
unstructured string values?
There really isn't a right or wrong way ... consider how your choice
will be accepted by your XML users and put the burden on your
stylesheet writers to accommodate that.
I hope this helps.
. . . . . . . Ken
Public XSLT, XSL-FO, and UBL classes in the Netherlands Oct 2013 |
Public XSLT, XSL-FO, UBL and code list classes in Australia Oct 2013 |
Contact us for world-wide XML consulting and instructor-led training |
Free 5-hour lecture: https://www.CraneSoftwrights.com/links/udemy.htm |
Crane Softwrights Ltd. https://www.CraneSoftwrights.com/s/ |
G. Ken Holman mailto:gkholman(_at_)CraneSoftwrights(_dot_)com
Google+ profile: https://plus.google.com/116832879756988317389/about |
Legal business disclaimers: https://www.CraneSoftwrights.com/legal |
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>