|
From: McDonald, B. <Bru...@ba...> - 2003-10-23 23:26:34
|
-----Original Message-----
From: McDonald, Bruce
Sent: Thursday, October 23, 2003 11:14 AM
To: 'us...@co...'
Subject: RE: Babeldoc 1.2.0-RC2 Release
Babeldoc is really quit different from Cocoon.
Introduction
------------
Everthing is build around pipelines (which is similar to cocoon) but babeldoc does not require any kind of web container (cocoon used to require this). The configuration of babeldoc is also quite interesting. Here is a small pipeline:
>>>>> PROPERTIES BASED PIPELINE CONFIGURATION <<<<<
entryStage=hello
hello.stageType=Scripting
hello.nextStage=attrcheck
hello.language=javascript
hello.script=\
importClass(Packages.java.lang.System);\
java.lang.System.out.println("Running report");\
var yyQn=document.get("yyQn");\
java.lang.System.out.println("yyQn = "+yyQn);
attrcheck.stageType=Scripting
attrcheck.nextStage=query
attrcheck.language=javascript
attrcheck.scriptFile=core/scripts/attrcheck.js
attrcheck.attrs.env_name=The attribute: env_name must be either test or prod
attrcheck.attrs.yyQn=The attribute: yyQn for the year and quarter must be supplied
#attrcheck.attrs.YYMM=The attribute: YYMM (Year and month) must be supplied
query.stageType=SqlQuery
query.nextStage=xmlwriter
query.resourceName=seg_tera
query.sql.select1=select count(*) from YYYYY${document.get('yyQn')}.ZZZZZ
query.sql.select2=select count(*) from YYYYY${document.get('yyQn')}.FFFFF
query.sql.select3=select count(*) from YYYYY${document.get('yyQn')}.HHHHHH
query.sql.select4=select count(*) from YYYYY${document.get('yyQn')}.UUUUUUUUU
query.sql.select5=select count(distinct GGGGGG) from vdwq${document.get('yyQn')}.JJJJJJJ where seg_alg_use_cd='C'
#xmlwriter.stageType=FileWriter
xmlwriter.stageType=Null
xmlwriter.nextStage=transform
xmlwriter.outputFile=out.xml
transform.stageType=XslTransform
transform.nextStage=htmlwriter
transform.transformationFile=documents/seg_html.xsl
transform.param.yyQn=${document.get('yyQn')}
htmlwriter.stageType=FileWriter
htmlwriter.nextStage=script
htmlwriter.outputFile=/${document.get("env_name")}/some/out/put/seg_rpt.html
script.stageType=Scripting
script.nextStage=null
script.language=javascript
script.scriptFile=scripts/agefile.js
script.maxAge=3
script.fileName=/${document.get("env_name")}/some/out/put/seg_rpt.html
script.extension=htm
<<<<<< END PIPELINE CONFIGURATION >>>>>>>>>>>>>>>
XML Configuration
-----------------
Note this can be done using XML too - I just find it a little tiresome to do the same semantic thing in XML which can be long winded and hard to follow for my eyes.
Pipeline Configuration
----------------------
Notice how the pipeline stages are explicitly noted. Notice again that you do not have to declare pipeline stages - there is a concept of a service in Babeldoc which abstracts the Java class from the service name. This service name can be overridden in private customization (generally by setting the BABELDOC_USER environment variable).
Modularization
--------------
A pipeline consists of pipeline stages. Each stage is of a certain type. This is illustrated above: FileWriter, XsltTransform, etc, etc. It is possible to call other pipeline stages from pipelines. This can be used to promote modularity in pipelines.
Configuration
-------------
All of the configuration is merged so that your customer configuration does not override the default (out of the box configuration) - you just need to supply the "differences" and then babeldoc will merge the configuration. This makes configuring babeldoc a snap. Think about you never having to mess with the sitemap.conf file - you leave the one that comes with Cocoon, and you just supply your customizations.
Journaling
-----------
This allows babeldoc to store all operations performed on a document and then play back those operations so that processing maybe resumed in those cases where it is interrupted. This is necessary for large sites with critical data.
J2ee
----
Babeldoc is fully j2ee integrated - its major components are implemented as EJBs and support remote operation - this allows for some very interesting sitations where the processing is split between clients and servers.
Scanning
--------
Babeldoc has a document scanner that is able to detect and retrieve documents from a number of places included SMPT, filesystem, FTP, http, soap, etc and then process them. This makes standalone system design quite nice.
And more...
Bruce.
-----Original Message-----
From: Oleg Dulin [mailto:du...@ol...]
Sent: Thursday, October 23, 2003 10:53 AM
To: us...@co...
Subject: Re: Babeldoc 1.2.0-RC2 Release
How come you didn't use COcoon as a based framework ?
Also, how does it compare with http://www.openadaptor.org/
Oleg
McDonald, Bruce wrote:
> As much as I work with Cocoon (which is a lot), I want to announce that the second release candidate for Babeldoc 1.2 has been release.
>
> Babeldoc is intended for those applications which Cocoon is not suitable. It is generally a commandline utility. It is dynamically modular, both at build time (think dynamic blocks) and at runtime - the blocks auto-discover themselves and initialize in strict dependancy order.
>
> Babeldoc is also not strictly XML based although this is where most function is added. Unfortunately it is slower than Cocoon since it does not propagate SAX events, rather the entire document. This is necessary due to the heterogeneous nature of the documents it can process.
>
> Check it out:
>
> www.babeldoc.com
>
> Bruce.
>
> PS. It is licensed under the Apache Public License.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: use...@co...
> For additional commands, e-mail: use...@co...
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: use...@co...
For additional commands, e-mail: use...@co...
|