You are viewing a plain text version of this content. The canonical link for it is here.
Posted to ecs-dev@jakarta.apache.org by Jon Scott Stevens <jo...@latchkey.com> on 2002/01/29 00:03:19 UTC

Re: cvs commit: jakarta-ecs/src/java/org/apache/ecs/xml XMLDocument.java

on 1/28/02 2:50 PM, "rdonkin@apache.org" <rd...@apache.org> wrote:

> +            // XXX really this should use line separator!
> +            // XXX should also probably check for pretty print
> +            // XXX also probably have difficulties with encoding
> +            try 
> +            {
> +                out.write('\n');
> +            }

Why not use the System.getProperty("line.separator")?

-jon


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: cvs commit: jakarta-ecs/src/java/org/apache/ecs/xml XMLDocument.java

Posted by robert burrell donkin <ro...@mac.com>.
On Monday, January 28, 2002, at 11:03 PM, Jon Scott Stevens wrote:

> on 1/28/02 2:50 PM, "rdonkin@apache.org" <rd...@apache.org> wrote:
>
>> +            // XXX really this should use line separator!
>> +            // XXX should also probably check for pretty print
>> +            // XXX also probably have difficulties with encoding
>> +            try
>> +            {
>> +                out.write('\n');
>> +            }
>
> Why not use the System.getProperty("line.separator")?

well spotted jon :)

i think that i should really be using ConcreteElement.lineSeparator.

problem is that the way that XMLDocument is structured makes it really 
hard to do things properly without major surgery. i've never liked how 
XMLDocument was written but i've never really had any real desire/need to 
rewrite it. hence the path of least resistance...

i'm also not very confident about the encoding logic in XMLDocument. i'd 
need to think about the right way to convert the line.separator string to 
the byte array that's required.

if you think that it's an improvement that's worth the effort, i'll try to 
get up to speed on the encoding and make the change. (but it might take me 
a while)

- robert


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>