Login  Register

Re: Users - 'Content loader'?

Posted by byersa on Feb 20, 2006; 3:31pm
URL: http://ofbiz.116.s1.nabble.com/Users-Content-loader-tp137470p137473.html

Andrew,

The key thing to note is how this line in data/DemoContent.xml:

<?xml version="1.0" encoding="UTF-8"?>
<entity-engine-transform-xml
template="org/ofbiz/ecommerce/data/content.ftl">
...

causes the content.ftl template to be run with the contents of
DemoContent.xml put in the ftl environment as the variable "doc". You
will see the "<#recurse doc>" statement. This starts the XSLT-like
processing of FreeMarker. That capability is really a gem - has all the
capabilities of XSLT, but allows the use of loops and is easier to call
Java functions. In this case, it causes the GenericValue literals to be
constructed and that is what is imported into the db.

When using the XML processing features of FreeMarker, it is important to
always include the "catch all" element:

<#macro @element>
</#macro>


-Al

Andrew Sykes wrote:

>Al,
>
>I've been looking at the...
>ecommerce/script/org/ofbiz/ecommerce/data direrctory.
>
>This stuff looks really good, but it's quite difficult to figure out
>exactly what's happening here.
>
>Is there any more information on this stuff?
>  
>

 
_______________________________________________
Users mailing list
[hidden email]
http://lists.ofbiz.org/mailman/listinfo/users