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] A proposal for simplify XML text editing and subsequent processing

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]


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