avalon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Leo Sutic" <leo.su...@inspireinfrastructure.com>
Subject RE: XML Conventions
Date Sun, 08 Sep 2002 14:54:21 GMT


> From: Nicola Ken Barozzi [mailto:nicolaken@apache.org] 
> 
> Leo Sutic wrote:
> > 
> >>From: Nicola Ken Barozzi [mailto:nicolaken@apache.org]
> >>
> >>Peter Donald wrote:
> > 
> > 
> >   ...
> > 
> > 
> >>This is generally known as "literal programming".
> > 
> > 
> > And pretty much breaks the DefaultConfigurationBuilder.
> > 
> > -1
> 
> Too bad it is set in stone :'-(
> 
> > Use comments for comments. If it isn't supposed to be given to the 
> > program code for processing, keep it away from it.
> 
> Which is exactly the point.
> Someone just said that documentation is as important as code, so it 
> should be regarded as code. @see literal programming

I am aware of literate programming - it does not mean that documentation
*is* code, unless you give such an abstract meaning to "documentation"
and 
"code" as to render both words useless. For example, you can not compile

documentation into Java bytecode. If you could, it would be code.

> > And THAT said...
> > 
> > Personally I prefer elements for multiplicity and for long text:
> > 
> > <description>
> >     This is my component. There are many like it, 
> >     but this one is mine.
> > 
> >     "This is the second paragraph."
> > </description>
> > 
> > is better than:
> > 
> >  <description text="This is my component. There are many 
> like it, but 
> > this one is mine. &quot;This is the second paragraph.&quot;"/>
> 
> Which is what I said.
> Hey, doesn't this break DefaultConfigurationBuilder.?

No. The DefaultConfigurationBuilder can handle elements as leaves in
the config tree:

<root>
  Illegal text. This text makes the <root/> element have mixed content.
  That is not allowed.
  <child>Legal text</child>
</root>

/LS


--
To unsubscribe, e-mail:   <mailto:avalon-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:avalon-dev-help@jakarta.apache.org>


Mime
View raw message