[Date Prev]
| [Thread Prev]
| [Thread Next]
| [Date Next]
--
[Date Index]
| [Thread Index]
Re: [xml-dev] Heterogeneous XML editing environments - how do you cope?
- From: "Anthony B. Coates (XML-Dev)" <abcoatesecure-xmldev@yahoo.co.uk>
- To: "XML Developers List" <xml-dev@lists.xml.org>
- Date: Wed, 17 Oct 2007 22:13:39 +0100
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@redhat.com> 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),
UN/CEFACT, MDDL, FpML, UBL.
http://www.mileywatts.com/
[Date Prev]
| [Thread Prev]
| [Thread Next]
| [Date Next]
--
[Date Index]
| [Thread Index]