XML.orgXML.org
FOCUS AREAS |XML-DEV |XML.org DAILY NEWSLINK |REGISTRY |RESOURCES |ABOUT
OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]
Re: [xml-dev] Heterogeneous XML editing environments - how do youcope?

On Wed, 2007-10-17 at 17:33 -0400, Jonathan Robie wrote:
> 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:



This isn't XML. ???

If you are writing source code documentation then thre are ways to set
preserve space.




> 
> 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]


News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 1993-2007 XML.org. This site is hosted by OASIS