But, whatever. In the end, it was a tossup. I was unaware that XML requires a
double quote. And I guess that using single-quote as a *default* (changeable!)
means that I can't correctly claim that Haml is an XHTML generator. Though,
I've also never seen an XML parser have a problem with single-quotes.
I find the whole thing pedantic and a bit wonky. I mean, who really
gives a fuck? It can be parsed and its widely used. That should be enough.
I would say that I am pro-standards and pro-convention... but only
when it matters.
I get very frustrated and angry when people get obsessed with the specifics
rather than the spirit of something. In fact, I'll say I think its
pretty fucking lame.
Have angered the gods of the Internet because some sweaty dude in a tie at a
committee meeting chose double-quotes and decided that single-quotes are
forbidden. That dude can fuck-off.
If everyone in the community wants the default changed, I will change it.
However, I think most people care about that kind of detail as much as I do....
and I rather like that we stand in defiance of what I consider to be a nit-picky
bit of standard.
So, let the +1's begin for double-quotes if people feel strongly.
-hampton.
+1 for Hampton!
0 for double-quotes
So was I, but I've read the XML specification, so it's not for lack of
interest. Where are double quotes required? What issue are you
responding to here? The spec's section on attribute literal syntax (http://www.w3.org/TR/REC-xml/#IDANUDS
) explicitly says that they can be single- or double-quoted (and
therefore can't contain literal double- and single-quote characters
respectively) which is the way I've always understood it, but perhaps
I'm missing something obvious.
That being said, it's my personal preference to use double-quotes in
XML wherever possible -- perhaps just because they're less likely to
appear in attribute values, so fewer entity references are required --
and for that reason (+ laziness) I'd be pleased to see Haml's default
changed to double-quotes. I think it's just the less surprising
option, particularly since I'm sure there are plenty of newbies who
don't realise apostrophes are allowed at all.
Cheers,
-Tom
I, too, have read the XML specifications and missed this requirement.
However, I always use double quotes, not because of some
specification, but because it's the language convention.
I was once helping someone new to Ruby. They were fairly resistant to
the idea of do..end blocks, instead preferring {...}. I was insistent
about using the former, not because of some specification, but because
of language conventions. Double quotes should be used by default in
HTML, XHTML, XML, etc.
Daniel Brumbaugh Keeney