Bug 108135 - [formatting] Pretty / compress formatter
Summary: [formatting] Pretty / compress formatter
Status: NEW
Alias: None
Product: WTP Source Editing
Classification: WebTools
Component: wst.xml (show other bugs)
Version: 0.7   Edit
Hardware: PC Windows 2000
: P3 enhancement with 1 vote (vote)
Target Milestone: Future   Edit
Assignee: wst.xml-triaged CLA
QA Contact: Nick Sandonato CLA
URL:
Whiteboard:
Keywords: helpwanted
Depends on:
Blocks:
 
Reported: 2005-08-26 11:29 EDT by Michel Rondeau CLA
Modified: 2013-06-19 11:14 EDT (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Michel Rondeau CLA 2005-08-26 11:29:04 EDT
frequently xml file are difficult to read or are to large depending on the
neads. Would be nice to add a feature "XML/format pretty" and "XML/format compress".

With pretty format, a file would be reformat with proper indendation
(configurable indent size ?) and default attribute values would be added
(configurable ?) like this:
<?xml...>
  <root attrib="default">
     value1
     <element .../>
  </root>
  <root attrib="not default">
     value2
     <element .../>
  </root>
etc.

with compress format, all spacing would be remove, all attributes to default
value would be removed (configurable ?). Giving a file like this:
<?xml...>
<root>value1<element .../></root>
<root attrib="not default">value2<element .../></root>
...
Comment 1 David Williams CLA 2005-12-19 02:05:36 EST
Some interesting ideas in here. I susepect we'd want "reversable" operations. Perhaps as some part of "cleanup" function?