This page is no longer maintained — Please continue to the home page at

Re: Progress on #1118 (empty elements)

No replies
Alex Cruise
Joined: 2008-12-17,
User offline. Last seen 2 years 26 weeks ago.
I figured somebody would quibble with the terminology. :)

Yup, I like your names better, thanks, and I hope to hear your opinion on the design and implementation too. :)


----- Reply message -----
From: "Anthony B. Coates (Londata)" <abcoates [at] londata [dot] com>
Date: Fri, Mar 19, 2010 8:26 AM
Subject: [scala-xml] Progress on #1118 (empty elements)
To: <scala-xml [at] listes [dot] epfl [dot] ch>

I haven't looked at the code yet, but rather than "emptiness", could it be  
called something like "emptyElementFormat" (which I think makes the  
meaning clearer), perhaps with something like "emptyElement",  
"openCloseTags" and "default" as values?

Thanks, Cheers, Tony.

On Fri, 19 Mar 2010 08:11:56 -0000, Alex Cruise <alex [at] cluonflux [dot] com> wrote:

> I've come up with a scheme that I think addresses #1118 pretty well; it  
> works like this:
> - Elem has a new parameter "emptiness", a Byte for memory efficiency.  
> It has three legal values, denoting "minimize", "don't minimize", and  
> "default".
> - Parsed elements always have a non-default emptiness value reflecting  
> their original form
> - Those who construct elements programmatically can opt to specify their  
> emptiness, or just let the default ride
> - There's a new Utility.serialize method in town, and it now accepts an  
> enum parameter for "minimizeTags" instead of toXML's Boolean:
>   * Always minimize empty tags
>   * Never minimize empty tags
>   * Default: Minimize tags according to their "emptiness" parameter
> Anyone who cares about this issue is cordially invited to read and/or  
> try out my patch:
> I'll write a bit more documentation and tests before I commit it.
> Thanks in advance for your feedback!
> -0xe1a
> ----------------------------------------------------------------
> This message was sent using IMP, the Internet Messaging Program.

Anthony B. Coates
Director and CTO
Londata Ltd
abcoates [at] londata [dot] com
UK: +44 (20) 8816 7700, US: +1 (239) 344 7700
Mobile/Cell: +44 (79) 0543 9026
Skype: abcoates
Data standards participant: genericode, ISO 20022 (ISO 15022 XML),  

Copyright © 2012 École Polytechnique Fédérale de Lausanne (EPFL), Lausanne, Switzerland