File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes XML and Related Technologies and the fly likes How to avoid spawning new lines when processing? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Barcodes with iOS this week in the iOS forum
or Core Java for the Impatient in the Java 8 forum!

JavaRanch » Java Forums » Engineering » XML and Related Technologies
Bookmark "How to avoid spawning new lines when processing?" Watch "How to avoid spawning new lines when processing?" New topic

How to avoid spawning new lines when processing?

Alan Wanwierd
Ranch Hand

Joined: Jun 30, 2004
Posts: 624
I have a simple stylesheet who's aim is to simply convert attributes from uppercase to lowercase, without changing any of the values in the data.

However, when I run the transformation any 
 values get pre-pended by a & #13;...
so this:

translated by the following:


Any ideas why this is happening and how I can stop it?


ETA: Grrrrr Jranch has parsed my XML samples!!! So I've added spaces so you can see what I'm talking about!
[ October 11, 2007: Message edited by: Adrian Wanwierd ]
Paul Clapham

Joined: Oct 14, 2005
Posts: 19312

That is quite strange. Why don't you have a look at Section 3.3.3 of the XML Recommendation. It's headed "Attribute-Value Normalization" and it deals with what a parser is supposed to do to an attribute. I don't see it mentioning inserting 
 characters anywhere, so what you describe looks wrong to me. It even refers to section 2.11, which talks about removing 
 characters. And you certainly aren't inserting them in your transformation, not that I can see anyway.

(If you want the forum to not interpret your & characters, you have to escape them as & when you post.)
wood burning stoves
subject: How to avoid spawning new lines when processing?