Bugs item #1180791, was opened at 2005-04-11 15:01 Message generated for change (Comment added) made by tfromm You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=116035&aid=1180791&group_id=16035
Category: None Group: None Status: Open Resolution: None Priority: 5 Submitted By: Thomas Fromm (tfromm) Assigned to: Nobody/Anonymous (nobody) Summary: trimtext and newline problem in 1.5.x Initial Comment: In 1.4 modifyes the trimText(true) option for the OutputFormat not only the values between tags but inside the tags. e.g. source: <foo> bar </foo> result: <foo>bar</foo> So i decided to set trimText(false). But i wanted to have newlines between the tags and so i used newlines(true). Everything fine. In 1.5.2 is the behaviour a littlebit different. trimText is still false and newlines is true but instead of: <foo> <bar/> </foo> i get: <foo> <bar/> </foo> Simply too much newlines. if i disable newlines, i get: <foo> <bar/></foo> Ok, newline=true appends newlines after the tags without removing possible older existing newline tags. This would be not problem, if trimText=true never touches the value of tags, only removing whitespaces and similar stuff between tags. source: <Test> <foo> bar </foo> </Test> my expected result of trimtext: <Test><foo> bar </foo></Test> Of course dont change the current default behaviour, just add an option, that allows the user to decide, if he wants also the content of tags should be trimmed. ---------------------------------------------------------------------- >Comment By: Thomas Fromm (tfromm) Date: 2005-04-13 09:34 Message: Logged In: YES user_id=79402 Sorry, had wrong test results. It happens with writers and with streams. If i read pretty document and have not "trimtext" enabled at outputformat, then the result are too much new lines. ---------------------------------------------------------------------- Comment By: Thomas Fromm (tfromm) Date: 2005-04-13 09:28 Message: Logged In: YES user_id=79402 It seems, that the multiple newlines at storing only happens, when i load a pretty printed document and store it into a outputstream. Using a Writer seems to work. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=116035&aid=1180791&group_id=16035 ------------------------------------------------------- SF email is sponsored by - The IT Product Guide Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now. http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click _______________________________________________ dom4j-dev mailing list dom4j-dev@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/dom4j-dev