fmpp-open Mailing List for FMPP: FreeMarker-based File PreProcessor (Page 4)
Brought to you by:
ddekany
You can subscribe to this list here.
| 2003 |
Jan
|
Feb
|
Mar
(2) |
Apr
|
May
|
Jun
|
Jul
(23) |
Aug
(4) |
Sep
(11) |
Oct
(7) |
Nov
|
Dec
(2) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2004 |
Jan
(3) |
Feb
|
Mar
(1) |
Apr
|
May
|
Jun
(5) |
Jul
|
Aug
|
Sep
(2) |
Oct
(9) |
Nov
(2) |
Dec
|
| 2005 |
Jan
(2) |
Feb
(9) |
Mar
|
Apr
(1) |
May
|
Jun
(11) |
Jul
|
Aug
|
Sep
|
Oct
(1) |
Nov
|
Dec
|
| 2006 |
Jan
(2) |
Feb
(14) |
Mar
(4) |
Apr
|
May
(6) |
Jun
(7) |
Jul
(7) |
Aug
|
Sep
(4) |
Oct
|
Nov
|
Dec
|
| 2007 |
Jan
|
Feb
|
Mar
|
Apr
(1) |
May
|
Jun
(2) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(1) |
| 2009 |
Jan
(2) |
Feb
(2) |
Mar
(1) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(10) |
Nov
|
Dec
(3) |
| 2010 |
Jan
(9) |
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
(2) |
Aug
(2) |
Sep
|
Oct
(2) |
Nov
|
Dec
|
| 2012 |
Jan
|
Feb
|
Mar
|
Apr
(2) |
May
(2) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2014 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(1) |
Oct
|
Nov
|
Dec
|
|
From: Bruce P. <bpe...@ya...> - 2006-02-09 19:49:09
|
Thanks for responding, works like a charm. Sorry, but I missed it in the doc.
Thanks again for your help!
Daniel Dekany <dd...@fr...> wrote: Wednesday, February 8, 2006, 11:20:37 PM, Bruce Perryman wrote:
> Hi again,
>
> I was wondering if it is possible to get very fancy by substituting
> an expression within an expression.
>
> For example:
>
> Instead of:
>
> �${x.name}
>
> �${x.${y}} where y evaluates to name.
Write ${x[y]}. (See in the FreeMarker Manual.)
--
Best regards,
Daniel Dekany
-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems? Stop! Download the new AJAX search engine that makes
searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid3432&bid#0486&dat1642
_______________________________________________
fmpp-open mailing list
fmp...@li...
https://lists.sourceforge.net/lists/listinfo/fmpp-open
---------------------------------
Relax. Yahoo! Mail virus scanning helps detect nasty viruses! |
|
From: Daniel D. <dd...@fr...> - 2006-02-08 22:58:20
|
Wednesday, February 8, 2006, 11:20:37 PM, Bruce Perryman wrote:
> Hi again,
>
> I was wondering if it is possible to get very fancy by substituting
> an expression within an expression.
>
> For example:
>
> Instead of:
>
> =A0${x.name}
>
> =A0${x.${y}} where y evaluates to name.
Write ${x[y]}. (See in the FreeMarker Manual.)
--=20
Best regards,
Daniel Dekany
|
|
From: Bruce P. <bpe...@ya...> - 2006-02-08 22:20:46
|
Hi again,
I was wondering if it is possible to get very fancy by substituting an expression within an expression.
For example:
Instead of:
${x.name}
${x.${y}} where y evaluates to name.
---------------------------------
Relax. Yahoo! Mail virus scanning helps detect nasty viruses! |
|
From: Daniel D. <dd...@fr...> - 2006-02-06 22:35:22
|
Monday, February 6, 2006, 10:18:59 PM, Bruce Perryman wrote:
> Hi,
>
> I'm a newbie, and I wondered if there was a way around this.
>
> An element in a list has a '.' in the name. When I try to evaluate
> the _expression in FreeMarker an exception is thrown.
>
> The List contains the value I.lastname. When I try to access it from wi=
thin the
> =A0<#list name as x> as
>
> "${x.I.lastname}"
>
> FreeMarker tells me that x.I is undefined. Other than changing the
> element name, is there a way to do this?
??? Huh? I see you are newbie, as you use some kind of terminology that
I don't understand. :) List items doesn't have a name. They have an
integer index. Anyway, if what you really want is the read a subvariable
whose name contains dot (or whatever special character), then here is
how to do it:
foo["x.y.z"]
This will get the subvariable of "foo", which is called x.y.z.
--=20
Best regards,
Daniel Dekany
|
|
From: Bruce P. <bpe...@ya...> - 2006-02-06 21:19:11
|
Hi,
I'm a newbie, and I wondered if there was a way around this.
An element in a list has a '.' in the name. When I try to evaluate the _expression in FreeMarker an exception is thrown.
The List contains the value I.lastname. When I try to access it from within the
<#list name as x> as
"${x.I.lastname}"
FreeMarker tells me that x.I is undefined. Other than changing the element name, is there a way to do this?
Thanks.
---------------------------------
Brings words and photos together (easily) with
PhotoMail - it's free and works with Yahoo! Mail. |
|
From: Bruce P. <bpe...@ya...> - 2006-02-02 13:59:32
|
Thanks for responding. Yes, I know that member variables are accessed by accessor and mutator functions in java, I just didn't realize that FreeMarker was 'smart' enough to do so. Thanks again for your help. Daniel Dekany <dd...@fr...> wrote: Wednesday, February 1, 2006, 5:03:20 PM, Bruce Perryman wrote: > I think I understand now, based on your response. Again, I'm new to > this (FreeMarker). I was looking at the class member names not the names from the� methods. In Java you usually don't access fields directly outside that class that contains the fields, but through methods. Accessing properties looks similar as accessing fields in FreeMarker (and in some other languages), but in fact properties are accessed via setter/getter methods. -- Best regards, Daniel Dekany ------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Do you grep through log files for problems? Stop! Download the new AJAX search engine that makes searching your log files as easy as surfing the web. DOWNLOAD SPLUNK! http://sel.as-us.falkag.net/sel?cmd=lnk&kid3432&bid#0486&dat1642 _______________________________________________ fmpp-open mailing list fmp...@li... https://lists.sourceforge.net/lists/listinfo/fmpp-open --------------------------------- Do you Yahoo!? With a free 1 GB, there's more in store with Yahoo! Mail. |
|
From: Daniel D. <dd...@fr...> - 2006-02-01 16:13:03
|
Wednesday, February 1, 2006, 5:03:20 PM, Bruce Perryman wrote: > I think I understand now, based on your response. Again, I'm new to > this (FreeMarker). I was looking at the class member names not the name= s from the=A0 methods. In Java you usually don't access fields directly outside that class that contains the fields, but through methods. Accessing properties looks similar as accessing fields in FreeMarker (and in some other languages), but in fact properties are accessed via setter/getter methods. --=20 Best regards, Daniel Dekany |
|
From: Bruce P. <bpe...@ya...> - 2006-02-01 16:03:28
|
I think I understand now, based on your response. Again, I'm new to this (FreeMarker). I was looking at the class member names not the names from the methods.
Thanks.
Daniel Dekany <dd...@fr...> wrote: It's strange what you are saying, because FreeMarker (and FMPP) doesn't
"translate" any names. It uses JavaBean property names as is (according
the JavaBeans specification), and Map items with their string keys as
is. Maybe your predecessor did some hack, like defined property names
explicitly in Java rather than letting it deduce them from the method
names, or plugged in a custom FreeMarker ObjectWrapper.
Or, where does the said collection come from? How is it "loaded" into
the data model?
--
Best regards,
Daniel Dekany
Tuesday, January 31, 2006, 6:00:02 PM, Bruce Perryman wrote:
Hi,
I've inherited a project that uses freemarker and I need help
understanding a concept. I am very new to freemarker. A Collection
(List) is being used with a <#list> directive namely if the collection
is named stuff, the <#list> is:
<#list stuff as x>
and its elements as
${x.fieldname} where fieldname is an element in the collection.
What confuses me is that the fieldnames used aren't consistent with the
definition of the collection. For example, if the collection is defined
as having fields day_of_week and emp_Id, the syntax of the list
references
${x.dayOfWeek} and ${x.empID}
How do I find out where the mapping of the names takes place?
Thanks for your help in advance.
Yahoo! Autos. Looking for a sweet ride? Get pricing, reviews, & more on new and used cars.
-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems? Stop! Download the new AJAX search engine that makes
searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642
_______________________________________________
fmpp-open mailing list
fmp...@li...
https://lists.sourceforge.net/lists/listinfo/fmpp-open
---------------------------------
What are the most popular cars? Find out at Yahoo! Autos |
|
From: Daniel D. <dd...@fr...> - 2006-01-31 19:36:58
|
It's strange what you are saying, because FreeMarker (and FMPP) doesn't
"translate" any names. It uses JavaBean property names as is (according
the JavaBeans specification), and Map items with their string keys as
is. Maybe your predecessor did some hack, like defined property names
explicitly in Java rather than letting it deduce them from the method
names, or plugged in a custom FreeMarker ObjectWrapper.
Or, where does the said collection come from? How is it "loaded" into
the data model?
--
Best regards,
Daniel Dekany
Tuesday, January 31, 2006, 6:00:02 PM, Bruce Perryman wrote:
Hi,
I've inherited a project that uses freemarker and I need help
understanding a concept. I am very new to freemarker. A Collection
(List) is being used with a <#list> directive namely if the collection
is named stuff, the <#list> is:
<#list stuff as x>
and its elements as
${x.fieldname} where fieldname is an element in the collection.
What confuses me is that the fieldnames used aren't consistent with the
definition of the collection. For example, if the collection is defined
as having fields day_of_week and emp_Id, the syntax of the list
references
${x.dayOfWeek} and ${x.empID}
How do I find out where the mapping of the names takes place?
Thanks for your help in advance.
Yahoo! Autos. Looking for a sweet ride? Get pricing, reviews, & more on new and used cars.
|
|
From: Bruce P. <bpe...@ya...> - 2006-01-31 17:00:19
|
Hi,
I've inherited a project that uses freemarker and I need help understanding a concept. I am very new to freemarker.
A Collection (List) is being used with a <#list> directive namely if the collection is named stuff, the <#list> is:
<#list stuff as x>
and its elements as
${x.fieldname} where fieldname is an element in the collection.
What confuses me is that the fieldnames used aren't consistent with the definition of the collection. For example, if the collection is defined as having fields day_of_week and emp_Id, the syntax of the list references
${x.dayOfWeek} and ${x.empID}
How do I find out where the mapping of the names takes place?
Thanks for your help in advance.
---------------------------------
Yahoo! Autos. Looking for a sweet ride? Get pricing, reviews, & more on new and used cars. |
|
From: Daniel D. <dd...@fr...> - 2005-10-23 12:41:45
|
FMPP 0.9.10 is released. Download: http://prdownloads.sourceforge.net/fmpp/fmpp_0.9.10.tar.gz http://prdownloads.sourceforge.net/fmpp/fmpp_0.9.10.zip Changes ------- New features, improvements: * The pp.newWritableSequence and pp.newWritableHash methods now have an optional parameter, which is the sequence or hash whose items are added to the new writable sequence or hash. This makes pp.copyWritable deprecated, which was not able to create writable sequences/hashes based on non-writable ones. * New setting: "objectWrapper". This let FreeMarker "experts" to create and fully configure the freemarker.template.ObjectWrapper object that FMPP will use. * Java API: a new fmpp.Engine constructor now let you specify the freemarker.template.ObjectWrapper to use. * FreeMarker 2.3.4 is included in the distribution. Note the new feature of FreeMarket that let you use [#...], [@...], etc instead of <#...>, <@...>, etc if you start the template with [#ftl]. * <FMPP>/docs/examples/multipage_list was updated to use sequence?chunk(pageSize), instead of complex BeanShell script that was needed before FreeMarker 2.3.3. * Manual improvements. Bugfixes: * On Windows, fmpp.bat has sometimes build the CLASSPATH badly that ruined the command line call to java.exe and caused it to die with a strange ClassNotFoundError. * When a file is copied in "copy" processing mode, FMPP now sets the last modification time of the destination file to the last modification time of the source file. Warning! Incompatible Java API change! The FMPP engine has used and modified the shared freemarker.template.ObjectWrapper.BEANS_WRAPPER object, which is dangerous. From now by default it uses its own ObjectWrapper instance. If you have utilized that it uses the shared ObjectWrapper.BEANS_WRAPPER object (not recommended!), then for 100% backward compatibility you have to use the objectWrapper setting with this value: "ow = ObjectWrapper.BEANS_WRAPPER; ow.setSimpleMapWrapper(true); return ow;" (or if you don't use FMPP settings, do this in Java where you create the engine object: ObjectWrapper ow = ObjectWrapper.BEANS_WRAPPER; ow.setSimpleMapWrapper(true); Engine eng = new Engine(ObjectWrapper.BEANS_WRAPPER); ) -- Best regards, Daniel Dekany |
|
From: Daniel D. <dd...@fr...> - 2005-06-29 16:15:57
|
Wednesday, June 29, 2005, 4:50:21 PM, Tilman Sommer wrote: > > > > Is there a way to force FMPP to copy files while > preserving timestamps (same as /bin/cp -p on Unix?) > > > The wasn't, but that's a good point, so now it *always* copies the > time-stamp when copying a file. (Or can you imagine a case where one > doesn't want that?) You can grab the this latest version > here:http://fmpp.sourceforge.net/qfix/fmpp.jarTell me if it works. > > That was quick! And it works perfectly. Many thanks! > > I'm just a bit concerned, that the new jar > is 300 kB versus 302 kB of the original fmpp.jar in FMPP 0.9.9. > But I guess, that can happen. (?) It can, because the efficiency of the compressing depends on the exact content. If you extract both jar-s, 0.9.9 will be the smaller. BTW, note this not-really-BC change (from the version history of the unreleased 0.9.10): The FMPP engine has used and modified the freemarker.template.ObjectWrapper.BEANS_WRAPPER object, which is dangerous. From now by default it uses its own ObjectWrapper instance. If you have utilized that it uses the shared ObjectWrapper.BEANS_WRAPPER, then from now you have to create the Engine instance like this: new Engine(freemarker.template.ObjectWrapper.BEANS_WRAPPER) or use the [!!UC] setting with value [!!UC]. > Thanks again > Tilman -- Best regards, Daniel Dekany |
|
From: Daniel D. <dd...@fr...> - 2005-06-29 15:37:03
|
Wednesday, June 29, 2005, 2:05:43 PM, Tilman Sommer wrote:
> I realize, this is not a FMPP topic but since we are in
> the middle of it already I just hope nobody minds
> discussing it a bit further.
>
> [snip]
>> The reason for not using XML syntax is that it would be very verbose.
>> Like, compare:
>>
>> <#if x>...</#if>
>>
>> <fm:if test="${x}">...</fm:if>
>
> Why not <fm:if test="x">... ?
You meant, why not <fm:if test="${x}">... ?
> Agreed, it is more verbose, but you gain a lot since you could use all
> XML tools then as well on FTL files.
Sure, if you follow a "standard" then you will have more 3rd party
tool... OTOH a lot of user don't like the verbosity of XML/JSP, and this
is an important reason why they prefer FreeMarker over them. I'm in that
camp too. Writing "programs" in XML is not just more typing, but the
result is harder to read... I lose in the sea of those redundant
delimiters (like "${ and }"). (SGML, whose subset XML is, was not
designed for writing programs, and it is bad in that. It was designed
for storing documents and other hierarchical *data*.) Now,
pluggalbe/configurable template language syntax is something that could
lead to satisfying everybody; chose the syntax the fits your job the
best. There is a progress in this direction, but... the problem is that
alternative syntaxes often require different semantic. Like, an XML
syntax assumes that all parameter is given by name. But some FreeMarker
directives use positional parameters too. Etc. Also, an XML syntax
require that you declare the types of the parameters, otherwise it can't
tell if in <@foo bar="123"> the value of "bar" is an integer or a
string. So I see it highly unlikely that pluggable/configurage syntax
will ever bring XML compliance.
> A normal XML parser would suffice for example, no need
> for a special FTP parser.
Well, FreeMarker authors don't care about that... they can write a
parser. I mean, they will not chose a different syntax just because they
are lazy to write a parser...
> I use jedit 4.2. It has a freemarker mode built-in, but this mode does
> not support code folding, also matching open-close pairs
> (<#list>...</#list>) are not indicated. I assume, this is because
> freemarker has no strict matching pair requirements as well-formed XML
> (e.g. <#include>).
It's not because of that. FreeMarker has strict requirements, just
nobody has written a good plug-in for it. Technically it is clearly
possible to "fold" an FTL file.
>> Also note that certain tasks can't be solved easily with keeping the
>> document well-formed XML, like try to do these:
>>
>> <p<#if forceAlignment> align="left"</#if>>...</p>
>
> See xslt:attribute
>
>> <${elementName}>...</${elementName}>
>
> See xslt:element
>
>> Of course some special construct could be introduced for that (like in
>> XSLT), but then FTL wouldn't be a general purpose text generator,
>> because it had to parse the static-text parts too as XML.
>
> Maybe what is really needed for XML processing is a XML compatible
> extension of FTL (some kind of XFTL). :)
>
>> Or what do you mean with "XML compliance" and why do you need that?
>
> I'm using it already - for me it is no show stopper. I just think for
> certain applications, it would be easier to deal with, similar
> to why XHTML came along replacing HTML sites more and more.
> You can now use existing validating XML parsers for example, etc.
My opinion about this whole thing is that for generating XML the ideal
template engine will be one that is not a flat text generator (like
FreeMarker or Velocity or WebMacro, which sees the output as a stream of
characters), but one that is specialized on XML, and generates an XML
document (i.e. a tree of nodes). A such template engine will not be
universal like FreeMarker, as practically you could use it only for
generating XML documents. But that's not a problem in itself... a Swiss
army knife is never as good as a specialized tool. FreeMarker will
always be a Swiss army knife.
--
Best regards,
Daniel Dekany
|
|
From: Tilman S. <ti...@so...> - 2005-06-29 14:51:01
|
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
<title></title>
</head>
<body bgcolor="#ffffff" text="#000000">
<br>
<blockquote cite="mid...@fr..." type="cite">
<blockquote type="cite">
<pre wrap="">Is there a way to force FMPP to copy files while
preserving timestamps (same as /bin/cp -p on Unix?)
</pre>
</blockquote>
<pre wrap=""><!---->
The wasn't, but that's a good point, so now it *always* copies the
time-stamp when copying a file. (Or can you imagine a case where one
doesn't want that?) You can grab the this latest version here:
<a class="moz-txt-link-freetext" href="http://fmpp.sourceforge.net/qfix/fmpp.jar">http://fmpp.sourceforge.net/qfix/fmpp.jar</a>
Tell me if it works.
</pre>
</blockquote>
That was quick! And it works perfectly. Many thanks!<br>
<br>
I'm just a bit concerned, that the new jar<br>
is 300 kB versus 302 kB of the original fmpp.jar in FMPP 0.9.9.<br>
But I guess, that can happen. (?)<br>
<br>
Thanks again<br>
Tilman
</body>
</html>
|
|
From: Daniel D. <dd...@fr...> - 2005-06-29 14:19:23
|
Wednesday, June 29, 2005, 2:45:06 PM, Tilman Sommer wrote: > Is there a way to force FMPP to copy files while > preserving timestamps (same as /bin/cp -p on Unix?) The wasn't, but that's a good point, so now it *always* copies the time-stamp when copying a file. (Or can you imagine a case where one doesn't want that?) You can grab the this latest version here: http://fmpp.sourceforge.net/qfix/fmpp.jar Tell me if it works. -- Best regards, Daniel Dekany |
|
From: Tilman S. <til...@gm...> - 2005-06-29 12:46:16
|
Is there a way to force FMPP to copy files while preserving timestamps (same as /bin/cp -p on Unix?) Thanx Tilman |
|
From: Tilman S. <til...@gm...> - 2005-06-29 12:06:52
|
I realize, this is not a FMPP topic but since we are in
the middle of it already I just hope nobody minds
discussing it a bit further.
[snip]
> The reason for not using XML syntax is that it would be very verbose.
> Like, compare:
>
> <#if x>...</#if>
>
> <fm:if test="${x}">...</fm:if>
Why not <fm:if test="x">... ? Agreed, it is more verbose, but
you gain a lot since you could use all XML tools then as well on
FTL files. A normal XML parser would suffice for example, no need
for a special FTP parser.
I use jedit 4.2. It has a freemarker mode built-in, but
this mode does not support code folding, also matching open-close
pairs (<#list>...</#list>) are not indicated. I assume,
this is because freemarker has no strict matching pair
requirements as well-formed XML (e.g. <#include>).
>
> Also note that certain tasks can't be solved easily with keeping the
> document well-formed XML, like try to do these:
>
> <p<#if forceAlignment> align="left"</#if>>...</p>
See xslt:attribute
> <${elementName}>...</${elementName}>
See xslt:element
> Of course some special construct could be introduced for that (like in
> XSLT), but then FTL wouldn't be a general purpose text generator,
> because it had to parse the static-text parts too as XML.
Maybe what is really needed for XML processing is a XML compatible
extension of FTL (some kind of XFTL). :)
> Or what do you mean with "XML compliance" and why do you need that?
I'm using it already - for me it is no show stopper. I just think for
certain applications, it would be easier to deal with, similar
to why XHTML came along replacing HTML sites more and more.
You can now use existing validating XML parsers for example, etc.
[snip]
Regards
Tilman
|
|
From: Daniel D. <dd...@fr...> - 2005-06-29 09:04:56
|
Wednesday, June 29, 2005, 2:50:54 AM, Tilman Sommer wrote:
> Hello,
>
> I'm using FMPP/Freemarker for about 6 months now and like it more
> and more. :)
> Except the fact, that Freemarker templates are not XML compatible. :(
> (Why didn't they use a namespace for example?)
The reason for not using XML syntax is that it would be very verbose.
Like, compare:
<#if x>...</#if>
<fm:if test="${x}">...</fm:if>
Also note that certain tasks can't be solved easily with keeping the
document well-formed XML, like try to do these:
<p<#if forceAlignment> align="left"</#if>>...</p>
<${elementName}>...</${elementName}>
Of course some special construct could be introduced for that (like in
XSLT), but then FTL wouldn't be a general purpose text generator,
because it had to parse the static-text parts too as XML.
Or what do you mean with "XML compliance" and why do you need that?
> Q1: is FMPP 0.9.9 compatible with Freemarker 2.3.3?
Sure, since 2.3.3 is compatible with all previous 2.3.x-es.
> Q2: For XPath support, what are the plans to accomodate the changes in
> J2SE 5.0 (org.apache classes moved to
> com.sun.org.apache.package.internal)? Or has this nothing to do with
> XPath?
It should still work, but you have to install Xalan, exactly like with
J2SE 1.3 or J2SE 1.2. However, Jaxen has improved a lot in the last few
months, so maybe you are better with Jaxen 1.1 beta 7 now. Jaxen was
always better with FreeMarker than Xalan because of its more powerful
public API, just it had several serious bugs (mostly XPath compliance
problems).
> Thanx
> Tilman
--
Best regards,
Daniel Dekany
|
|
From: Tilman S. <til...@gm...> - 2005-06-29 00:58:33
|
Hello, I'm using FMPP/Freemarker for about 6 months now and like it more and more. :) Except the fact, that Freemarker templates are not XML compatible. :( (Why didn't they use a namespace for example?) Q1: is FMPP 0.9.9 compatible with Freemarker 2.3.3? Q2: For XPath support, what are the plans to accomodate the changes in J2SE 5.0 (org.apache classes moved to com.sun.org.apache.package.internal)? Or has this nothing to do with XPath? Thanx Tilman |
|
From: Daniel D. <dd...@fr...> - 2005-06-16 14:12:24
|
My first answer was not too good... ?eval is an overkill here, since you
don't evaluate a generic expression, just want to get a variable by
name. So just use:
<#assign result=.var["${test}not"]>
--
Best regards,
Daniel Dekany
|
|
From: Daniel D. <dd...@fr...> - 2005-06-16 13:58:08
|
Thursday, June 16, 2005, 1:12:16 PM, Henrik Gemal wrote:
> I need to do something like this:
>
> <#assign coolnot="super" >
> <#assign test="cool">
> <#assign result="${test}not" >
> ${result}
>
> this produces "coolnot"
>
> Is there anyway to get it to produce "super" ????
Yes:
<#assign result="${test}not"?eval>
> I need it to look up the value of "coolnot" and not return the string
> "coolnot" ?
--
Best regards,
Daniel Dekany
|
|
From: Henrik G. <he...@ma...> - 2005-06-16 11:26:17
|
I need to do something like this:
<#assign coolnot="super" >
<#assign test="cool">
<#assign result="${test}not" >
${result}
this produces "coolnot"
Is there anyway to get it to produce "super" ????
I need it to look up the value of "coolnot" and not return the string
"coolnot" ?
|
|
From: Daniel D. <dd...@fr...> - 2005-04-12 21:10:28
|
FMPP 0.9.9 is released! Download: http://prdownloads.sourceforge.net/fmpp/fmpp_0.9.9.tar.gz New features, improvements: * The "csv" data loader was improved: . With the new headers option you can specify the header row for a CSV file that doesn't actually have a header row. . With the new "replaceHeaders" option you can override the header row of a CSV file. . The values returned for the rows are now not only hashes but also the sequences of the cells. * New data loader: "slicedText" for loading a text file as a sequence of strings. * Java API: New class: fmpp.dataloaders.AbstractTextDataLoader, to ease the creation of custom text file data loaders for Java programmers. * Java API: New StringUtil methods: normalizeNewliens, split with trimming. * Warning! Incompatible change! The + operator in TDD files and configuration files is not allowed anymore. This operator was used for adding hashes prior 0.9.0. Since 0.9.0 the preferred (and now required) way of adding hashes is different. For example, assuming that your configuration file is in "properties" format (that is, the extension of the FMPP configuration file is cfg or properties), instead of this: data={a:1, b:2} + properties(data/style.properties) + birds:csv(data/birds.csv) your should write this: data=a:1, b:2, tdd(data/style.tdd), birds:csv(data/birds.csv) Bugfixes: * The "csv" data loader has incorrectly interpreted "\n\r" as a single line-break. * Fixed some mistakes in the Manual and in the JavaDocs. -- Best regards, Daniel Dekany |
|
From: Daniel D. <dd...@fr...> - 2005-02-28 21:16:08
|
Monday, February 28, 2005, 3:21:13 PM, Ralf Hauser wrote: >> Starting from FMPP 0.9.9 (or with the latest version in the CVS until >> 0.9.9 is released) it's possible with the new slicedText(fileName[, >> options]) data loader. This reads a text file as a sequence of strings. >> The separator is by default "\n", but it can be changed with the >> options. > Right now, being able to change the EOL, i.e. the "recordSeparator" in the > csv dataloader to some value of my preference would be more important. I most probably will not add such option. The CSV data loader improvements of 0.9.9 are long-time really missing things for the handling of *genuine* CSV (and tab separated, etc) files. Of course you always have the option of sending a CSV data loader patch, or writing a custom data loader. (BTW, CSV files has an escaping rule, and I don't know if it's compatible with the files you process with the CSV data loader.) -- Best regards, Daniel Dekany ____________________________________________________________________ Miert fizetsz az internetert? Korlatlan, ingyenes internet hozzaferes a FreeStarttol. Probald ki most! http://www.freestart.hu |
|
From: Ralf H. <ral...@gm...> - 2005-02-28 14:21:15
|
> Starting from FMPP 0.9.9 (or with the latest version in the CVS until > 0.9.9 is released) it's possible with the new slicedText(fileName[, > options]) data loader. This reads a text file as a sequence of strings. > The separator is by default "\n", but it can be changed with the > options. Right now, being able to change the EOL, i.e. the "recordSeparator" in the csv dataloader to some value of my preference would be more important. |