[jdom-interest] Keeping newlines in attribute values
    Christian Hirsch 
    hp at netbook.se
       
    Wed Oct 24 05:57:10 PDT 2001
    
    
  
Hi.
I need to keep the plain test formatting in longer texts received in 
the value of an attribute, but can't figure out how to do so.
Example of an incoming document:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE tst_message SYSTEM "file:/tmp/tst_message.dtd">
<tst_message>
<tst_text
	message="Here are some linesof text I need to know the plain
text fomatting of, that is where the newlines originally 
were placed. Especially important in texts like:
2001                   Quite Nice
2000                   Not so Nice
1999                   Ok"
/>
</tst_message> 
Where the DTD (file:/tmp/tst_message.dtd) looks like:
<!ELEMENT tst_message  (tst_text) >
<!ELEMENT tst_text     EMPTY >
<!ATTLIST tst_text  message CDATA  #REQUIRED >
So, how do I keep the newlines in the message attribute?
Anyone got any ideas?
Best Regards
Christian Hirsch
------------------------------------------------------
hp at netbook.se                   www.netbook.se
hp at hirsch.pp.se                 www.hirsch.pp.se
    
    
More information about the jdom-interest
mailing list