You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@avalon.apache.org by "David W." <da...@optonline.net> on 2002/09/09 01:37:08 UTC

Avalon XML Formatting Guidelines

There are a lot of XML files in the Avalon CVS -- buildfiles, xdocs,
configuration files, etc.  Standards for indentation (4 spaces? 2?), line
length, and other XMLish things would be helpful.

David Weitzman



--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


RE: Avalon XML Formatting Guidelines

Posted by Berin Loritsch <bl...@apache.org>.
> From: Leif Mortenson [mailto:leif@tanukisoftware.com] 
> 
> David W. wrote:
> 
> >There are a lot of XML files in the Avalon CVS -- buildfiles, xdocs, 
> >configuration files, etc.  Standards for indentation (4 spaces? 2?), 
> >line length, and other XMLish things would be helpful.
> >  
> >
> +1
> I vote for 4 spaces as that is what is used by all other source files.


Hmm.  I thought it was 2.  That is what I have done for XML files.  For
XML we have to pack a lot of info, and the indentation at 4 spaces would
quickly get out of hand.  I find two spaces sufficient for XML to make
it
readable even when we have sub-sub-sub sections.


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Avalon XML Formatting Guidelines

Posted by Leif Mortenson <le...@tanukisoftware.com>.
David W. wrote:

>There are a lot of XML files in the Avalon CVS -- buildfiles, xdocs,
>configuration files, etc.  Standards for indentation (4 spaces? 2?), line
>length, and other XMLish things would be helpful.
>  
>
+1
I vote for 4 spaces as that is what is used by all other source files.



--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Avalon XML Formatting Guidelines

Posted by Peter Donald <pe...@apache.org>.
On Mon, 9 Sep 2002 09:37, David W. wrote:
> There are a lot of XML files in the Avalon CVS -- buildfiles, xdocs,
> configuration files, etc.  Standards for indentation (4 spaces? 2?), line
> length, and other XMLish things would be helpful.

I don't think we have a standard as such. Everyone used to use 2 in xml but we 
have gradually been introducing 4. Mainly as thats the way IDEA pretty prints 
it (same indent settings as java which is 4 spaces).

-- 
Cheers,

Peter Donald
A right is not what someone gives you; it's what no one can take from you. 
        -- Ramsey Clark


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


RE: Avalon XML Formatting Guidelines

Posted by Leo Sutic <le...@inspireinfrastructure.com>.
> From: David W. [mailto:daveweit@optonline.net] 
> 
> Leo Sutic Wrote
> > > From: David W. [mailto:daveweit@optonline.net]
> > >
> > > There are a lot of XML files in the Avalon CVS -- 
> buildfiles, xdocs, 
> > > configuration files, etc.  Standards for indentation (4 
> spaces? 2?), 
> > > line length, and other XMLish things would be helpful.
> >
> > -1
> >
> > Unnecessary.
> >
> > A "coding style" for XML might be revisited if this becomes 
> a problem, 
> > but for now it is "just another rule" that serves no real 
> purpose and 
> > occupies memory in the developer's head.
> >
> > /LS
> 
> The reason I mentioned it is that I was trying to work an 
> xdoc and I noticed some inconsistant indent size, plus a few 
> long lines.  Reformatting an entire xdoc or large portions of 
> it would mean that every line gets changed in the patch.  Not 
> as big a problem as it would be in Java code, but it seems 
> somehow abnormal.

I think that's something we have to live with until we have an
XML beautifier we can run on the files prior to commit to get
them into a canonical format.

Having the author to take care of line length (both minimum and
maximum) and so on, is more of a burden than big patches. Especially
if the author is using an XML editor that has its own ideas regarding
formatting (XMLSpy).

/LS



--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Avalon XML Formatting Guidelines

Posted by "David W." <da...@optonline.net>.
Leo Sutic Wrote
> > From: David W. [mailto:daveweit@optonline.net]
> >
> > There are a lot of XML files in the Avalon CVS -- buildfiles,
> > xdocs, configuration files, etc.  Standards for indentation
> > (4 spaces? 2?), line length, and other XMLish things would be helpful.
>
> -1
>
> Unnecessary.
>
> A "coding style" for XML might be revisited if this becomes a problem,
> but for now it is "just another rule" that serves no real purpose and
> occupies memory in the developer's head.
>
> /LS

The reason I mentioned it is that I was trying to work an xdoc and I noticed
some inconsistant indent size, plus a few long lines.  Reformatting an
entire xdoc or large portions of it would mean that every line gets changed
in the patch.  Not as big a problem as it would be in Java code, but it
seems somehow abnormal.

David Weitzman


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


RE: Avalon XML Formatting Guidelines

Posted by Leo Sutic <le...@inspireinfrastructure.com>.

> From: David W. [mailto:daveweit@optonline.net] 
> 
> There are a lot of XML files in the Avalon CVS -- buildfiles, 
> xdocs, configuration files, etc.  Standards for indentation 
> (4 spaces? 2?), line length, and other XMLish things would be helpful.
 
-1 

Unnecessary.

A "coding style" for XML might be revisited if this becomes a problem,
but for now it is "just another rule" that serves no real purpose and
occupies memory in the developer's head.

/LS


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>