W3C home > Mailing lists > Public > xmlschema-dev@w3.org > July 2010

Re: Optimizing a schema.

From: Cheney, Edward A SSG RES USAR USARC <austin.cheney@us.army.mil>
Date: Wed, 21 Jul 2010 17:29:41 -0500
To: Casey Jordan <casey.jordan@jorsek.com>
Cc: xmlschema-dev@w3.org
Message-ID: <f73e9b6afa83.4c472e85@us.army.mil>
Casey,

I had trouble reading your example until I beautified it with my Pretty Diff tool.  It is also written in JavaScript, so can likely consume it into your application.  Just choose the markup and beautify options.

http://prettydiff.com/

What you are going to have to do is test for singleton elements that are absent any attributes and empty elements.  Once those elements are detected you will need to remove them from the output.  The test needs to be recursive as removing elements will result in empty parents.  I am sure this can be done with ease even using JavaScript as I have written similar code before.

Austin Cheney
Received on Wednesday, 21 July 2010 22:30:18 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 11 January 2011 00:15:22 GMT