The patch at https://github.com/slyrus/cxml/compare/master...slyrus-unparse-fix fixes things so that they print as described. The nice thing about this is that now indentation alone doesn't break things like Relax NG schemas which expect certain values for text nodes and when printed canonically are correct but when printed with indentation on no longer validate.

Any objections to this becoming the standard behavior?

thanks,

Cyrus

On Mar 16, 2012, at 10:58 AM, Cyrus Harmon wrote:


Currently, it seems that non-canonical printing always does this:

<foo>
 bar</foo>

Is there an easy way to make that print is <foo>bar</foo>, besides resorting to canonical mode? I can see the case for a new line (and appropriate indentation) for something like this:

<foo>
 <moose>
    bar</moose>
</foo>

but I'd still rather see that as:

<foo>
 <moose>bar</moose>
</foo>

thanks,

Cyrus