xsl-list
[Top] [All Lists]

Re: [xsl] Only child test

2013-10-10 09:41:03

But my approach to programming is like a science experiment: try to make
as clear as possible what is done and why, on the grounds that it will
need not be changed later. This is not a mathematician's approach, who
will prove it correct (for the stated requirements and conditions at the
time) and move on with life :-)


A complication here is the use of programming idioms. An example in XPath 2.0 is

(@status, 0)[1]

For someone who hasn't encountered it before, this is obscure and perverse. For 
someone who has a few months of XPath 2.0 experience, it is the most natural 
way in the world of saying "the value of the status attribute, defaulting to 0 
if absent".

Michael Kay
Saxonica


--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://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>