You can subscribe to this list here.
2003 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(9) |
Oct
(2) |
Nov
(9) |
Dec
(5) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2004 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(6) |
Jun
|
Jul
|
Aug
(5) |
Sep
|
Oct
|
Nov
|
Dec
|
2006 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(1) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: Bill H. <Bil...@Ac...> - 2003-11-12 03:42:40
|
Hi all, I hope someone can help. I'm trying to get my scripting stage to work (similar to what Qin was trying to do a while ago.) and I am getting this error that I don't know what to do with. I'm on babeldoc 1.1.9, jdk 1.4.1_01. The script works just fine in Rhino, but not in Babeldoc. Same directory, same classpath. Here's the Rhino: (the class is local in the directory) C:\jakarta-tomcat-4.1.24\webapps_QIP\PipelineProcessorHome>java org.mozilla.javascript.tools.shell.M ain Rhino 1.5 release 4.1 2003 04 21 js> importClass(Packages.PostToReflector); js> PostToReflector.Post(new java.io.FileInputStream("codelco.txt")); after creating InputSource from filename stdin [- diagnostic message from class] First 2k:<?xml version="1.0" encoding="iso-8859-1"?> [.... lots of output from the class.] Here's the Babeldoc pipeline: entryStage=filewrite filewrite.stageType=FileWriter filewrite.append=false filewrite.outputFile=file.txt filewrite.nextStage=sendAckHttp sendAckHttp.stageType=Scripting sendAckHttp.language=javascript sendAckHttp.script=\ importClass(Packages.PostToReflector); \ PostToReflector.PostToReflector(new java.io.FileInputStream("file.txt")); sendAckHttp.nextStage=null Here's the error thrown: <2003-11-11 22:33:23,992> INFO [main] : PipelineStage name: filewrite <2003-11-11 22:33:24,162> INFO [main] : PipelineStage name: sendAckHttp <2003-11-11 22:33:25,134> ERROR [main] : [DefaultPipelineStageErrorHandler.handlePipelineStageError ] PipelineStage name: sendAckHttp Error: com.babeldoc.core.pipeline.PipelineException: Script proces sing failed: JavaScript Error: Function importClass must be called with a class; had "[JavaPackage P ostToReflector]" instead. <2003-11-11 22:33:25,154> ERROR [main] : [PipelineFeeder.process] org.apache.bsf.BSFException: JavaScript Error: Function importClass must be called with a class; had "[JavaPackage PostToReflector]" instead. at org.apache.bsf.engines.javascript.JavaScriptEngine.handleError(Unknown Source) at org.apache.bsf.engines.javascript.JavaScriptEngine.eval(Unknown Source) at org.apache.bsf.util.BSFEngineImpl.exec(Unknown Source) at org.apache.bsf.BSFManager$6.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at org.apache.bsf.BSFManager.exec(Unknown Source) at com.babeldoc.core.pipeline.stage.ScriptingPipelineStage.process(Unknown Source) at com.babeldoc.core.pipeline.PipelineStage.processStage(Unknown Source) at com.babeldoc.core.pipeline.processor.SyncPipelineStageProcessor.processPipelineStage( Unkn own Source) at com.babeldoc.core.pipeline.processor.SyncPipelineStageProcessor.process(Unknown Source) ... more. Any idea what I should do? Thanks in advance, Bill |
From: McDonald, B. <Bru...@ba...> - 2003-10-01 18:11:12
|
Can you do a little debugging and find out exactly what is throwing the NPE? -----Original Message----- From: Bill Harrelson [mailto:Bil...@ac...] Sent: Wednesday, October 01, 2003 10:00 AM To: McDonald, Bruce; bab...@li... Subject: RE: [Babeldoc-devel] Can anyone help? Setting up babeldoc-web Hi Bruce, Well, I tried "password", and got the appended exception. As I see a lot of apache and singlesign-on stuff in their, my guess is that babeldoc is using some apache authentication stuff that is in conflict with the single-sign on stuff that I have set up for the website. Also you mentioned that this is done through com.babeldoc.core.simple, and "simple" was the class not found when I had the jar conflict with commons-digester. So perhaps the null pointer is for simple? Any suggestions? Thanks. Bill <2003-10-01 09:51:20,551> ERROR [HttpProcessor[80][4]] : [ConsoleServlet.handle Request] Error java.lang.NullPointerException at com.babeldoc.web.main.ConsoleServlet.handleSecurity(Unknown Source) at com.babeldoc.web.main.ConsoleServlet.handleRequest(Unknown Source) at org.apache.velocity.servlet.VelocityServlet.doRequest(VelocityServlet .java:372) at org.apache.velocity.servlet.VelocityServlet.doGet(VelocityServlet.jav a:333) at javax.servlet.http.HttpServlet.service(HttpServlet.java:740) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl icationFilterChain.java:247) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF ilterChain.java:193) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWra pperV alve.java:256) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveCo ntex t.invokeNext(StandardPipeline.java:643) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.ja v a:480) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:9 95) at org.apache.catalina.core.StandardContextValve.invoke(StandardCont extV alve.java:191) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveCo ntex t.invokeNext(StandardPipeline.java:643) at org.apache.catalina.valves.CertificatesValve.invoke(CertificatesValve .java:246) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveCo ntex t.invokeNext(StandardPipeline.java:641) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.ja v a:480) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:9 95) at org.apache.catalina.core.StandardContext.invoke(StandardContext.ja va: 2415) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostVal ve.j ava:180) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveCo ntex t.invokeNext(StandardPipeline.java:643) at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatch e rValve.java:171) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveCo ntex t.invokeNext(StandardPipeline.java:641) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.j ava:172) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveCo ntex t.invokeNext(StandardPipeline.java:641) at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.j ava: 509) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveCo ntex t.invokeNext(StandardPipeline.java:641) at org.apache.catalina.authenticator.SingleSignOn.invoke(SingleSignOn .ja va:376) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveCo ntex t.invokeNext(StandardPipeline.java:641) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.ja v a:480) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:9 95) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngin eVal ve.java:174) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveCo ntex t.invokeNext(StandardPipeline.java:643) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.ja v a:480) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:9 95) at org.apache.catalina.connector.http.HttpProcessor.process(HttpProce sso r.java:1040) at org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor. ja va:1151) at java.lang.Thread.run(Thread.java:536) On 30 Sep 2003 at 12:06, McDonald, Bruce wrote: > Bill, > > At the moment the user stuff is handled by the "simple" user factory > etc. This code is to be found in package: > com.babeldoc.core.user.simple. The "heart" of this is in the class: > SimpleUserFactory. And the authentication code is in method: authent > icate. This code is HARDCODED to accept passwords of name > "password". All usernames are acceptable except usernames starting > with "z" - go figure. There is a SQL implementation of this code that > allows for usernames/passwords/roles to be stored in a > db. > > regards, > Bruce. > > -----Original Message----- > From: Bill Harrelson [mailto:Bil...@Ac...] > Sent: Tuesday, September 30, 2003 11:40 AM > To: bab...@li...; > Bab...@li... > Subject: [Babeldoc-devel] Can anyone help? Setting up babeldoc-web > > > Hi, I sent this a week ago, and nobody has answered yet, so I'm > sure that it has dropped off the bottom of the list. Can anyone help? > I'm trying to connect Babeldoc to a web application and I can't seem > to get it to work. I'm getting a little worried, as I have a tight > deadline. > > I found the directions in modules/web/readme.txt for building and > setting up babeldoc with my web server and it mostly worked, but there > seems to be some conflict between my basic jakarta-tomcat- 4.1.24 > setup in the commons-digester.jar. When I start with the tomcat one, > it starts fine, when I start with the one copied over by babeldoc it > fails pretty quickly with a class not found error. > > Anyway, I'm able to get the babeldoc console up, but when I try to > access the journal, modules or pipelines it asks for a username and > password and I don't know how to set those up. My tomcat currently > uses database-based access control, so I assume that I just need a > role defined, but don't know what that is. Can someone tell me? > Anybody willing to spend 15 minutes on the phone with me? > > Thanks for any assistance, > > Bill > > > > > ------------------------------------------------------- > This sf.net email is sponsored by:ThinkGeek > Welcome to geek heaven. > http://thinkgeek.com/sf > _______________________________________________ > Babeldoc-user mailing list > Bab...@li... > https://lists.sourceforge.net/lists/listinfo/babeldoc-user > ------- End of forwarded message ------- -- William B. Harrelson President Accordare 13A Medford Street, Arlington, MA 02474 t:781-646-2241 f:781-646-2242 Bil...@Ac... |
From: Bill H. <Bil...@Ac...> - 2003-10-01 14:03:36
|
Hi Bruce, Well, I tried "password", and got the appended exception. As I see a lot of apache and singlesign-on stuff in their, my guess is that babeldoc is using some apache authentication stuff that is in conflict with the single-sign on stuff that I have set up for the website. Also you mentioned that this is done through com.babeldoc.core.simple, and "simple" was the class not found when I had the jar conflict with commons-digester. So perhaps the null pointer is for simple? Any suggestions? Thanks. Bill <2003-10-01 09:51:20,551> ERROR [HttpProcessor[80][4]] : [ConsoleServlet.handle Request] Error java.lang.NullPointerException at com.babeldoc.web.main.ConsoleServlet.handleSecurity(Unknown Source) at com.babeldoc.web.main.ConsoleServlet.handleRequest(Unknown Source) at org.apache.velocity.servlet.VelocityServlet.doRequest(VelocityServlet .java:372) at org.apache.velocity.servlet.VelocityServlet.doGet(VelocityServlet.jav a:333) at javax.servlet.http.HttpServlet.service(HttpServlet.java:740) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl icationFilterChain.java:247) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF ilterChain.java:193) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWra pperV alve.java:256) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveCo ntex t.invokeNext(StandardPipeline.java:643) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.ja v a:480) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:9 95) at org.apache.catalina.core.StandardContextValve.invoke(StandardCont extV alve.java:191) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveCo ntex t.invokeNext(StandardPipeline.java:643) at org.apache.catalina.valves.CertificatesValve.invoke(CertificatesValve .java:246) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveCo ntex t.invokeNext(StandardPipeline.java:641) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.ja v a:480) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:9 95) at org.apache.catalina.core.StandardContext.invoke(StandardContext.ja va: 2415) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostVal ve.j ava:180) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveCo ntex t.invokeNext(StandardPipeline.java:643) at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatch e rValve.java:171) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveCo ntex t.invokeNext(StandardPipeline.java:641) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.j ava:172) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveCo ntex t.invokeNext(StandardPipeline.java:641) at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.j ava: 509) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveCo ntex t.invokeNext(StandardPipeline.java:641) at org.apache.catalina.authenticator.SingleSignOn.invoke(SingleSignOn .ja va:376) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveCo ntex t.invokeNext(StandardPipeline.java:641) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.ja v a:480) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:9 95) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngin eVal ve.java:174) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveCo ntex t.invokeNext(StandardPipeline.java:643) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.ja v a:480) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:9 95) at org.apache.catalina.connector.http.HttpProcessor.process(HttpProce sso r.java:1040) at org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor. ja va:1151) at java.lang.Thread.run(Thread.java:536) On 30 Sep 2003 at 12:06, McDonald, Bruce wrote: > Bill, > > At the moment the user stuff is handled by the "simple" user factory > etc. This code is to be found in package: > com.babeldoc.core.user.simple. The "heart" of this is in the class: > SimpleUserFactory. And the authentication code is in method: authent > icate. This code is HARDCODED to accept passwords of name > "password". All usernames are acceptable except usernames starting > with "z" - go figure. There is a SQL implementation of this code that > allows for usernames/passwords/roles to be stored in a > db. > > regards, > Bruce. > > -----Original Message----- > From: Bill Harrelson [mailto:Bil...@Ac...] > Sent: Tuesday, September 30, 2003 11:40 AM > To: bab...@li...; > Bab...@li... > Subject: [Babeldoc-devel] Can anyone help? Setting up babeldoc-web > > > Hi, I sent this a week ago, and nobody has answered yet, so I'm > sure that it has dropped off the bottom of the list. Can anyone help? > I'm trying to connect Babeldoc to a web application and I can't seem > to get it to work. I'm getting a little worried, as I have a tight > deadline. > > I found the directions in modules/web/readme.txt for building and > setting up babeldoc with my web server and it mostly worked, but there > seems to be some conflict between my basic jakarta-tomcat- 4.1.24 > setup in the commons-digester.jar. When I start with the tomcat one, > it starts fine, when I start with the one copied over by babeldoc it > fails pretty quickly with a class not found error. > > Anyway, I'm able to get the babeldoc console up, but when I try to > access the journal, modules or pipelines it asks for a username and > password and I don't know how to set those up. My tomcat currently > uses database-based access control, so I assume that I just need a > role defined, but don't know what that is. Can someone tell me? > Anybody willing to spend 15 minutes on the phone with me? > > Thanks for any assistance, > > Bill > > > > > ------------------------------------------------------- > This sf.net email is sponsored by:ThinkGeek > Welcome to geek heaven. > http://thinkgeek.com/sf > _______________________________________________ > Babeldoc-user mailing list > Bab...@li... > https://lists.sourceforge.net/lists/listinfo/babeldoc-user > ------- End of forwarded message ------- -- William B. Harrelson President Accordare 13A Medford Street, Arlington, MA 02474 t:781-646-2241 f:781-646-2242 Bil...@Ac... |
From: McDonald, B. <Bru...@ba...> - 2003-09-30 18:50:57
|
Bill, At the moment the user stuff is handled by the "simple" user factory etc. This code is to be found in package: com.babeldoc.core.user.simple. The "heart" of this is in the class: SimpleUserFactory. And the authentication code is in method: authenticate. This code is HARDCODED to accept passwords of name "password". All usernames are acceptable except usernames starting with "z" - go figure. There is a SQL implementation of this code that allows for usernames/passwords/roles to be stored in a db. regards, Bruce. -----Original Message----- From: Bill Harrelson [mailto:Bil...@Ac...] Sent: Tuesday, September 30, 2003 11:40 AM To: bab...@li...; Bab...@li... Subject: [Babeldoc-devel] Can anyone help? Setting up babeldoc-web Hi, I sent this a week ago, and nobody has answered yet, so I'm sure that it has dropped off the bottom of the list. Can anyone help? I'm trying to connect Babeldoc to a web application and I can't seem to get it to work. I'm getting a little worried, as I have a tight deadline. I found the directions in modules/web/readme.txt for building and setting up babeldoc with my web server and it mostly worked, but there seems to be some conflict between my basic jakarta-tomcat- 4.1.24 setup in the commons-digester.jar. When I start with the tomcat one, it starts fine, when I start with the one copied over by babeldoc it fails pretty quickly with a class not found error. Anyway, I'm able to get the babeldoc console up, but when I try to access the journal, modules or pipelines it asks for a username and password and I don't know how to set those up. My tomcat currently uses database-based access control, so I assume that I just need a role defined, but don't know what that is. Can someone tell me? Anybody willing to spend 15 minutes on the phone with me? Thanks for any assistance, Bill ------------------------------------------------------- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf _______________________________________________ Babeldoc-user mailing list Bab...@li... https://lists.sourceforge.net/lists/listinfo/babeldoc-user ------- End of forwarded message ------- |
From: McDonald, B. <Bru...@ba...> - 2003-09-30 18:29:54
|
Bill I am looking into this one. You are most of the way there. Bruce. -----Original Message----- From: Bill Harrelson [mailto:Bil...@Ac...] Sent: Tuesday, September 30, 2003 11:40 AM To: bab...@li...; Bab...@li... Subject: [Babeldoc-devel] Can anyone help? Setting up babeldoc-web Hi, I sent this a week ago, and nobody has answered yet, so I'm sure that it has dropped off the bottom of the list. Can anyone help? I'm trying to connect Babeldoc to a web application and I can't seem to get it to work. I'm getting a little worried, as I have a tight deadline. I found the directions in modules/web/readme.txt for building and setting up babeldoc with my web server and it mostly worked, but there seems to be some conflict between my basic jakarta-tomcat- 4.1.24 setup in the commons-digester.jar. When I start with the tomcat one, it starts fine, when I start with the one copied over by babeldoc it fails pretty quickly with a class not found error. Anyway, I'm able to get the babeldoc console up, but when I try to access the journal, modules or pipelines it asks for a username and password and I don't know how to set those up. My tomcat currently uses database-based access control, so I assume that I just need a role defined, but don't know what that is. Can someone tell me? Anybody willing to spend 15 minutes on the phone with me? Thanks for any assistance, Bill ------------------------------------------------------- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf _______________________________________________ Babeldoc-user mailing list Bab...@li... https://lists.sourceforge.net/lists/listinfo/babeldoc-user ------- End of forwarded message ------- |
From: Bill H. <Bil...@Ac...> - 2003-09-30 15:45:54
|
Hi, I sent this a week ago, and nobody has answered yet, so I'm sure that it has dropped off the bottom of the list. Can anyone help? I'm trying to connect Babeldoc to a web application and I can't seem to get it to work. I'm getting a little worried, as I have a tight deadline. I found the directions in modules/web/readme.txt for building and setting up babeldoc with my web server and it mostly worked, but there seems to be some conflict between my basic jakarta-tomcat- 4.1.24 setup in the commons-digester.jar. When I start with the tomcat one, it starts fine, when I start with the one copied over by babeldoc it fails pretty quickly with a class not found error. Anyway, I'm able to get the babeldoc console up, but when I try to access the journal, modules or pipelines it asks for a username and password and I don't know how to set those up. My tomcat currently uses database-based access control, so I assume that I just need a role defined, but don't know what that is. Can someone tell me? Anybody willing to spend 15 minutes on the phone with me? Thanks for any assistance, Bill ------------------------------------------------------- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf _______________________________________________ Babeldoc-user mailing list Bab...@li... https://lists.sourceforge.net/lists/listinfo/babeldoc-user ------- End of forwarded message ------- |
From: Bill H. <Bil...@Ac...> - 2003-09-25 18:41:23
|
I found the directions in modules/web/readme.txt for building and setting up babeldoc with my web server and it mostly worked, but there seems to be some conflict between my basic jakarta-tomcat- 4.1.24 setup in the commons-digester.jar. When I start with the tomcat one, it starts fine, when I start with the one copied over by babeldoc it fails pretty quickly with a class not found error. Anyway, I'm able to get the babeldoc console up, but when I try to access the journal, modules or pipelines it asks for a username and password and I don't know how to set those up. My tomcat currently uses database-based access control, so I assume that I just need a role defined, but don't know what that is. Can someone tell me? Thanks, Bill |
From: Bill H. <Bil...@Ac...> - 2003-09-24 00:22:46
|
Thanks David that helps a lot. It was the document.toString() that I didn't understand, as I've found examples of document.get("attr_name") in the examples. Thanks also for the test script, I was just about to have to write one. - Now I'll just modify yours. regards, Bill On 23 Sep 2003 at 16:34, David Glick wrote: > Hi Bill, > > There is no default attribute for the document. You have to put it > into a new attribute. For example: > > ###### > # Save the document into an attribute > ###### > initialize.stageType=Scripting > initialize.nextStage=<whatever> > initialize.failOnError=true > initialize.language=javascript > initialize.script=\ > document.put("main_document", document.toString()); > > Then, you can replace the current document by simply over-writing it > with the contents of another attribute (or any other data from a > script or file or whatever): > > ###### > # Extract the response from the attribute and replace the document > # with the response > ###### > extract-response.stageType=Scripting > extract-response.nextStage=branch-on-error > extract-response.failOnError=true > extract-response.tracked=true > extract-response.language=javascript > extract-response.script=\ > document.setBytes(document.get("desired_attribute").getBytes());\ > document.setMimeType("text/xml"); > > After you're done processing, you can then use the above to place the > original document back into the main document. > > I have a test stage I use to dump all the attributes of a document. > You're welcome to use it: > > ----------------------------------- > ###### > # List all attributes on this document > ###### > get-attributes.stageType=Scripting > get-attributes.nextStage=console-writer > get-attributes.language=javascript > get-attributes.script=\ > var keyset = document.getAttributes().keySet();\ > var keyiter = keyset.iterator();\ > var bufr = new java.lang.StringBuffer();\ > bufr.append("<attributes>\\n");\ > while(keyiter.hasNext()) {\ > var key = keyiter.next();\ > var cls = document.get(key);\ > bufr.append(key + "=" + cls + "\\n");\ > }\ > bufr.append("</attributes>\\n");\ > document.setBytes(bufr.toString().getBytes());\ > document.setMimeType("text/xml"); > > ###### > # This stage is useful for testing; it writes the current document to > # stdout. Unfortunately, it only works under Unix. Sorry... :-( > ###### > console-writer.stageType=FileWriter > console-writer.nextStage=null > console-writer.outputFile=/dev/tty > ----------------------------------- > > Hope this helps, > > David > > On Tuesday 23 September 2003 2:50 pm, Bill Harrelson wrote: > > This is very similar to what I need to do as well. What I don't > > understand is how to do these described steps, as I can't find any > > documentation on what variables are available to the script. Is > > there an example somewhere? > > > > Thanks, > > > > Bill > > > > The steps I don't understand how to do are: > > > b) Place the original document into an attribute > > > > (what is the attribute for the document body? I understand how to > > assign a > > new attribute.) > > > > > c) Replace the current document with the report to be e-mailed. > > > > and > > (probably answered by the answer above??) > > > > > e) Move the original document from the attribute in which it is > > > stored back into the current document > > > > (converse of b I suppose).-- > > William B. Harrelson > > President > > Accordare > > 13A Medford Street, Arlington, MA 02474 > > t:781-646-2241 f:781-646-2242 > > Bil...@Ac... > > > > > > > > ------------------------------------------------------- > > This sf.net email is sponsored by:ThinkGeek > > Welcome to geek heaven. > > http://thinkgeek.com/sf > > _______________________________________________ > > Babeldoc-user mailing list > > Bab...@li... > > https://lists.sourceforge.net/lists/listinfo/babeldoc-user > > -- > David Glick > Transmit Consulting, Inc > 619-475-4052 > dg...@tr... > > > > ------------------------------------------------------- > This sf.net email is sponsored by:ThinkGeek > Welcome to geek heaven. > http://thinkgeek.com/sf > _______________________________________________ > Babeldoc-user mailing list > Bab...@li... > https://lists.sourceforge.net/lists/listinfo/babeldoc-user |
From: David G. <dg...@co...> - 2003-09-23 23:30:47
|
Hi Bill, There is no default attribute for the document. You have to put it into a new attribute. For example: ###### # Save the document into an attribute ###### initialize.stageType=Scripting initialize.nextStage=<whatever> initialize.failOnError=true initialize.language=javascript initialize.script=\ document.put("main_document", document.toString()); Then, you can replace the current document by simply over-writing it with the contents of another attribute (or any other data from a script or file or whatever): ###### # Extract the response from the attribute and replace the document # with the response ###### extract-response.stageType=Scripting extract-response.nextStage=branch-on-error extract-response.failOnError=true extract-response.tracked=true extract-response.language=javascript extract-response.script=\ document.setBytes(document.get("desired_attribute").getBytes());\ document.setMimeType("text/xml"); After you're done processing, you can then use the above to place the original document back into the main document. I have a test stage I use to dump all the attributes of a document. You're welcome to use it: ----------------------------------- ###### # List all attributes on this document ###### get-attributes.stageType=Scripting get-attributes.nextStage=console-writer get-attributes.language=javascript get-attributes.script=\ var keyset = document.getAttributes().keySet();\ var keyiter = keyset.iterator();\ var bufr = new java.lang.StringBuffer();\ bufr.append("<attributes>\\n");\ while(keyiter.hasNext()) {\ var key = keyiter.next();\ var cls = document.get(key);\ bufr.append(key + "=" + cls + "\\n");\ }\ bufr.append("</attributes>\\n");\ document.setBytes(bufr.toString().getBytes());\ document.setMimeType("text/xml"); ###### # This stage is useful for testing; it writes the current document to stdout. # Unfortunately, it only works under Unix. Sorry... :-( ###### console-writer.stageType=FileWriter console-writer.nextStage=null console-writer.outputFile=/dev/tty ----------------------------------- Hope this helps, David On Tuesday 23 September 2003 2:50 pm, Bill Harrelson wrote: > This is very similar to what I need to do as well. What I don't > understand is how to do these described steps, as I can't find any > documentation on what variables are available to the script. Is there > an example somewhere? > > Thanks, > > Bill > > The steps I don't understand how to do are: > > b) Place the original document into an attribute > > (what is the attribute for the document body? I understand how to assign a > new attribute.) > > > c) Replace the current document with the report to be e-mailed. > > and > (probably answered by the answer above??) > > > e) Move the original document from the attribute in which it is stored > > back into the current document > > (converse of b I suppose).-- > William B. Harrelson > President > Accordare > 13A Medford Street, Arlington, MA 02474 > t:781-646-2241 f:781-646-2242 > Bil...@Ac... > > > > ------------------------------------------------------- > This sf.net email is sponsored by:ThinkGeek > Welcome to geek heaven. > http://thinkgeek.com/sf > _______________________________________________ > Babeldoc-user mailing list > Bab...@li... > https://lists.sourceforge.net/lists/listinfo/babeldoc-user -- David Glick Transmit Consulting, Inc 619-475-4052 dg...@tr... |
From: Bill H. <Bil...@Ac...> - 2003-09-23 21:54:26
|
This is very similar to what I need to do as well. What I don't understand is how to do these described steps, as I can't find any documentation on what variables are available to the script. Is there an example somewhere? Thanks, Bill The steps I don't understand how to do are: > b) Place the original document into an attribute (what is the attribute for the document body? I understand how to assign a new attribute.) > c) Replace the current document with the report to be e-mailed. and (probably answered by the answer above??) > e) Move the original document from the attribute in which it is stored > back into the current document (converse of b I suppose).-- William B. Harrelson President Accordare 13A Medford Street, Arlington, MA 02474 t:781-646-2241 f:781-646-2242 Bil...@Ac... |
From: David G. <dg...@co...> - 2003-09-23 19:26:48
|
Hi Qin, 1) You should set the environment variable BABELDOC_USER to point at your project directory. 2) While you can certainly subclass the PipelineStage to perform your validation, an easier approach may be to use the Scripting stage and just call your validation routines inline. Creating a new stage type requires a bit more familiarity with the Babeldoc environment. 3) Regarding e-mailing your report, you might do something like the following: a) Call your validation routines via a Scripting stage. b) Place the original document into an attribute c) Replace the current document with the report to be e-mailed. d) Use the SmtpWriter stage to e-mail your report e) Move the original document from the attribute in which it is stored back into the current document f) Continue processing It sounds like you've got a pretty good handle on everything else. Hope this helps, David On Tuesday 23 September 2003 11:57 am, Qin Ding wrote: > I am trying to use this tool. From what I read, this is an excellent tool > for me. I read the user guide and white paper and usage documents and > developer guide twice and I am still not sure of how to put this project > together. > > My babeldoc home (BABELDOC_HOME env variable) > c:\babeldoc > It has lib and bin directory which has all the scripts and jar files from > your build/lib and build/bin. In c:\babeldoc\lib, it also has my own jar > (longlegs-validation.jar) and apache common-validator.jar > > My project home > c:\myproject\longlegs\ > In your documents, at one place, it states that I need to set up USER_DIR > env variable pointing to this project directory; and at another place in > the document, it asks to include this directory in the classpath. Which way > should I go? > > Under the longlegs folder, I have > config folder > config/scanner sub-folder. In here, I have config.properties for the > scanner like this: > > daddy-longlegs.type=directory > daddy-longlegs.period=10000 > daddy-longlegs.inDirectory=/daddy/longlegs/in > daddy-longlegs.doneDirectory=/daddy/longlegs/done > daddy-longlegs.pipeline=longlegs > > pipeline folder. In here, I have config.properties like this: > > longlegs.type=simple > longlegs.configFile=pipeline/simple/longlegs > > pipeline/simple folder. In here, I have longlegs.properties, and > flat2xml-convert.xml like this: > > entryStage=validate > validate.stageType=DataValidation > validate.nextStage=convert > > convert.stageType=FlatToXml > convert.nextStage=transform > convert.flatToXmlFile=/longlegs/pipeline/simple/flat2xml-convert.xml > > transform.stageType=XslTransform > transform.nextStage=null > > flat2xml-convert.xml is omitted here. It is the copy of yours. > > journal > journal/simple > > Also > I have created two directories > C:\daddy\longlegs\in > C:\daddy\longlegs\done > > I want to drop a flat file (delimited by comma, or tab, or vertical bar) in > c:\daddy\longlegs\in folder. The scanner should pass the file to my > pipeline stage "DataValidation". I need to write this pipeline stage. As > I understand, all I need to do is to subclass the PipelineStage. In that > class, I should implement process method to call my validation logics, > which I have jar-ed and deployed in c:\babeldoc\lib directory along with > apache common-validator. > > Now, where should I deploy my pipelineStage DataValidation class? In my > longlegs/pipeline directory or some new directory I should add to the > longlegs/pipeline directory? > > A validation report (html) is dynamically generated during the validation > stage. This report, Not original flat file, needs to be mailed out. How do > I add the report from my DataValidate stage to the mail pipelineStage? > Also, I believe I can use the FileWriter pipelineStage to write the html > report out. So, the key is to introduce the report to the mail and > filewriter stage, not the original flat file. How do I do that? > > If I can successfully put all these together quickly, I'd like to present > this tool to my manager for considering to use in our next project. Your > help is greatly appreciated. Thanks. > > Qin > --------------------------------------------------------------------------- >------------- > > This is a PRIVATE message. If you are not the intended recipient, please > delete without copying and kindly advise us by e-mail of the mistake in > delivery. NOTE: Regardless of content, this e-mail shall not operate to > bind CSC to any order or other contract unless pursuant to explicit written > agreement or government initiative expressly permitting the use of e-mail > for such purpose. > --------------------------------------------------------------------------- >------------- > > > > > > > ------------------------------------------------------- > This sf.net email is sponsored by:ThinkGeek > Welcome to geek heaven. > http://thinkgeek.com/sf > _______________________________________________ > Babeldoc-user mailing list > Bab...@li... > https://lists.sourceforge.net/lists/listinfo/babeldoc-user -- David Glick Transmit Consulting, Inc 619-475-4052 dg...@tr... |
From: Qin D. <qd...@cs...> - 2003-09-23 18:59:03
|
I am trying to use this tool. From what I read, this is an excellent tool for me. I read the user guide and white paper and usage documents and developer guide twice and I am still not sure of how to put this project together. My babeldoc home (BABELDOC_HOME env variable) c:\babeldoc It has lib and bin directory which has all the scripts and jar files from your build/lib and build/bin. In c:\babeldoc\lib, it also has my own jar (longlegs-validation.jar) and apache common-validator.jar My project home c:\myproject\longlegs\ In your documents, at one place, it states that I need to set up USER_DIR env variable pointing to this project directory; and at another place in the document, it asks to include this directory in the classpath. Which way should I go? Under the longlegs folder, I have config folder config/scanner sub-folder. In here, I have config.properties for the scanner like this: daddy-longlegs.type=directory daddy-longlegs.period=10000 daddy-longlegs.inDirectory=/daddy/longlegs/in daddy-longlegs.doneDirectory=/daddy/longlegs/done daddy-longlegs.pipeline=longlegs pipeline folder. In here, I have config.properties like this: longlegs.type=simple longlegs.configFile=pipeline/simple/longlegs pipeline/simple folder. In here, I have longlegs.properties, and flat2xml-convert.xml like this: entryStage=validate validate.stageType=DataValidation validate.nextStage=convert convert.stageType=FlatToXml convert.nextStage=transform convert.flatToXmlFile=/longlegs/pipeline/simple/flat2xml-convert.xml transform.stageType=XslTransform transform.nextStage=null flat2xml-convert.xml is omitted here. It is the copy of yours. journal journal/simple Also I have created two directories C:\daddy\longlegs\in C:\daddy\longlegs\done I want to drop a flat file (delimited by comma, or tab, or vertical bar) in c:\daddy\longlegs\in folder. The scanner should pass the file to my pipeline stage "DataValidation". I need to write this pipeline stage. As I understand, all I need to do is to subclass the PipelineStage. In that class, I should implement process method to call my validation logics, which I have jar-ed and deployed in c:\babeldoc\lib directory along with apache common-validator. Now, where should I deploy my pipelineStage DataValidation class? In my longlegs/pipeline directory or some new directory I should add to the longlegs/pipeline directory? A validation report (html) is dynamically generated during the validation stage. This report, Not original flat file, needs to be mailed out. How do I add the report from my DataValidate stage to the mail pipelineStage? Also, I believe I can use the FileWriter pipelineStage to write the html report out. So, the key is to introduce the report to the mail and filewriter stage, not the original flat file. How do I do that? If I can successfully put all these together quickly, I'd like to present this tool to my manager for considering to use in our next project. Your help is greatly appreciated. Thanks. Qin ---------------------------------------------------------------------------------------- This is a PRIVATE message. If you are not the intended recipient, please delete without copying and kindly advise us by e-mail of the mistake in delivery. NOTE: Regardless of content, this e-mail shall not operate to bind CSC to any order or other contract unless pursuant to explicit written agreement or government initiative expressly permitting the use of e-mail for such purpose. ---------------------------------------------------------------------------------------- |