Skip to Content.
Sympa Menu

xom-interest - Re: [XOM-interest] XML whitespace in text

xom-interest AT lists.ibiblio.org

Subject: XOM API for Processing XML with Java

List archive

Chronological Thread  
  • From: Elliotte Rusty Harold <elharo AT metalab.unc.edu>
  • To: Dick H <dick AT wt.net>, xom-interest AT lists.ibiblio.org
  • Subject: Re: [XOM-interest] XML whitespace in text
  • Date: Mon, 28 Apr 2003 20:20:35 -0400

At 2:55 PM -0500 4/28/03, Dick H wrote:


If just the setIndent() is called on the Serializer, then the problem occurs. So you have identified when the problem can happen.

That's not a bug then. When you request indenting I feel entitled to change spaces to line breaks and line breaks to spaces as necessary. XOM won't do that unless you ask it to, but in this example you have so requested.

However, one could certainly make an argument that the pretty printing should be limited to the XML markup and not the content.


I don't think that's what most users want when indenting. More to the point, I think perhaps I should be using insignificant white space to pretty print as much as possible without changing the document's content. However, that's another discussion.
--

+-----------------------+------------------------+-------------------+
| Elliotte Rusty Harold | elharo AT metalab.unc.edu | Writer/Programmer |
+-----------------------+------------------------+-------------------+
| Processing XML with Java (Addison-Wesley, 2002) |
| http://www.cafeconleche.org/books/xmljava |
| http://www.amazon.com/exec/obidos/ISBN%3D0201771861/cafeaulaitA |
+----------------------------------+---------------------------------+
| Read Cafe au Lait for Java News: http://www.cafeaulait.org/ |
| Read Cafe con Leche for XML News: http://www.cafeconleche.org/ |
+----------------------------------+---------------------------------+
From Nils_Kilden-Pedersen AT Countrywide.Com Mon Apr 28 20:48:55 2003
Return-Path: <Nils_Kilden-Pedersen AT Countrywide.Com>
Delivered-To: xom-interest AT lists.ibiblio.org
Received: from simsmtp2.cwdir.com (simsmtp2.cwdir.com [63.166.226.151])
by happyhouse.metalab.unc.edu (Postfix) with SMTP id A8B6320073
for <xom-interest AT lists.ibiblio.org>;
Mon, 28 Apr 2003 20:48:54 -0400 (EDT)
Received: from 63.166.226.133 by simsmtp1.cwdir.com with ESMTP ( (MMS
v5.0)); Mon, 28 Apr 2003 17:48:29 -0700
X-Server-Uuid: 217DC97D-783B-48DA-932A-43F4820B4412
In-Reply-To: <p04330100bad375385fb0@[192.168.254.4]>
To: xom-interest AT lists.ibiblio.org
Subject: Re: [XOM-interest] XML whitespace in text
MIME-Version: 1.0
X-Mailer: Lotus Notes Release 6.0.1 February 07, 2003
Message-ID:
<OFD6785BF1.6349FBCD-ON88256D17.000454C5-88256D17.00046E1F AT countrywide.com>
From: Nils_Kilden-Pedersen AT Countrywide.Com
Date: Mon, 28 Apr 2003 17:48:21 -0700
X-Form: Reply
X-MIMETrack: Serialize by Router on Emerald/Servers/CWExternal(Build
V602_04222003|April 22, 2003) at 04/28/2003 05:46:24 PM, Serialize
complete at 04/28/2003 05:46:24 PM
X-WSS-ID: 12B3145767727-03-01
Content-Type: text/plain;
charset=us-ascii
Content-Transfer-Encoding: 7bit
X-BeenThere: xom-interest AT lists.ibiblio.org
X-Mailman-Version: 2.1.1
Precedence: list
List-Id: <xom-interest.lists.ibiblio.org>
List-Unsubscribe: <http://lists.ibiblio.org/mailman/listinfo/xom-interest>,
<mailto:xom-interest-request AT lists.ibiblio.org?subject=unsubscribe>
List-Archive: <https://lists.ibiblio.org/sympa/arc/xom-interest>
List-Post: <mailto:xom-interest AT lists.ibiblio.org>
List-Help: <mailto:sympa AT lists.ibiblio.org?subject=HELP>
List-Subscribe: <http://lists.ibiblio.org/mailman/listinfo/xom-interest>,
<mailto:xom-interest-request AT lists.ibiblio.org?subject=subscribe>
X-List-Received-Date: Tue, 29 Apr 2003 00:48:55 -0000

Couldn't that be solved with a CDATA section?


xom-interest-bounces AT lists.ibiblio.org wrote on 04/28/2003 05:20:35 PM:

At 2:55 PM -0500 4/28/03, Dick H wrote:


>If just the setIndent() is called on the Serializer, then the >problem occurs. So you have identified when the problem can happen.

That's not a bug then. When you request indenting I feel entitled to change spaces to line breaks and line breaks to spaces as necessary. XOM won't do that unless you ask it to, but in this example you have so requested.

>However, one could certainly make an argument that the pretty >printing should be limited to the XML markup and not the content.
>

I don't think that's what most users want when indenting. More to the point, I think perhaps I should be using insignificant white space to pretty print as much as possible without changing the document's content. However, that's another discussion.
--

+-----------------------+------------------------+-------------------+
| Elliotte Rusty Harold | elharo AT metalab.unc.edu | Writer/Programmer |
+-----------------------+------------------------+-------------------+
| Processing XML with Java (Addison-Wesley, 2002) |
| http://www.cafeconleche.org/books/xmljava |
| http://www.amazon.com/exec/obidos/ISBN%3D0201771861/cafeaulaitA |
+----------------------------------+---------------------------------+
| Read Cafe au Lait for Java News: http://www.cafeaulait.org/ |
| Read Cafe con Leche for XML News: http://www.cafeconleche.org/ |
+----------------------------------+---------------------------------+
_______________________________________________
XOM-interest mailing list
XOM-interest AT lists.ibiblio.org
http://lists.ibiblio.org/mailman/listinfo/xom-interest






Archive powered by MHonArc 2.6.24.

Top of Page