You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cloudstack.apache.org by Darren Shepherd <da...@gmail.com> on 2013/08/26 18:11:51 UTC

why 2 spaces for xml?

I hate discussions about coding conventions, but I just have to ask. 
Why is XML two spaces?  Java, JavaScript, Python, all 4 spaces for 
indent.  But XML is 2.  Why is it special?

Darren

Re: why 2 spaces for xml?

Posted by Daan Hoogland <da...@gmail.com>.
On Tue, Aug 27, 2013 at 3:53 AM, Alex Huang <Al...@citrix.com> wrote:
> I have always preferred two spaces because xml can be indented so far so quickly

I must +1 and a lot this argument of Alex' But sleep tight anyway
Darren. No killing issue.

RE: why 2 spaces for xml?

Posted by Alex Huang <Al...@citrix.com>.
I have always preferred two spaces because xml can be indented so far so quickly that often the main part of the xml must be scrolled horizontally to read but I'm open to have it at four.

--Alex

> -----Original Message-----
> From: Darren Shepherd [mailto:darren.s.shepherd@gmail.com]
> Sent: Monday, August 26, 2013 4:49 PM
> To: dev@cloudstack.apache.org
> Cc: dev@cloudstack.apache.org
> Subject: Re: why 2 spaces for xml?
> 
> 
> 
> On Aug 26, 2013, at 10:21 AM, Chip Childers <ch...@sungard.com>
> wrote:
> 
> > On Mon, Aug 26, 2013 at 10:12:30AM -0700, Darren Shepherd wrote:
> >> On 08/26/2013 09:22 AM, Marty Sweet wrote:
> >>> All the XML documentation I have seen has been 4 spaces for indent,
> >>> what XML files are you talking about?
> >>
> >> I couldn't find documented on the ACS web page or website that the
> >> standard was 2 spaces, but I swear I saw it written somewhere.
> >> Regardless, I'm looking at all the pom.xml and
> >> applicationContext*.xml files.
> >>
> >> Darren
> >
> > Nothing but inconsistency causing that...  we should just use 4
> > everywhere IMO.
> 
> Alright, I will sleep better at night knowing I can use 4 spaces in XML.
> 
> Darren

Re: why 2 spaces for xml?

Posted by Darren Shepherd <da...@gmail.com>.

On Aug 26, 2013, at 10:21 AM, Chip Childers <ch...@sungard.com> wrote:

> On Mon, Aug 26, 2013 at 10:12:30AM -0700, Darren Shepherd wrote:
>> On 08/26/2013 09:22 AM, Marty Sweet wrote:
>>> All the XML documentation I have seen has been 4 spaces for indent, what
>>> XML files are you talking about?
>> 
>> I couldn't find documented on the ACS web page or website that the
>> standard was 2 spaces, but I swear I saw it written somewhere.
>> Regardless, I'm looking at all the pom.xml and
>> applicationContext*.xml files.
>> 
>> Darren
> 
> Nothing but inconsistency causing that...  we should just use 4
> everywhere IMO.

Alright, I will sleep better at night knowing I can use 4 spaces in XML. 

Darren

Re: why 2 spaces for xml?

Posted by Chip Childers <ch...@sungard.com>.
On Mon, Aug 26, 2013 at 10:12:30AM -0700, Darren Shepherd wrote:
> On 08/26/2013 09:22 AM, Marty Sweet wrote:
> >All the XML documentation I have seen has been 4 spaces for indent, what
> >XML files are you talking about?
> >
> 
> I couldn't find documented on the ACS web page or website that the
> standard was 2 spaces, but I swear I saw it written somewhere.
> Regardless, I'm looking at all the pom.xml and
> applicationContext*.xml files.
> 
> Darren
> 
>

Nothing but inconsistency causing that...  we should just use 4
everywhere IMO.

Re: why 2 spaces for xml?

Posted by Darren Shepherd <da...@gmail.com>.
On 08/26/2013 09:22 AM, Marty Sweet wrote:
> All the XML documentation I have seen has been 4 spaces for indent, what
> XML files are you talking about?
>

I couldn't find documented on the ACS web page or website that the 
standard was 2 spaces, but I swear I saw it written somewhere. 
Regardless, I'm looking at all the pom.xml and applicationContext*.xml 
files.

Darren


Re: why 2 spaces for xml?

Posted by Sebastien Goasguen <ru...@gmail.com>.
On Aug 26, 2013, at 12:22 PM, Marty Sweet <ms...@gmail.com> wrote:

> All the XML documentation I have seen has been 4 spaces for indent, what
> XML files are you talking about?

in the documentation I don't think we have been very consistent...

> 
> Marty
> 
> 
> On Mon, Aug 26, 2013 at 5:11 PM, Darren Shepherd <
> darren.s.shepherd@gmail.com> wrote:
> 
>> I hate discussions about coding conventions, but I just have to ask. Why
>> is XML two spaces?  Java, JavaScript, Python, all 4 spaces for indent.  But
>> XML is 2.  Why is it special?
>> 
>> Darren
>> 


Re: why 2 spaces for xml?

Posted by Marty Sweet <ms...@gmail.com>.
All the XML documentation I have seen has been 4 spaces for indent, what
XML files are you talking about?

Marty


On Mon, Aug 26, 2013 at 5:11 PM, Darren Shepherd <
darren.s.shepherd@gmail.com> wrote:

> I hate discussions about coding conventions, but I just have to ask. Why
> is XML two spaces?  Java, JavaScript, Python, all 4 spaces for indent.  But
> XML is 2.  Why is it special?
>
> Darren
>