Issue Details (XML | Word | Printable)

Key: JELLY-191
Type: Improvement Improvement
Status: Closed Closed
Resolution: Fixed
Priority: Minor Minor
Assignee: Unassigned
Reporter: Marc DeXeT
Votes: 0
Watchers: 1
Operations

If you were logged in you would be able to see more operations.
Commons Jelly

FileTag must allow to append to flat file

Created: 07/Jan/05 06:31 PM   Updated: 26/Jan/05 11:11 PM
Component/s: core / taglib.core
Affects Version/s: 1.0-beta-4
Fix Version/s: 1.0-RC2

Time Tracking:
Not Specified

Resolution Date: 26/Jan/05 09:38 PM


 Description  « Hide
Core FileTag allows to write only XML or HTML content to file.
But there's a need to write flat content unix-like or in pseudo-xml (element collection without document root).
So FileTag must allow to write flat content to file.
Proposition to add a boolean "flat" property.

There also a need to add "append" property to.. append to existing file



 All   Comments   Work Log   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
Paul Libbrecht added a comment - 07/Jan/05 08:08 PM
A patch ?
(shouldn't be too hard)

I am unclear about the exact semantic of flat... I guess it's a summary of some other properties (e.g. no XML-header and ....).

paul


dion gillard added a comment - 07/Jan/05 09:53 PM
Huh? the file tag can write non-xml data. Just use the omitXmlDeclaration="true". What about that doesn't work?

Paul Libbrecht added a comment - 12/Jan/05 10:37 PM
Although that doesn't append, I think the following scripts shows the wished output so that blank-management is possible with the help of the trim attribute.
The only thing that'd be left would be to add an append flag to the Tag, seems quite easy.

paul

<?xml version="1.0" encoding="utf-8" ?>
<jelly xmlns="jelly:core" >
<new var="sections" className="java.util.LinkedList"/>
<new var="sec1" className="java.util.LinkedList"/>
<mute>${sec1.add('sleeping')}
${sec1.add('dreaming')}
${sec1.add('eating')}
${sections.add(sec1)}
<new var="sec2" className="java.util.LinkedList"/>
${sec2.add('working')}
${sec2.add('stressing')}
${sec2.add('firing')}
${sections.add(sec1)}</mute>

<forEach var="section" items="${sections}" trim="false">[GOALS_section]
<forEach var="idea" items="${section}">${idea}
</forEach>
</forEach>
</jelly>


Paul Libbrecht added a comment - 22/Jan/05 05:43 AM
I'd like to close this issue, it is working fine.
Use <file append="true" ....>.

paul


dion gillard added a comment - 26/Jan/05 09:38 PM
Paul has fixed this I believe.

dion gillard added a comment - 26/Jan/05 09:48 PM
AFAICT append is only checked when working with the name attribute set.

I propose fixing it for the case of 'var' as well.


Paul Libbrecht added a comment - 26/Jan/05 11:11 PM
Have added the append to be valid for var as well... sorry for this omission.
paul

Paul Libbrecht added a comment - 26/Jan/05 11:11 PM
Fixed in CVS.
paul