[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

SAXON: ElementCopier, \n needed?

Subject: SAXON: ElementCopier, \n needed?
From: Zsolt Czinkos <czinkos@xxxxxxxxxxxxx>
Date: Mon, 16 Aug 1999 18:33:57 +0000
SAXON: ElementCopier
Hello all,

A few days ago I wrote about a problem I ran into while I was using
SAXON to split and transform2HTML XML files. The problem was:

The input could be let's say:

<text>Bla bla bla <name>J. Smith</name>, blab bla blablablabla.</text>

I used the SAXON 4.5 API and wrote a small program to split bigger
files. The default element handler was ElementCopier. This handler puts
a \n after all endElement. So the result is:

<text>Bla bla bla <name>J. Smith</name>
, blab bla blablablabla.</text>

The problem is that the \n is shown in browsers as space, so when
displaying as HTML with a servlet:

Bla bla bla J. Smith , blab bla blablablabla.
                   ^^^^^


My question is: Is that \n really needed? 


The part of com.icl.saxon.handlers.ElementCopier which I've mentioned:

...
public void endElement( ElementInfo e, Context context ) throws
SAXException
{
    Outputter out = context.getOutputter();
    out.write( "</" );
    out.write(e.getName());
    out.write( ">\n" );
}
...


Again: Is it really needed? Probably there's something in the background
but I don't know what.


Thank you very much,

Zsolt Czinkos


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.