Skip to Main Content

Java EE (Java Enterprise Edition) General Discussion

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

How to preserve a new line character inside an attribute?

843834Jan 19 2005 — edited Jan 20 2005
Hello folks,

Googled, searched in this forum... still couldn't find a solution... sorry if its a repost...

please take a look at below XML fragment.

....
<property name="helptext" value="some bla bla help


with new line" htmlname="helptext" displaytype="textarea" />
....

i'm using JAXP for server side merging of XML + XSLT. In above case, property element's 'value' attribute has new lines in it. Is there a way to preserve those when the server side merging is done using javax.xml.transform.Transformer?

some site advice to use "white-space-collapse" or "linefeed-treatment" but these seems to be working for node text and not for the attribute values.

When the same XML XSLT are merged using client browser (IE), it seems to be working fine.

Any help is highly appreciated.

Thanks
Nilesh
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Feb 17 2005
Added on Jan 19 2005
4 comments
726 views