[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: Heterogeneous XML editing environments - how do you cope?

  • From: "Anthony B. Coates (XML-Dev)" <abcoatesecure-xmldev@y...>
  • To: "XML Developers List" <xml-dev@l...>
  • Date: Wed, 17 Oct 2007 22:13:39 +0100

Re:  Heterogeneous XML editing environments - how do you cope?
I've never really found it possible a pretty printer that was completely  
neutral towards whitespace that could be significant.  Usually, I try to  
set up my processing to that the pretty printing does not have a  
significant effect on the final result.

What might work is two pass XSLT processing.  Use the first pass to check  
which elements can contain direct child text nodes with non-whitespace  
characters.  From that information, generate an "identity" XSLT  
transformation that preserves the space for those elements, and strips the  
space for others, plus specify output indenting in it as well.  I suspect  
that wouldn't be too bad as a heuristic approach.

Cheers, Tony.

On Wed, 17 Oct 2007 21:07:12 +0100, Jonathan Robie  
<jonathan.robie@r...> wrote:

> I'm working with people who use a variety of tools to edit XML. Some  
> editors, like XMetaL, feel very free with non-significant whitespace,  
> providing a user interface that shields the user from the very long  
> lines their tool creates. That's a challenge for those of us who come in  
> with other tools like Emacs, which shield the user somewhat less from  
> the source code.
> If I had a tool that would reliably pretty-print the XML source without  
> trashing any important whitespace formatting, I'd be fine. Are any such  
> tools really reliable enough to be trusted?
> How do the rest of you cope with the artifacts of various XML editing  
> tools in heterogeneous editing environments?
> Jonathan
Anthony B. Coates
Senior Partner
Miley Watts LLP
Experts In Data
UK: +44 (20) 8816 7700, US: +1 (239) 344 7700
Mobile/Cell: +44 (79) 0543 9026
Data standards participant: genericode, ISO 20022 (ISO 15022 XML),  

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]


Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
First Name
Last Name
Subscribe in XML format
RSS 2.0
Atom 0.3

Stylus Studio has published XML-DEV in RSS and ATOM formats, enabling users to easily subcribe to the list from their preferred news reader application.

Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website. they were not included by the author in the initial post. To view the content without the Sponsor Links please click here.

Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.