[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: A proposal for simplify XML text editing and subsequent pr
On Sun, Aug 21, 2011 at 3:28 AM, Liam R E Quin <liam@w3.org> wrote: >> To complement this, editors should have a capability to >> safely strip such indentation characters when encountered (the reverse >> of what pretty-print formatters achieve) in external sources. > > You can only do that in general with a schema (e.g. a DTD or XSD schema) > of course. The indentation characters found in formatted XML, though often inconsistent (as they often are in examples found online - even in W3C documents - not a criticism just an observation), can still provide some useful clues as to the true purpose of leading whitespace characters. A crude example of how patterns in leading whitespace can provide clues as to its purpose: ....<abc> ......<pre-x> ...Its evident that this block of text should have the ...............whitespace preserved because it's inconsistent ...with previous padding and the XML content ......</pre-x> ...</abc> Granted, the trimming will never be 100% safe, but I would argue that, without a schema or configuration settings, its possible to trim leading whitespace characters much more safely than pretty-print (even in the leading XML tools) inserts them.
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] |
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|