xsl-list
[Top] [All Lists]

Re: [xsl] single quotes instead of double

2011-11-21 07:37:00
For someone reading XML, the attribute delimiter chosen should be irrelevant
because it is, syntactically, irrelevant.  So use whatever you want and
don't bother imposing a style.

'Use whatever you want' doesn't help maintainability, style guides
exist for a reason...  you want code to look the same regardless of
who wrote it in the team.

There might be the odd occasion where taking advantage of the choice
of delimiter is helpful, but in general (my view is) people should
consistently use double quotes.

I also use/want 4 spaces for the indentation, 2 lines between
templates etc, Another example is declaring all the namespaces on the
root element - you could declare them where you like, but the general
rule is on the root element.  That way the poor sod (me) maintaining
the code will find them where they expect to find them.

By the way, if anyone has their own rules for laying out their code
I'd like to hear them. (on or off-list is fine)

-- 
Andrew Welch
http://andrewjwelch.com

--~------------------------------------------------------------------
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>
--~--