[Date Prev]
| [Thread Prev]
| [Thread Next]
| [Date Next]
--
[Date Index]
| [Thread Index]
Re: [xml-dev] Heterogeneous XML editing environments - how do youcope?
- From: Jonathan Robie <jonathan.robie@redhat.com>
- To: rob@koberg.com
- Date: Wed, 17 Oct 2007 17:33:24 -0400
Robert Koberg wrote:
>>> If I had a tool that would reliably pretty-print the XML source without
>>> trashing any important whitespace formatting,
>>>
>
> tomaytoe, tamahtoe, solanum lycopersicum
>
> Is whitespace like this important:
>
> <p>blah blah
> blah blah blah
> blah blah</p>
>
> ? Doesn't it seem incorrect? But it's probably nice for the vi/emacs
> user. But why use stone tablets?
>
Not sure I get your drift. When you're writing technical documentation
with source code fragments, whitespace matters. Whitespace *is*
significant here:
int main() {
Connection connection;
Message msg;
try {
connection.open("127.0.0.1", 5672);
Session session = connection.newSession();
//--------- Main body of program
--------------------------------------------
// Subscribe to the queue, route it to a client destination for
// the listener.
session.messageSubscribe_(queue="message_queue",
destination="listener_destination");
// Tell the listener to listen to the destination we just
// created above.
Listener listener(session, "listener_destination");
listener.listen();
//-----------------------------------------------------------------------------
connection.close();
return 0;
} catch(const std::exception& error) {
std::cout << error.what() << std::endl;
}
return 1;
}
Most users don't want to see this, and it no longer compiles because the
// comments rely on end of lines:
int main() { Connection connection; Message msg; try {
connection.open("127.0.0.1", 5672); Session session =
connection.newSession(); //--------- Main body of program
-------------------------------------------- // Subscribe to the
queue, route it to a client destination for // the listener.
session.messageSubscribe_(queue="message_queue",
destination="listener_destination"); // Tell the listener to listen to
the destination we just // created above. Listener listener(session,
"listener_destination"); listener.listen();
//-----------------------------------------------------------------------------
connection.close(); return 0; } catch(const std::exception& error)
{std::cout << error.what() << std::endl; } return 1; }
Whitespace may be less significant for tomatoes than it is for source
code listings.
Jonathan
[Date Prev]
| [Thread Prev]
| [Thread Next]
| [Date Next]
--
[Date Index]
| [Thread Index]