Re: Esql and rollback

2002-07-24 Thread yuryx

Leszek Gawron wrote:

>I'm quite new to JDBC and ESQL. My question is: I have more that one database
>inserts. Every one in different esql:execute tag. How can I rollback the
>transaction if say the 3rd goes wrong? There is no such esql tag and I do not
>know how to obtain the appropriate jdbc session variable? or maybe I'm totally
>wrong?
>   ouzo
>  
>
Open the new  connection like:

 mydriver
 dburl
 ... 
 ...

And set false in your connection.

Now you can use following syntax to commit or rollback changes:


 ... put your query here

commit (or rollback) 



May be that example solve your problem :)
 (Because I doesn't try this method in my work)

Regards.
Yury.



-
Please check that your question  has not already been answered in the
FAQ before posting. 

To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail:   <[EMAIL PROTECTED]>




RE: Actions - Basics

2002-07-24 Thread Vadim Gritsenko

> From: Richard [mailto:[EMAIL PROTECTED]]
> 
> Hi Guys
> 
> I am trying to compile the HelloWorldAction.java file under...
> 
> C:\Program Files\Apache Tomcat 4.0\webapps\cocoon\WEB-INF\lib\
> 
> the compiler gives me unresolve symbol errors for the
> org.apache.avalon.framework.*  and  org.apache.cocoon.*
classes/packages.
> 
> now what i did was look for these packages inside the
> 
> Apache Tomcat 4.0\webapps\cocoon\WEB-INF\lib\*.jar files,
> eventually I have found all the packages that i need. in the end i
have
> managed  to compile the HelloWorldAction. but what i got is an org
folder
> under the \WEB-INF\lib\ folder, containing packages for
org-apache-avalon,
> org-apache-cocoon and org-xml.
> 
> to illustrate...
> 
> WEB-INF\lib\ folder
>   |
>   |
>   | -> org
>  |
>  |--> apache
>  |  |--> avalon
>  |  |--> cocoon
>  |
>  |---> xml folder
> 
> Is this alright?

No.


> ( I think there is something wrong with it )

Yes. Get and read "JavaTM Servlet 2.3 Specification"
(servlet-2_3-fcs-spec.pdf) from
http://www.jcp.org/aboutJava/communityprocess/final/jsr053/, page 61:
 8< 
A special directory exists within the application hierarchy named
"WEB-INF".
...
. The /WEB-INF/classes/ directory for servlet and utility classes. The
classes
in this directory must be available to the application class loader.
. The /WEB-INF/lib/*.jar area for Java ARchive files. These files
contain
servlets, beans, and other utility classes useful to the web
application. The web application class loader must be able to load
classes from any of these archive files.
 8< 

All other pages are helpful too.



> Why cant the javac see the packages inside the jar files?
> 
> I have also tried to use the javac -classpath C:\Program Files\Apache
Tomcat
> 4.0\webapps\cocoon\WEB-INF\lib HelloWorldAction.java command. It gives
the
> same error.

First read
http://java.sun.com/j2se/1.3/docs/tooldocs/win32/classpath.html:
 8< 
Paths to the .jar, .zip or .class files. Each path should end with a
filename or directory depending on what you are setting the class path
to: 
For a .jar or .zip file that contains .class files, the path ends with
the name of the .zip or .jar file. 
For .class files in an unnamed package, the path ends with the directory
that contains the .class files. 
For .class files in a named package, the path ends with the directory
that contains the "root" package (the first package in the full package
name).
 8< 

Then continue with
http://java.sun.com/j2se/1.3/docs/tooldocs/win32/javac.html.


Vadim


> Notes:
> -I used the javac command in DOS mode to compile the java file.
> -JAVA_HOME = C:\jdk1.3.1_03
> -CATALINA_HOME = C:\Program Files\Apache Tomcat 4.0
> -CLASSPATH=C:\jdk1.3.1_03\lib;C:\Program Files\Apache Tomcat
> 4.0\webapps\cocoon\WEB-INF\lib
> -COCOON_HOME=C:\Program Files\Apache Tomcat 4.0\webapps\cocoon
> 
> PC Configuration
> --
> Windows 2000 Server Professional
> Java 2 SDK 1.3.01
> Jakarta Tomcat 4.0.4
> cocoon-2.0.2 dev
> 
> 
> Now I have add this line in the main sitemap file (C:\Program
Files\Apache
> Tomcat 4.0\webapps\cocoon\sitemap.xmap)
> 
>  src="org.apache.avalon.framework.test.HelloWorldAction"/>
> 
> is this correct?
> 
> Thanks in advance...


-
Please check that your question  has not already been answered in the
FAQ before posting. 

To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail:   <[EMAIL PROTECTED]>




Re: Schematron Validation 2

2002-07-24 Thread Ivelin Ivanov


Your assert can be 

test="string-length(input) = 0  or (more rules)"




- Original Message - 
From: <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, July 24, 2002 2:33 AM
Subject: Schematron Validation 2


> Another question:
> 
>I also have non mandatory fields - but if
>the user gives an input I want to validate the input.
>So, is there a way in Schematron to say
>if(input is not empty)
>   assert
> 
>Can I do something like nested asserts?
> 
> Thanx again for any help,
> 
> 
>  miHam
> 
> 
> -
> Please check that your question  has not already been answered in the
> FAQ before posting. 
> 
> To unsubscribe, e-mail: <[EMAIL PROTECTED]>
> For additional commands, e-mail:   <[EMAIL PROTECTED]>
> 


-
Please check that your question  has not already been answered in the
FAQ before posting. 

To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail:   <[EMAIL PROTECTED]>




Re: Schematron validation

2002-07-24 Thread Ivelin Ivanov

You should be able to do what you describe.
Sounds like a bug in the SchamatronValidator implementation,
not in Schematron itself.
Willing to hunt it down?


Ivelin

- Original Message - 
From: <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, July 24, 2002 1:51 AM
Subject: Schematron validation


> Hello,
> 
>please advise if the I can do the following with Schematron:
> 
>I want to use Schematron validation with my XML-Forms.
>eg.: The user has to input a Login Name.
>For this field I have several error messages:
>   LoginName must not be null,
> Login Name has to have between 5 and 20 characters
> and so on..
> 
> Now my problem is to display the error messages separated,
> as when I check if the String is empty all other assertions are true as
> well and I will see all error messages.
> 
> Is there a way to solve this problem ?
> 
> 
> thanks in advance for any help,
> 
> miHam
> 
> 
> -
> Please check that your question  has not already been answered in the
> FAQ before posting. 
> 
> To unsubscribe, e-mail: <[EMAIL PROTECTED]>
> For additional commands, e-mail:   <[EMAIL PROTECTED]>
> 


-
Please check that your question  has not already been answered in the
FAQ before posting. 

To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail:   <[EMAIL PROTECTED]>




RE: Excel generator

2002-07-24 Thread Coetmeur, Alain


you may look at 
extenXLS  (without a D)

this is an XLS read and write library...
commercial but cheap.

not very smart but do most of what most need:

- read data in excel spreadsheet
(get some numbres, strings, and formula computed numeric values)
- write some data in a tempalete excel file
(make a spread sheet, and let your program change the values
and produce the result)

we have used it for some project when we receive by mail
gathered indicators computed by the spreadsheet,
from departments secretaries...
ther are some bugs with turnaround (fils must have some mimimum weight)...

we would have prefered POI but it was not supporting formula computed values
at this time...

the "template" mode of extenxls is a good idea with XML since
all you have to emit 

> -Message d'origine-
> De: Michael Wechner [mailto:[EMAIL PROTECTED]]
> Date: mardi 23 juillet 2002 06:37
> À: [EMAIL PROTECTED]
> Cc: [EMAIL PROTECTED]
> Objet: Excel generator
> 
> 
> Hi
> 
> Is there an Excel Generator, which creates from an Excel (xls) file
> some XML? Or what approach would you take to convert existing Excel
> documents into some useful XML?

-
Please check that your question  has not already been answered in the
FAQ before posting. 

To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail:   <[EMAIL PROTECTED]>




Re: NullPointerException with SunShine -- user and password not stored in context?

2002-07-24 Thread Dominic Reynolds

I think that this is due to jdk1.4 + xml library problems. 

Previously on this list someone said to move the xerces*jar, xalan*jar, and 
xml-api*jar from the cocoon distribution to ${JAVA_HOME}/jre/lib/endorsed 
directory and then pass '-DJAVA_ENDORSED_DIRS=${JAVA_HOME}/jre/lib/endorsed' 
to java in the catalina.sh script.
This worked for me and I was seeing the same stack trace.

-dom



On Wednesday 24 July 2002 12:21 pm, David Cameron wrote:
> I've been getting a NullPointerException using SunShine with both the demo
> and a little custom test based on the material at
> http://www.need-a-cake.com/stories/2002/02/28/usingTheSunriseComponents.htm
>l
>
> I found a note to the mailing list from Keil, who seemed to be having the
> exact same problem in May, but there were no replies to it.
>
> I'm using
> Java 1.4.0
> Tomcat 4.0.4
> Cocoon 2.0.3 (from source or the 1.4 binary build)
>
> I'm speculating that the error is caused because the authentication
> information is not getting stored to the session context after the user is
> authed.
>
> Here's some of the stack trace:
> java.lang.NullPointerException
>   at
> org.apache.cocoon.sunshine.xml.XMLUtil.getNodesFromPath(XMLUtil.java:869)
>   at
> org.apache.cocoon.sunshine.xml.XMLUtil.getNodesFromPath(XMLUtil.java:871)
>   at
> org.apache.cocoon.sunshine.xml.XMLUtil.getNodesFromPath(XMLUtil.java:871)
>   at
> org.apache.cocoon.sunshine.xml.XMLUtil.getNodeListFromPath(XMLUtil.java:836
>) at
> org.apache.cocoon.sunshine.context.SimpleSessionContext.getXML(SimpleSessio
>n Context.java:173)
>   at
> org.apache.cocoon.sunshine.sunrise.SunRise.isAuthenticated(SunRise.java:691
>) at
> org.apache.cocoon.sunshine.sunrise.SunRise.checkAuthentication(SunRise.java
>: 766)
>   at
> org.apache.cocoon.sunshine.sunrise.acting.AuthAction.act(AuthAction.java:12
>2 )
>   at
> org.apache.cocoon.www.sitemap_xmap.matchN4004A5(F:\tomcat-4.0.4-win\work\St
>a
> ndalone\localhost\cocoon\cocoon-files\org/apache/cocoon/www\sitemap_xmap.ja
>v a:5363)
>   at
> org.apache.cocoon.www.sitemap_xmap.process(F:\tomcat-4.0.4-win\work\Standal
>o
> ne\localhost\cocoon\cocoon-files\org/apache/cocoon/www\sitemap_xmap.java:33
>3 0)
>   at
> org.apache.cocoon.www.sitemap_xmap.process(F:\tomcat-4.0.4-win\work\Standal
>o
> ne\localhost\cocoon\cocoon-files\org/apache/cocoon/www\sitemap_xmap.java:31
>0 0)
>
> Now some sections from the sitemap, these were all copied nearly verbatim
> from the above link. I switched target for redirect after a sucessful login
> to ags-authuser in an effort to see if it was returning the proper info.
> This doesn't seem to work though because it requires a name and password
> parameter in the request. My understanding is that it should be able to get
> this info from the session context after a successful login, but it clearly
> isn't.
>
> 
>  src="org.apache.cocoon.sunshine.sunrise.acting.AuthAction">
>   
>  xmlns:map="http://apache.org/cocoon/sitemap/1.0";
> xmlns:sunshine="http://sunshine.sundn.de/sunshine/1.0";>
>  
>  
> 
>   
> 
>
> 
>
>   
>   
>   
>   
>
>
>
>   
>
>
> value="request:password"/>
>
>
>   
>   
>   
>   
>   
>
>
>
> 
> 
>
> 
> 
>
>
>
>
>
>
>
>
>
>
> 
>
> I can get authentication information by handcrafting URLs to auth user. For
> example ags-authuser?name=cocoon&password=cocoon gives me back the xml:
>   
> - 
>   cocoon
>   admin
> - 
>   cocoon
>   admin
>   cocoon
>   cocoon
>   
>   
>   
>   
>   
>   
>   
>   
>   
>   
>   
>   
>   
>   
>   
>   
>
> Which seems to be correct. However going to ags-protected and then logging
> in causes the null pointer exception.
>
> The reason I think the information is not being stored in the context is
> because after going through the source along the stack trace I came across
> this:
> SunRise.java line 691:
> DocumentFragment id = context.getXML("/" + name
> + "/authentication/ID");
>
> name is the handler name. The ags-authuser pipeline is returning the proper
> snippets as shown above, but then later when this call is made, the
> fragment isn't available.
>
> Any ideas of how I can fix this or get around it? Is something broken in
> SunShine?
>
> Dave
>
>
> -
> Please check that your question  has not already been answered in the
> FAQ before posting. 
>
> To unsubscribe, e-mail: <[EMAIL PROTECTED]>
> For additional commands, e-mail:   <[EMAIL PROTECTED]>


-
Please check that your question  has not alre

NullPointerException with SunShine -- user and password not stored in context?

2002-07-24 Thread David Cameron

I've been getting a NullPointerException using SunShine with both the demo
and a little custom test based on the material at
http://www.need-a-cake.com/stories/2002/02/28/usingTheSunriseComponents.html

I found a note to the mailing list from Keil, who seemed to be having the
exact same problem in May, but there were no replies to it.

I'm using
Java 1.4.0
Tomcat 4.0.4
Cocoon 2.0.3 (from source or the 1.4 binary build)

I'm speculating that the error is caused because the authentication
information is not getting stored to the session context after the user is
authed.

Here's some of the stack trace:
java.lang.NullPointerException
at
org.apache.cocoon.sunshine.xml.XMLUtil.getNodesFromPath(XMLUtil.java:869)
at
org.apache.cocoon.sunshine.xml.XMLUtil.getNodesFromPath(XMLUtil.java:871)
at
org.apache.cocoon.sunshine.xml.XMLUtil.getNodesFromPath(XMLUtil.java:871)
at
org.apache.cocoon.sunshine.xml.XMLUtil.getNodeListFromPath(XMLUtil.java:836)
at
org.apache.cocoon.sunshine.context.SimpleSessionContext.getXML(SimpleSession
Context.java:173)
at
org.apache.cocoon.sunshine.sunrise.SunRise.isAuthenticated(SunRise.java:691)
at
org.apache.cocoon.sunshine.sunrise.SunRise.checkAuthentication(SunRise.java:
766)
at
org.apache.cocoon.sunshine.sunrise.acting.AuthAction.act(AuthAction.java:122
)
at
org.apache.cocoon.www.sitemap_xmap.matchN4004A5(F:\tomcat-4.0.4-win\work\Sta
ndalone\localhost\cocoon\cocoon-files\org/apache/cocoon/www\sitemap_xmap.jav
a:5363)
at
org.apache.cocoon.www.sitemap_xmap.process(F:\tomcat-4.0.4-win\work\Standalo
ne\localhost\cocoon\cocoon-files\org/apache/cocoon/www\sitemap_xmap.java:333
0)
at
org.apache.cocoon.www.sitemap_xmap.process(F:\tomcat-4.0.4-win\work\Standalo
ne\localhost\cocoon\cocoon-files\org/apache/cocoon/www\sitemap_xmap.java:310
0)

Now some sections from the sitemap, these were all copied nearly verbatim
from the above link. I switched target for redirect after a sucessful login
to ags-authuser in an effort to see if it was returning the proper info.
This doesn't seem to work though because it requires a name and password
parameter in the request. My understanding is that it should be able to get
this info from the session context after a successful login, but it clearly
isn't.



  
http://apache.org/cocoon/sitemap/1.0";
xmlns:sunshine="http://sunshine.sundn.de/sunshine/1.0";>
 
 

  



   
  
  
  
  
   

   
  
   
   
   
   
   
  
  
  
  
  
   

   


   


   

   
   
   
   
   
   
   



I can get authentication information by handcrafting URLs to auth user. For
example ags-authuser?name=cocoon&password=cocoon gives me back the xml:
  
- 
  cocoon
  admin
- 
  cocoon
  admin
  cocoon
  cocoon
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  

Which seems to be correct. However going to ags-protected and then logging
in causes the null pointer exception.

The reason I think the information is not being stored in the context is
because after going through the source along the stack trace I came across
this:
SunRise.java line 691:
DocumentFragment id = context.getXML("/" + name
+ "/authentication/ID");

name is the handler name. The ags-authuser pipeline is returning the proper
snippets as shown above, but then later when this call is made, the fragment
isn't available.

Any ideas of how I can fix this or get around it? Is something broken in
SunShine?

Dave


-
Please check that your question  has not already been answered in the
FAQ before posting. 

To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail:   <[EMAIL PROTECTED]>




RE: Lucene, CocoonIndexer

2002-07-24 Thread Vadim Gritsenko

> From: icewind [mailto:[EMAIL PROTECTED]]
> 
> --- Vadim Gritsenko <[EMAIL PROTECTED]>
> wrote:
> 
> Vadim,
> 
> I looked at the characters method. I want to be able
> to see what it does when it executes this, but I
> assume I just cant stick system.oit.println() calls in
> there

You can. You will see messages in the console window of servlet engine,
I usually use tomcat (under *nix console output will be in catalina.out
file) or resin.

Other option is to run servlet engine with debug enabled and connect to
the engine from the IDE debugger.


> to see what the values of various variables are
> when it runs. Is there some way I could produce some
> debugging information so I could watch this method
> run? Is there a way to output to the cocoon log?

Usually you use getLogger().debug("message") to put some debug info into
the log, but LuceneIndexContentHandler is not log enabled.


Vadim


> 
> 
> >
> > Look into LuceneIndexContentHandler, characters()
> > method.
> >
> > Ok, I see that it appends text only to bodyText and
> > current tag...
> > Simple solution would be to add text to every field
> > in stack (in
> > characters(), for(;;) instead of if()), but better
> > solution is to have
> > not stack of StringBuffers (see this.elementStack),
> > but stack of indexes
> > in single string buffer (this.bodyText). This
> > solution will utilize
> > memory more efficiently.
> >
> >
> > Vadim
> >
> >
> > >   Suggestions appreciated. I imagine someone has
> > > run
> > > into this and has already come up with a workable
> > > solution.
> >


-
Please check that your question  has not already been answered in the
FAQ before posting. 

To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail:   <[EMAIL PROTECTED]>




XSLTTransformer documentation

2002-07-24 Thread Benjamin Pillet

I wasn't sure where to send this feedback.  Hope it gets to the right
place.

The documentation located at
http://xml.apache.org/cocoon/userdocs/transformers/xslt-transformer.html
has the following extract:



 >In addition all other parameters to the transformer are available 
 >in the stylesheet as xsl:variables



They are actually available as xsl:params.  It took me a few minutes to
locate a working sample and fix my stylesheets.  A documentation change
might help others.

Ben



-
Please check that your question  has not already been answered in the
FAQ before posting. 

To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail:   <[EMAIL PROTECTED]>




RE: Lucene, CocoonIndexer

2002-07-24 Thread icewind


--- Vadim Gritsenko <[EMAIL PROTECTED]>
wrote:

Vadim, 

I looked at the characters method. I want to be able
to see what it does when it executes this, but I
assume I just cant stick system.oit.println() calls in
there to see what the values of various variables are
when it runs. Is there some way I could produce some
debugging information so I could watch this method
run? Is there a way to output to the cocoon log?



> 
> Look into LuceneIndexContentHandler, characters()
> method.
> 
> Ok, I see that it appends text only to bodyText and
> current tag...
> Simple solution would be to add text to every field
> in stack (in
> characters(), for(;;) instead of if()), but better
> solution is to have
> not stack of StringBuffers (see this.elementStack),
> but stack of indexes
> in single string buffer (this.bodyText). This
> solution will utilize
> memory more efficiently.
> 
> 
> Vadim
>  
> 
> > Suggestions appreciated. I imagine someone has
> run
> > into this and has already come up with a workable
> > solution.
> 
> 
>
-
> Please check that your question  has not already
> been answered in the
> FAQ before posting.
> 
> 
> To unsubscribe, e-mail:
> <[EMAIL PROTECTED]>
> For additional commands, e-mail:  
> <[EMAIL PROTECTED]>
> 


__
Do You Yahoo!?
Yahoo! Health - Feel better, live better
http://health.yahoo.com

-
Please check that your question  has not already been answered in the
FAQ before posting. 

To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail:   <[EMAIL PROTECTED]>




AW: passing a parameter from sitemap to action

2002-07-24 Thread Andres, Judith

  public Map act (Redirector redirector_, SourceResolver resolver_, Map objectModel_, 
String source_, Parameters params_) {
 String param = params_.getParameter("param", "a-default-value");

 etc.

  Judith

> -Ursprüngliche Nachricht-
> Von:  Barbara Post [SMTP:[EMAIL PROTECTED]]
> Gesendet am:  Mittwoch, 24. Juli 2002 18:48
> An:   [EMAIL PROTECTED]
> Betreff:  passing a parameter from sitemap to action
> 
> Sorry for the newbie question, but I'm getting tired and it's getting late
> here.
> 
> 
> I use :
> 
> 
> 
> 
> ...
> 
> but what's the code in the action class to get the parameter ?
> 
> Thanks.
> 
> Babs
> 
> 
> 
> -
> Please check that your question  has not already been answered in the
> FAQ before posting. 
> 
> To unsubscribe, e-mail: <[EMAIL PROTECTED]>
> For additional commands, e-mail:   <[EMAIL PROTECTED]>
> 

-
Please check that your question  has not already been answered in the
FAQ before posting. 

To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail:   <[EMAIL PROTECTED]>




esql fills textarea

2002-07-24 Thread Frank Taffelt

i have a problem to populate a html textarea correctly.
the problem occurs when outping content, that contain
linebreak chars.

suppose the following example:
  * esql gives a formated string: "line one\r\nline two"
  * some xsl transformation steps
  * html serializer 

the html output is something like this:

lineone
 
line two

-> the carriage return char is referenced as an entity 
which is not properly rendered (the result contains 3 lines 
of text instead of 2 ).

is this the correct behaviour, that carriage return is handled differently 
from linefeeds or has anybody some suggestions how to solve this 
problem?

Frank

-
Please check that your question  has not already been answered in the
FAQ before posting. 

To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail:   <[EMAIL PROTECTED]>




AW: passing a parameter from sitemap to action

2002-07-24 Thread Sternath Elmar

Hi Barbara,

try this inside your act method:

if ("true".equalsIgnoreCase(param.getParameter("parameters", null))){
  Enumeration e = request.getParameterNames();
  while(e.hasMoreElements()){
String name = (String) e.nextElement();
String value = request.getParameter(name);


-Ursprüngliche Nachricht-
Von: Barbara Post [mailto:[EMAIL PROTECTED]]
Gesendet: Mittwoch, 24. Juli 2002 18:48
An: [EMAIL PROTECTED]
Betreff: passing a parameter from sitemap to action


Sorry for the newbie question, but I'm getting tired and it's getting late
here.


I use :




...

but what's the code in the action class to get the parameter ?

Thanks.

Babs



-
Please check that your question  has not already been answered in the
FAQ before posting. 

To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail:   <[EMAIL PROTECTED]>

-
Please check that your question  has not already been answered in the
FAQ before posting. 

To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail:   <[EMAIL PROTECTED]>




passing a parameter from sitemap to action

2002-07-24 Thread Barbara Post

Sorry for the newbie question, but I'm getting tired and it's getting late
here.


I use :




...

but what's the code in the action class to get the parameter ?

Thanks.

Babs



-
Please check that your question  has not already been answered in the
FAQ before posting. 

To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail:   <[EMAIL PROTECTED]>




Re: cocoon:/ not using current sitemap

2002-07-24 Thread Jens Lorenz

- Original Message -
From: "David Trammell" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, July 24, 2002 5:58 PM
Subject: cocoon:/ not using current sitemap


> I cannot get the cocoon:/ protocol to work when using it from a sitemap
> that was mounted from another internal request using the cocoon:/
> protocol.  I have included snippets of my two sitemaps that duplicates
> this.
>
> Have I misunderstood how the cocoon:/ protocol works, or is this a bug?
> It works if I do not use cocoon:/ within the second sitemap and generate
> the xhtml directly.  It also works if I do not use cocoon:/ in the first
> one and directly mount the style sitemap.

AFAIR this behavior is known as bug #9736.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=9736


> The requested URL is something like http://localhost/test/admin/users
>
> sitemap.xmap :
> ---
> 
> 
> 
>  uri-prefix="{1}/getstyle"/>
> 
> 
>
> 
> 
> 
> 
>
> 
> 
>
> style.xmap :
> ---
> 
> 
> 
> 
> 
> 
> 
>
> 
> 
> 
> 
>
>  
>
>
> Thanks
> David


Jens

--

jens.lorenz at interface-projects dot de

interface:projects GmbH \\|//
Tolkewitzer Strasse 49  (o o)
01277 Dresden   oOOo~(_)~oOOo
Germany


-
Please check that your question  has not already been answered in the
FAQ before posting. 

To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail:   <[EMAIL PROTECTED]>




cocoon:/ not using current sitemap

2002-07-24 Thread David Trammell

I cannot get the cocoon:/ protocol to work when using it from a sitemap
that was mounted from another internal request using the cocoon:/
protocol.  I have included snippets of my two sitemaps that duplicates
this.

Have I misunderstood how the cocoon:/ protocol works, or is this a bug?
It works if I do not use cocoon:/ within the second sitemap and generate
the xhtml directly.  It also works if I do not use cocoon:/ in the first
one and directly mount the style sitemap.

The requested URL is something like http://localhost/test/admin/users

sitemap.xmap :
---











   



style.xmap :
---












   



Thanks
David


-
Please check that your question  has not already been answered in the
FAQ before posting. 

To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail:   <[EMAIL PROTECTED]>




RE: VELOCITY (XML) - COCOON (PDF)

2002-07-24 Thread Terry Anderson

Found the problem.
Seems I was creating a blank line at the top of the xml stream with
velocity.  Once this blank line was removed, stream goes through.

Thanks!

-Original Message-

Looking for help posting xml (created with velocity) to cocoon to create
a pdf. I successfully create the pdf with the file-generator (xml file
saved to disk), but having difficulty with the stream-generator. I've
attached my code for review (sorry for length).

Thanks for any assistance!   TA

JAVA CLASS (Posting velocity xml to cocoon stream-generator): package
velocityxml;

import java.io.*;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.util.HashMap;
import java.net.*;
import org.apache.velocity.*;
import org.apache.cocoon.util.*;
import org.apache.velocity.app.VelocityEngine;

public class data2xml {
public static void main(String[] args) throws Exception {
VelocityEngine ve = new VelocityEngine();
ve.init();

ArrayList alHeaders = new ArrayList();
ArrayList alRows = new ArrayList();
ArrayList alFields;

/*  create headers  */
alHeaders.add("Name");
alHeaders.add("City");
alHeaders.add("State");

/*  create row 1  */
alFields = new ArrayList();
alFields.add("Angelina");
alFields.add("Carol Stream");
alFields.add("IL");
alRows.add(alFields);

/*  create row 2  */
alFields = new ArrayList();
alFields.add("Ben");
alFields.add("Wheaton");
alFields.add("IL");
alRows.add(alFields);

/*  create row 3  */
alFields = new ArrayList();
alFields.add("Eric");
alFields.add("Palatine");
alFields.add("IL");
alRows.add(alFields);


VelocityContext context = new VelocityContext();
context.put("hdrList", alHeaders);
context.put("rowList", alRows);

Template t = ve.getTemplate( "data2xml.vm" );
ByteArrayOutputStream xml_os = null;
Writer writer = null;
try {
   xml_os = new ByteArrayOutputStream();
   writer = new OutputStreamWriter(xml_os);
   t.merge(context,writer);
  } catch(IOException ioe) {
System.out.println("IOException Caught A:");
ioe.printStackTrace();
  } finally {
   if (writer!=null) {
writer.close();
   }
   if (xml_os!=null) {
xml_os.close();
   }
  }

URL url = new
URL("http://localhost:8080/cocoon/samples/genRpt/rpt.pdf2";);
  HttpURLConnection httpConn = null;
  try {
   httpConn = (HttpURLConnection)url.openConnection();
httpConn.setDoInput(true);
httpConn.setDoOutput(true);
httpConn.setRequestMethod("POST");
httpConn.setUseCaches(false);
httpConn.setDefaultUseCaches(false);
httpConn.setRequestProperty("Content-Type",
"application/x-www-form-urlencoded");
PrintWriter pw = new
PrintWriter(httpConn.getOutputStream());
String content = "Foo=" +
URLEncoder.encode(new
String(xml_os.toByteArray()),"UTF-8");
pw.println(content);
pw.close();

InputStream is = httpConn.getInputStream();
BufferedReader br = new BufferedReader(new
InputStreamReader(is));
String line = null;
while((line=br.readLine())!=null) {
System.out.println(line);
}
is.close();

  } catch(IOException ioe) {
System.out.println("IOException Caught 2:");
ioe.printStackTrace();
  } finally { }
}
}

SITEMAP.XMAP:
  
  
  
  
  
  
  



-
Please check that your question  has not already been answered in the
FAQ before posting. 

To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail:   <[EMAIL PROTECTED]>




FW: Stored Procedure using esql?

2002-07-24 Thread Naquin, Beth
Title: FW: Stored Procedure using esql?





What specific problems are you having?


Here are some examples that I used in a logicsheet called from some xsp pages.


Example 1:  Stored Procedure returns a resultset (ie it's a fancy SELECT statement). It can return one row of data, many rows of data, or possibly no rows. It takes no input parameters.




        
        
    {call GetWorkQRows()}
    
                
    
    
        
        
                
                    
                
            
        
    


    
    
      There is currently no data in the work queue.
  


    
    
        
        
    
                    




The stored procedure does something like this:  SELECT pin, status, action from 


If there is data, this results in xml like:

    
        999
        OK
        Update
    
    
        888
        OK
        Update
    
    ...



No return code from the stored procedure is processed here.  The stored procedure returns one, but I just don't care about it.

-
EXAMPLE 2:  This is the same as example 1, except I explicitly name the xml tags where I want particular data to go.  This sproc can only return one or zero rows.



    
    
    {call get_person(
        "",
        "",
                    NULL,
        )}

    


                
    
    
    
        
            
            
                
                
                
                                            

                
                                                       ...

            
        ...
        

             
This results in, as you can imagine:

    
        Smith
        John
        
        10/10/1988
        M
        345677890




---
Example 3:  Stored procedure does not return a result set (ie it is not a select statement) but it does return various return codes (via an output parameter). The stored procedure also needs two input parameters.  In my case, these input parameters were set by the user via a form and are available through request parameters.



    
    
    { = call LaunchSearches(
        ,

        )}
    
    
    
    
        
                    


    
    
        
        
    
                




The esql:call-results section will execute regardless of whether or not a resultset is returned.  This is where I capture the output parameter (return code).

This results in xml like the following:
1
or maybe
5
where 1 and 5 mean specific things for my stored procedure.


To use an output parameter, you must register it first.  that is what " = ..." line does.  The line "" accesses the output parameter (in this case the output parameter is the first parameter (column="1"). I don't know what to do if you have more than one output parameter; I'm not too familiar with JDBC.  I think that if this stored procedure had also returned a resultset, I could have accessed the data in the resultset with  just like in Example 1.

I used cocoon 2.0.2, tomcat 4.0.1 and Sybase 12.5 database.



Hope that helps
Beth
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]] 
Sent: Wednesday, July 24, 2002 12:17 AM
To: [EMAIL PROTECTED]
Subject: Stored Procedure using esql?



Hi,


i have problems processing the resultset returned by my stored procedures.
Do you have an example for me? I tried the example from the apache home
page, but it didn't work.


thanks,
markus sell




Diese E-Mail enthält vertrauliche und/oder rechtlich geschützte
Informationen. Wenn Sie nicht der richtige Adressat sind oder diese E-Mail
irrtümlich erhalten haben, informieren Sie bitte sofort den Absender und
vernichten Sie diese Mail. Das unerlaubte Kopieren sowie die unbefugte
Weitergabe dieser Mail ist nicht gestattet.


This e-mail may contain confidential and/or privileged information. If you
are not the intended recipient (or have received this e-mail in error)
please notify the sender immediately and destroy

[Morphos] Mailing List Madness ( was Re: [Morphos] Starting thecode :-)

2002-07-24 Thread Nicola Ken Barozzi


Andrew C. Oliver wrote:
>>
>>> I would suggest a seperate mailing list for this, perhaps on krysalis 
>>> in addition to the commons mailing list, as there is no way in hell 
>>> I'm subscribing to the commons mailing list ever again because the 
>>> volume is soo great that it would triple my current email volume 
>>> and probably bring my ISPs flaky email server down anyhow!
>>> Others probably feel similar.
>>
>>
>>
>> Andy, the discussion has been going on already on that list, so I 
>> would really like to continue there.
>> I promise that I will make the mails prepended with [Morphos], so you 
>> can filter them. 
> 
> 
> 
> Dude, you don't understand.  I'm only getting like 50% of my emails, in 
> part due to the amount of traffic I get.  I physically cannot subscribe 
> to commons.  If I do that I'd pretty much never get any mail from 
> anywhere else. The traffic on Commons is REDICULOUS.  There's no way we 
> can split it?  I mean I just can't.
> 
> I tried to help my LUG get a SMTP server set up but they're all a bunch 
> of Sysadmin types who are trying to set up a "REALLY COOL" SMTP server 
> (still trying after 6 months) rather than a functional one in the near 
> future!
> 
> I intend to set up my own SMTP server on my server, but it won't be in 
> the near future.
> 
> Regardless, I know a couple other people (of your acquantenance) who 
> might help out if the list were seperate.
> 
> Hell we created a list for cocoon-doc

It's a political issue.
Technically it's not a problem, but other possible committers to Morphos 
were against anything not discussed on Commons...

I'll CC you directly for the mails, and other users that don't want to 
go on Commons-dev will read the archives I guess.

-- 
Nicola Ken Barozzi   [EMAIL PROTECTED]
 - verba volant, scripta manent -
(discussions get forgotten, just code remains)
-


-
Please check that your question  has not already been answered in the
FAQ before posting. 

To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail:   <[EMAIL PROTECTED]>




Re: language variable, date formatting

2002-07-24 Thread Jens Lorenz

- Original Message -
From: "Barbara Post" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, July 24, 2002 5:03 PM
Subject: Re: language variable, date formatting


> Hi, I used something that worked in a simple java class but here there
are
> errors:
>
> 
> import java.util.*;
> import java.text.DateFormat;
> 
> (DateFormat.getDateInstance(DateFormat.FULL, new
> Locale("FR"))).format(Calendar.getInstance().getTime());
>  
> 
>
>
> description org.apache.cocoon.ProcessingException: Language Exception:
> org.apache.cocoon.components.language.LanguageException: Error compiling
> date_xsp: Line 121, column 0: illegal start of expression Line 122,
column
> 0: illegal start of expression Line 126, column 104: ')' expected Line
127,
> column 1: illegal start of expression Line 126, column 71: variable
Calendar
> not found in class org.apache.cocoon.www.xsp.date_xsp Line 126, column
28:
> variable DateFormat not found in class
org.apache.cocoon.www.xsp.date_xsp
> Line 126, column 49: class Locale not found in class
> org.apache.cocoon.www.xsp.date_xsp Line 126, column 1: variable
DateFormat
> not found in class org.apache.cocoon.www.xsp.date_xsp Line 0, column 0:
8
> errors
>
> What's wrong ? Thanks
>
> Barbara

Just a guess: Do you remember that import's a re not allowed within
xsp:logic ? They go into xsp:structure ...

See here:
http://xml.apache.org/cocoon/userdocs/xsp/logicsheet.html
(search for structure, it nearly at the end of the page)


Jens

--

jens.lorenz at interface-projects dot de

interface:projects GmbH \\|//
Tolkewitzer Strasse 49  (o o)
01277 Dresden   oOOo~(_)~oOOo
Germany


-
Please check that your question  has not already been answered in the
FAQ before posting. 

To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail:   <[EMAIL PROTECTED]>




RE: hsqldb server/client startup sequence

2002-07-24 Thread Vadim Gritsenko

> From: Kim Jelmoni [mailto:[EMAIL PROTECTED]]
> 
> > What's your Cocoon version? Everything works fine here with 2.0.3.
> 
> Cocoon 2.0.3, tomcat 4.0.1,
> SunOS mysystem 5.8 Generic_108528-01 sun4u sparc SUNW,Ultra-4
> Java(TM) 2 Runtime Environment, Standard Edition (build 1.3.1-b24)
> Java HotSpot(TM) Client VM (build 1.3.1-b24, mixed mode)

Make sure you use
org.apache.avalon.excalibur.datasource.ResourceLimitingJdbcDataSource
(check cocoon.roles, log file, cocoon.xconf). This datasource should
create JDBC connections only when it is requested, and it will be
requested only when Cocoon processes request from user, and this happens
long after everything is initialized.


Vadim



-
Please check that your question  has not already been answered in the
FAQ before posting. 

To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail:   <[EMAIL PROTECTED]>




Re: Excel generator

2002-07-24 Thread Andrew C. Oliver

Manos Batsis wrote:

>>From: Andrew C. Oliver [mailto:[EMAIL PROTECTED]] 
>>
>>
>
>  
>
>>>Although I don't like dealing with M$ stuff, a nice idea is utilizing
>>>the office 2002 XML formats, specifically the one of Excel.
>>>  
>>>
>>Explain the advantage?  This is what I brought up, so far its 
>>unanimous 
>>the other direction.  Why would you prefer this over an XSLT 
>>page that 
>>accomplishes the same thing?
>>
>>
>
>I'm not sure we understand each other here.
>What I had in mind is removing the work needed to produce XML from Excel
>files and just use the XML output abilities of the application.
>One can use that XML directly with the Excel application or use XSLT to
>produce a web-based interface. 
>  
>
Okay.  So do that.  That doesn't have much to do with the HSSF 
Serializer/Generator does it?

>Not sure what the argument here is.
>
>Manos
>
>
>-
>Please check that your question  has not already been answered in the
>FAQ before posting. 
>
>To unsubscribe, e-mail: <[EMAIL PROTECTED]>
>For additional commands, e-mail:   <[EMAIL PROTECTED]>
>
>
>  
>




-
Please check that your question  has not already been answered in the
FAQ before posting. 

To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail:   <[EMAIL PROTECTED]>




Re: language variable, date formatting

2002-07-24 Thread Barbara Post

Hi, I used something that worked in a simple java class but here there are
errors:


import java.util.*;
import java.text.DateFormat;

(DateFormat.getDateInstance(DateFormat.FULL, new
Locale("FR"))).format(Calendar.getInstance().getTime());
 



description org.apache.cocoon.ProcessingException: Language Exception:
org.apache.cocoon.components.language.LanguageException: Error compiling
date_xsp: Line 121, column 0: illegal start of expression Line 122, column
0: illegal start of expression Line 126, column 104: ')' expected Line 127,
column 1: illegal start of expression Line 126, column 71: variable Calendar
not found in class org.apache.cocoon.www.xsp.date_xsp Line 126, column 28:
variable DateFormat not found in class org.apache.cocoon.www.xsp.date_xsp
Line 126, column 49: class Locale not found in class
org.apache.cocoon.www.xsp.date_xsp Line 126, column 1: variable DateFormat
not found in class org.apache.cocoon.www.xsp.date_xsp Line 0, column 0: 8
errors

What's wrong ? Thanks

Barbara
- Original Message -
From: Jens Lorenz <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, July 24, 2002 4:49 PM
Subject: Re: language variable, date formatting


> - Original Message -
> From: "Barbara Post" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Wednesday, July 24, 2002 4:26 PM
> Subject: language variable, date formatting
>
>
> > Hello,
>
> Hi,
>
> > My xsl stylesheet needs to format a date using a locale or a language
> > variable that is stored in session (using SunRise portal).
> >
> > I wonder how I can do this.
> >
> > If I use an xsp to produce the portion of xml I need (date formatted
> > according to a specific locale), how can the xsp get the session
> attribute
> > since it is stored in sunRise context (or another one if I need to do
> so) ?
>
> It probably much easier to produce this via Java, than re-inventing
> Locale-specific Date formatting in XSLT.
>
> > My problem is : how to access the session attributes when using sunRise,
> to
> > use it in sitemap or xsp ? If I use getxml I would have to use DOM then,
> > right ?
> >
> > I was surprised that the raw new Date() does not use
> my
> > computer locale... (FR) but English one.
>
> Assuming you are using the XSP with Java, this gets translated into
> String.valueOf(new Date()) which in turn does nothing more than
> (new Date()).toString().
> If you want this to be a localized String you have to call
> SimpleDateFormat.format(new Date()). This way you can also have
> a different Locale for each User (which is probably what you want).
>
>
> > Thanks for any clue.
> >
> > Barbara
> >
>
>
>
> Jens
>
> --
>
> jens.lorenz at interface-projects dot de
>
> interface:projects GmbH \\|//
> Tolkewitzer Strasse 49  (o o)
> 01277 Dresden   oOOo~(_)~oOOo
> Germany
>
>
> -
> Please check that your question  has not already been answered in the
> FAQ before posting. 
>
> To unsubscribe, e-mail: <[EMAIL PROTECTED]>
> For additional commands, e-mail:   <[EMAIL PROTECTED]>
>


-
Please check that your question  has not already been answered in the
FAQ before posting. 

To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail:   <[EMAIL PROTECTED]>




Re: language variable, date formatting

2002-07-24 Thread Jens Lorenz

- Original Message -
From: "Barbara Post" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, July 24, 2002 4:26 PM
Subject: language variable, date formatting


> Hello,

Hi,

> My xsl stylesheet needs to format a date using a locale or a language
> variable that is stored in session (using SunRise portal).
>
> I wonder how I can do this.
>
> If I use an xsp to produce the portion of xml I need (date formatted
> according to a specific locale), how can the xsp get the session
attribute
> since it is stored in sunRise context (or another one if I need to do
so) ?

It probably much easier to produce this via Java, than re-inventing
Locale-specific Date formatting in XSLT.

> My problem is : how to access the session attributes when using sunRise,
to
> use it in sitemap or xsp ? If I use getxml I would have to use DOM then,
> right ?
>
> I was surprised that the raw new Date() does not use
my
> computer locale... (FR) but English one.

Assuming you are using the XSP with Java, this gets translated into
String.valueOf(new Date()) which in turn does nothing more than
(new Date()).toString().
If you want this to be a localized String you have to call
SimpleDateFormat.format(new Date()). This way you can also have
a different Locale for each User (which is probably what you want).


> Thanks for any clue.
>
> Barbara
>



Jens

--

jens.lorenz at interface-projects dot de

interface:projects GmbH \\|//
Tolkewitzer Strasse 49  (o o)
01277 Dresden   oOOo~(_)~oOOo
Germany


-
Please check that your question  has not already been answered in the
FAQ before posting. 

To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail:   <[EMAIL PROTECTED]>




language variable, date formatting

2002-07-24 Thread Barbara Post

Hello,

My xsl stylesheet needs to format a date using a locale or a language
variable that is stored in session (using SunRise portal).

I wonder how I can do this.

If I use an xsp to produce the portion of xml I need (date formatted
according to a specific locale), how can the xsp get the session attribute
since it is stored in sunRise context (or another one if I need to do so) ?

My problem is : how to access the session attributes when using sunRise, to
use it in sitemap or xsp ? If I use getxml I would have to use DOM then,
right ?

I was surprised that the raw new Date() does not use my
computer locale... (FR) but English one.

Thanks for any clue.

Barbara


-
Please check that your question  has not already been answered in the
FAQ before posting. 

To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail:   <[EMAIL PROTECTED]>




Re: hsqldb server/client startup sequence

2002-07-24 Thread Kim Jelmoni


> What's your Cocoon version? Everything works fine here with 2.0.3.
> 

Cocoon 2.0.3, tomcat 4.0.1,
SunOS mysystem 5.8 Generic_108528-01 sun4u sparc SUNW,Ultra-4
Java(TM) 2 Runtime Environment, Standard Edition (build 1.3.1-b24)
Java HotSpot(TM) Client VM (build 1.3.1-b24, mixed mode)


Kim


> 
> Vadim
> 
> 
> 
>>Thanks
>>
>>Kim
> 
> 
> 
> -
> Please check that your question  has not already been answered in the
> FAQ before posting. 
> 
> To unsubscribe, e-mail: <[EMAIL PROTECTED]>
> For additional commands, e-mail:   <[EMAIL PROTECTED]>
> 
> 




-
Please check that your question  has not already been answered in the
FAQ before posting. 

To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail:   <[EMAIL PROTECTED]>




RE: hsqldb server/client startup sequence

2002-07-24 Thread Vadim Gritsenko

> From: Kim Jelmoni [mailto:[EMAIL PROTECTED]]
> 
> Hello,
> 
> I m trying to use hsqldb from a cocoon application. Now I have the
> problem that when I run cocoon on a unix system hsqlserver start after
> that cocoon try to open the connection pool, resulting in no
connection
> to DB.
> There is a possibility to force cocoon by startup to start first the
> hsqldb server and then try to open the DB connection pool ?

What's your Cocoon version? Everything works fine here with 2.0.3.


Vadim


> 
> Thanks
> 
> Kim


-
Please check that your question  has not already been answered in the
FAQ before posting. 

To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail:   <[EMAIL PROTECTED]>




RE: Excel generator

2002-07-24 Thread Manos Batsis


> From: Andrew C. Oliver [mailto:[EMAIL PROTECTED]] 

> >Although I don't like dealing with M$ stuff, a nice idea is utilizing
> >the office 2002 XML formats, specifically the one of Excel.
> 
> Explain the advantage?  This is what I brought up, so far its 
> unanimous 
> the other direction.  Why would you prefer this over an XSLT 
> page that 
> accomplishes the same thing?

I'm not sure we understand each other here.
What I had in mind is removing the work needed to produce XML from Excel
files and just use the XML output abilities of the application.
One can use that XML directly with the Excel application or use XSLT to
produce a web-based interface. 

Not sure what the argument here is.

Manos


-
Please check that your question  has not already been answered in the
FAQ before posting. 

To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail:   <[EMAIL PROTECTED]>




Re: Excel generator

2002-07-24 Thread Andrew C. Oliver

Manos Batsis wrote:

>  
>
>>From: Michael Wechner [mailto:[EMAIL PROTECTED]] 
>>
>>
>
>  
>
>>Therefore I thought it would be nice if he is sending me his 
>>Excel and I 
>>generate an XML,
>>which I can modify , and then I serialize it back into Excel, 
>>such that 
>>he can work on it.
>>
>>
>
>Although I don't like dealing with M$ stuff, a nice idea is utilizing
>the office 2002 XML formats, specifically the one of Excel.
>
>Just my 0.02 or less.
>
>Manos
>  
>

Explain the advantage?  This is what I brought up, so far its unanimous 
the other direction.  Why would you prefer this over an XSLT page that 
accomplishes the same thing?

-Andy

>-
>Please check that your question  has not already been answered in the
>FAQ before posting. 
>
>To unsubscribe, e-mail: <[EMAIL PROTECTED]>
>For additional commands, e-mail:   <[EMAIL PROTECTED]>
>
>
>  
>




-
Please check that your question  has not already been answered in the
FAQ before posting. 

To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail:   <[EMAIL PROTECTED]>




Re: [Morphos] Starting the code :-) (was Re: Excel generator)

2002-07-24 Thread Andrew C. Oliver

>
>> I would suggest a seperate mailing list for this, perhaps on krysalis 
>> in addition to the commons mailing list, as there is no way in hell 
>> I'm subscribing to the commons mailing list ever again because the 
>> volume is soo great that it would triple my current email volume 
>> and probably bring my ISPs flaky email server down anyhow!
>> Others probably feel similar.
>
>
> Andy, the discussion has been going on already on that list, so I 
> would really like to continue there.
> I promise that I will make the mails prepended with [Morphos], so you 
> can filter them. 


Dude, you don't understand.  I'm only getting like 50% of my emails, in 
part due to the amount of traffic I get.  I physically cannot subscribe 
to commons.  If I do that I'd pretty much never get any mail from 
anywhere else. The traffic on Commons is REDICULOUS.  There's no way we 
can split it?  I mean I just can't.

I tried to help my LUG get a SMTP server set up but they're all a bunch 
of Sysadmin types who are trying to set up a "REALLY COOL" SMTP server 
(still trying after 6 months) rather than a functional one in the near 
future!

I intend to set up my own SMTP server on my server, but it won't be in 
the near future.

Regardless, I know a couple other people (of your acquantenance) who 
might help out if the list were seperate.

Hell we created a list for cocoon-doc

>
>>  From there we can plan an approach for the generator. 
>
>
> This was exactly the proposed plan.

yes.

>
>> It would probably be faster too, my patches get applied too slow to 
>> work on it very efficiently here. (no offense)
>
>
> Yup, it's time :-)
>
> Who managed to make the serializer work out of Cocoon, can you please 
> send me the zip?
> I can thus checkin preliminary stuff in CVS.
>
> Thanks :-)
>




-
Please check that your question  has not already been answered in the
FAQ before posting. 

To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail:   <[EMAIL PROTECTED]>




Re: [Morphos] Starting the code :-) (was Re: Excel generator)

2002-07-24 Thread Nicola Ken Barozzi


Sven Kuenzler wrote:
> Nicola Ken Barozzi schrieb:
> 
> 
>>> I would suggest a seperate mailing list for this, perhaps on krysalis 
>>> in addition to the commons mailing list, as there is no way in hell 
>>> I'm subscribing to the commons mailing list ever again because the 
>>> volume is soo great that it would triple my current email volume 
>>> and probably bring my ISPs flaky email server down anyhow!
>>> Others probably feel similar.
>>
> 
> Andy, if you can/care to access a news server, check out www.gmane.org. 
>  They host many Apache MLs as newsgroups.

Hey, didn't know :-)

>> Who managed to make the serializer work out of Cocoon, can you please 
>> send me the zip?
>> I can thus checkin preliminary stuff in CVS.
> 
> 
> It's under http://www.tzi.de/~svenk/. It contains all jars involved so 
> I'd rather not send it by email.

Yup, good :-)

> I temporarily "repackaged" the code under morphos.* or so, I hope this 
> is not a problem for a scratchpad project.

Definately not. Thanks, I will commit it soon :-)

-- 
Nicola Ken Barozzi   [EMAIL PROTECTED]
 - verba volant, scripta manent -
(discussions get forgotten, just code remains)
-


-
Please check that your question  has not already been answered in the
FAQ before posting. 

To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail:   <[EMAIL PROTECTED]>




RE: Excel generator

2002-07-24 Thread Manos Batsis



> From: Michael Wechner [mailto:[EMAIL PROTECTED]] 

> Therefore I thought it would be nice if he is sending me his 
> Excel and I 
> generate an XML,
> which I can modify , and then I serialize it back into Excel, 
> such that 
> he can work on it.

Although I don't like dealing with M$ stuff, a nice idea is utilizing
the office 2002 XML formats, specifically the one of Excel.

Just my 0.02 or less.

Manos

-
Please check that your question  has not already been answered in the
FAQ before posting. 

To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail:   <[EMAIL PROTECTED]>




Re: [Morphos] Starting the code :-) (was Re: Excel generator)

2002-07-24 Thread Sven Kuenzler

Nicola Ken Barozzi schrieb:


>> I would suggest a seperate mailing list for this, perhaps on krysalis 
>> in addition to the commons mailing list, as there is no way in hell 
>> I'm subscribing to the commons mailing list ever again because the 
>> volume is soo great that it would triple my current email volume 
>> and probably bring my ISPs flaky email server down anyhow!
>> Others probably feel similar.

Andy, if you can/care to access a news server, check out www.gmane.org. 
  They host many Apache MLs as newsgroups.

> Who managed to make the serializer work out of Cocoon, can you please 
> send me the zip?
> I can thus checkin preliminary stuff in CVS.

It's under http://www.tzi.de/~svenk/. It contains all jars involved so 
I'd rather not send it by email.

I temporarily "repackaged" the code under morphos.* or so, I hope this 
is not a problem for a scratchpad project.

Sven




-
Please check that your question  has not already been answered in the
FAQ before posting. 

To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail:   <[EMAIL PROTECTED]>




[Morphos] Starting the code :-) (was Re: Excel generator)

2002-07-24 Thread Nicola Ken Barozzi


Andrew C. Oliver wrote:
>>
>>
>>>
>>>
>>> but to be honest i dont know any better solution than gnumeric. and 
>>> at least
>>> the solution is symetrical gnumeric->excel->gnumeric.
>>
>> Yup. And XSLT files for easy conversion to the Excel format.
> 
> Okay thanks to all.  I'm convinced we made the right decision 
> originally.  I wasn't sure at the start, everytime I'd describe this 
> architecture I'd get "Why didn't you go with Excel XML format" -- but 
> its nice to know that not only are people using the serializer at this 
> point, but that they prefer the gnumeric format (as yucky as it is) for 
> various reasons.  Good to know it was the right decision.

With XML any decision is good, since XSLT can do wonders.
The important thing is that the decision (ie DTD) was taken and that we 
sticked to it.

> So Ken, while I don't want you to do it right now, because I think you 
> have too many potatos in your donkey cart (picture Ken pulling a donkey 
> cart with a bunch of potatos in it

and you have a very rough aproximation of my current load ;-)

>, what would it take to start moving 
> this to Morpohos?  It seems the majority of people using this at the 
> moment are using it outside of Cocoon.

Yup.

> I'll help (as soon as I move some potatos off my donkey cart) if I can, 
> but I don't have enough Avalon/non-cocoon-xml-serializer experience to 
> do this myself, nor do I have a clear picture of the plans for Morphos 
> interface-wise.

The interfaces have basically been decided some days ago on Commons-dev

> I would suggest a seperate mailing list for this, perhaps on krysalis in 
> addition to the commons mailing list, as there is no way in hell I'm 
> subscribing to the commons mailing list ever again because the volume is 
> soo great that it would triple my current email volume and probably 
> bring my ISPs flaky email server down anyhow!
> Others probably feel similar.

Andy, the discussion has been going on already on that list, so I would 
really like to continue there.
I promise that I will make the mails prepended with [Morphos], so you 
can filter them.

>  From there we can plan an approach for the generator. 

This was exactly the proposed plan.

> It would 
> probably be faster too, my patches get applied too slow to work on it 
> very efficiently here. (no offense)

Yup, it's time :-)

Who managed to make the serializer work out of Cocoon, can you please 
send me the zip?
I can thus checkin preliminary stuff in CVS.

Thanks :-)

-- 
Nicola Ken Barozzi   [EMAIL PROTECTED]
 - verba volant, scripta manent -
(discussions get forgotten, just code remains)
-


-
Please check that your question  has not already been answered in the
FAQ before posting. 

To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail:   <[EMAIL PROTECTED]>




Re: Excel generator

2002-07-24 Thread Andrew C. Oliver

[EMAIL PROTECTED] wrote:

>>Yeah in short:  Its a Cocoon Serializer.  While I appreciate this
>>feedback, I personally have no use cases for the Serializer outside of
>>Cocoon.
>>
>>
>??? you don't ;-)
>the use case is very simple: create a xls-file out of an gnumeric-file. ;-)
>don't see any cocoon stuff here. i guess that would be like m$ saying
>there is no use case for calculation outside excel.
>but ok. i guess i know what you mean.
>  
>
I mean currently, I don't personally have any uses for the serializer 
outside of Cocoon.  HA, I'll be writing that Excel calculation engine soon.

>  
>
>>This makes it impossible for me to support a non-cocoon version
>>of the Serializer.  It would take a motivated individual who knew what
>>to do in order to support such a project.  My continued personal
>>interest is in generating reports via Cocoon and the HSSF Serializer.
>>
>>
>i would like to do that, but since i realy dont have any clue about
>the inner workings of cocoon this seems almost impossible for me at the
>moment.
>  
>
Look at the StateTax2 sample.  under Welome->Legacy Formats.

>  
>
>>Cool!  Would you mind writing up a case study for POI?
>> http://jakarta.apache.org/poi/casestudies.html
>>
>>
>i'll see that i'll have time somewhere within the next
>3-4 weeks (granted that the custumer oks this).
>  
>
Cool!  Well tell them that I'll send them a T-Shirt (yourself as well) 
once we decide on a logo and I get the shirts printed.

>  
>
>>I'll look through what Sven did.  My only concern is whether you'll end
>>up with Cocoon anyhow as your project scales up.
>>
>>
>this might be the case indeed. but at the moment and for the foreseeable
>future (3-6 month) this wont happen and so the discussion is a moot one.
>  
>
humm..

>>Well one thing I don't recommend is generating the gnumeric format
>>directly once you know what you're
>>doing.  Meaning come up with an interim format.
>>
>>
>this isn't possible either cause the invoice-format is still very
>young and there are a lot of changes going on for the next several
>months. it is impractical to let those changes be made by programmers.
>the people from the billing-dept. should do them but i simply cannot
>force them to "programm" a bill in some xml-format. the maximum
>i can give them is linux-box with gnumeric installed on it (and even
>this is not so simple since this is a windowsshop).
>  
>
Wha?  Its not stored in the database?  You see with XSP/ESQL, you could 
query it from the database, output XML, transform it via your 
stylesheets and serialize it via HSSF Serializer.  

How are you currently getting them out in XML?

>on the otherhand transforming a given gnumeric-file into an stylesheet
>is realy no fun and very brittle to do.
>  
>
Look at the HSSF Serializer doc that explains what it actually cares about.

>  
>
>>makes it into a Gnumeric workbook.
>>
>>
>>
>>>but what i want to do later to is to create a pdf-file instead of an
>>>  
>>>
>excel-
>  
>
>>>file. i'll be using xsl-fo for that and i see some hard times coming to
>>>first create an xsl-fo file out of gnumeric.
>>>
>>>
>>>  
>>>
>>I don't think it has to be if you do as above.
>>
>>
>as said before the only practical solution is to get an allready formated
>gnumeric-file from the billing-dept.
>  
>
humm...

>  
>
>>You prefer this to the Excel xml format?
>>
>>
>havent had a look on xls-xml.
>
>ciao robertj
>
>
>Robert Kuzelj
>Gaissacherstrasse 7   email: [EMAIL PROTECTED]
>81371 Muenchentel:   0177/5302230
>
>the trinity of desirables of (software) architecture:
>Firmitas, Utilitas, Venustas (marcus vitruvius 20 BC)
>strength, utility, beauty
>
>
>
>
>-
>Please check that your question  has not already been answered in the
>FAQ before posting. 
>
>To unsubscribe, e-mail: <[EMAIL PROTECTED]>
>For additional commands, e-mail:   <[EMAIL PROTECTED]>
>
>
>  
>




-
Please check that your question  has not already been answered in the
FAQ before posting. 

To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail:   <[EMAIL PROTECTED]>




hsqldb server/client startup sequence

2002-07-24 Thread Kim Jelmoni

Hello,

I m trying to use hsqldb from a cocoon application. Now I have the 
problem that when I run cocoon on a unix system hsqlserver start after 
that cocoon try to open the connection pool, resulting in no connection 
to DB.
There is a possibility to force cocoon by startup to start first the 
hsqldb server and then try to open the DB connection pool ?

Thanks

Kim


-
Please check that your question  has not already been answered in the
FAQ before posting. 

To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail:   <[EMAIL PROTECTED]>




Re: Excel generator

2002-07-24 Thread robert_kuzelj

> Yeah in short:  Its a Cocoon Serializer.  While I appreciate this
> feedback, I personally have no use cases for the Serializer outside of
> Cocoon.
??? you don't ;-)
the use case is very simple: create a xls-file out of an gnumeric-file. ;-)
don't see any cocoon stuff here. i guess that would be like m$ saying
there is no use case for calculation outside excel.
but ok. i guess i know what you mean.

>This makes it impossible for me to support a non-cocoon version
>of the Serializer.  It would take a motivated individual who knew what
>to do in order to support such a project.  My continued personal
>interest is in generating reports via Cocoon and the HSSF Serializer.
i would like to do that, but since i realy dont have any clue about
the inner workings of cocoon this seems almost impossible for me at the
moment.

> Cool!  Would you mind writing up a case study for POI?
>  http://jakarta.apache.org/poi/casestudies.html
i'll see that i'll have time somewhere within the next
3-4 weeks (granted that the custumer oks this).

> I'll look through what Sven did.  My only concern is whether you'll end
> up with Cocoon anyhow as your project scales up.
this might be the case indeed. but at the moment and for the foreseeable
future (3-6 month) this wont happen and so the discussion is a moot one.

> Well one thing I don't recommend is generating the gnumeric format
> directly once you know what you're
> doing.  Meaning come up with an interim format.
this isn't possible either cause the invoice-format is still very
young and there are a lot of changes going on for the next several
months. it is impractical to let those changes be made by programmers.
the people from the billing-dept. should do them but i simply cannot
force them to "programm" a bill in some xml-format. the maximum
i can give them is linux-box with gnumeric installed on it (and even
this is not so simple since this is a windowsshop).

on the otherhand transforming a given gnumeric-file into an stylesheet
is realy no fun and very brittle to do.

> makes it into a Gnumeric workbook.
>
> >but what i want to do later to is to create a pdf-file instead of an
excel-
> >file. i'll be using xsl-fo for that and i see some hard times coming to
> >first create an xsl-fo file out of gnumeric.
> >
> >
> I don't think it has to be if you do as above.
as said before the only practical solution is to get an allready formated
gnumeric-file from the billing-dept.

> You prefer this to the Excel xml format?
havent had a look on xls-xml.

ciao robertj


Robert Kuzelj
Gaissacherstrasse 7   email: [EMAIL PROTECTED]
81371 Muenchentel:   0177/5302230

the trinity of desirables of (software) architecture:
Firmitas, Utilitas, Venustas (marcus vitruvius 20 BC)
strength, utility, beauty




-
Please check that your question  has not already been answered in the
FAQ before posting. 

To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail:   <[EMAIL PROTECTED]>




Re: how to use a checkbox with DatabaseUpdateAction

2002-07-24 Thread Christian Haul

On 23.Jul.2002 -- 09:36 PM, Simon Price wrote:
> Is it possible to get DatabaseUpdateAction to write, for example, 'Y' or
> 'N' into an SQL column according to whether a checkbox is checked/unchecked?

You could have a default for this column of "N" - but since the
parameter is not present (-> null) the DatabaseUpdateAction will
insert a NULL into that column. No luck.

You could use DatabaseUpdateAction from the modular package
(scratchpad in 2.0.3, trunk in 2.1-dev) and wrap this column with a
default module. 2.1-dev has such a module (DefaultsMetaModule), while
2.0.3 does not. This is because the signature of InputModules has
changed slightly and 2.0.3 is bug-fix only.

It should be easy to backport a module from 2.1 to 2.0.3 as the basic
difference is the use of the objectModel instead of Request.

Chris.
-- 
C h r i s t i a n   H a u l
[EMAIL PROTECTED]
fingerprint: 99B0 1D9D 7919 644A 4837  7D73 FEF9 6856 335A 9E08

-
Please check that your question  has not already been answered in the
FAQ before posting. 

To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail:   <[EMAIL PROTECTED]>




Re: Excel generator

2002-07-24 Thread Andrew C. Oliver

>
>
>>
>>
>> but to be honest i dont know any better solution than gnumeric. and 
>> at least
>> the solution is symetrical gnumeric->excel->gnumeric.
>
>
> Yup. And XSLT files for easy conversion to the Excel format.
>

Okay thanks to all.  I'm convinced we made the right decision 
originally.  I wasn't sure at the start, everytime I'd describe this 
architecture I'd get "Why didn't you go with Excel XML format" -- but 
its nice to know that not only are people using the serializer at this 
point, but that they prefer the gnumeric format (as yucky as it is) for 
various reasons.  Good to know it was the right decision.

So Ken, while I don't want you to do it right now, because I think you 
have too many potatos in your donkey cart (picture Ken pulling a donkey 
cart with a bunch of potatos in it), what would it take to start moving 
this to Morpohos?  It seems the majority of people using this at the 
moment are using it outside of Cocoon.

I'll help (as soon as I move some potatos off my donkey cart) if I can, 
but I don't have enough Avalon/non-cocoon-xml-serializer experience to 
do this myself, nor do I have a clear picture of the plans for Morphos 
interface-wise.

I would suggest a seperate mailing list for this, perhaps on krysalis in 
addition to the commons mailing list, as there is no way in hell I'm 
subscribing to the commons mailing list ever again because the volume is 
soo great that it would triple my current email volume and probably 
bring my ISPs flaky email server down anyhow!
Others probably feel similar.

 From there we can plan an approach for the generator.  It would 
probably be faster too, my patches get applied too slow to work on it 
very efficiently here. (no offense)

-Andy




-
Please check that your question  has not already been answered in the
FAQ before posting. 

To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail:   <[EMAIL PROTECTED]>




Re: Excel generator

2002-07-24 Thread Andrew C. Oliver

>
>
>>Well we do have some samples, but its been limited at the moment by kind
>>of a chicken and the egg scenario.  The serializer is there, the samples
>>are there but we can't more because we don't have any usage scenarios
>>except for mine (translation: lots of people are using POI but few
>>people are using the serializer).  But that may in itself be the reaons
>>that we don't.
>>
>>
>i guess the problem is another one (imho). at the moment the whole
>serializing stuff is to much tied to cocoon. this makes it virtually
>infeasable to use it simply out of the box with poi. i would have
>not made it run without the help of sven (so here once again thanks
>to sven). all those jars of one does not know which ones are necessary
>and which are not - not to mention the fact that when deploying all
>of them you surely increase the proballity of jar-hell (one of the
>biggest problems in large java-development-shops).
>
>another problem at the moment is, that concrete interface for the
>HSSFSerializer is way to complex. you have to create all this
>logging-stuff and readers and so on. well i'd say "no batteries included".
>
>something like:
>OutputStream os = (new HSSFSerializer()).convert(gnumeric_file_or_stream);
>would be much easier to use for newbies.
>

Yeah in short:  Its a Cocoon Serializer.  While I appreciate this 
feedback, I personally have no use cases for the Serializer outside of 
Cocoon.  This makes it impossible for me to support a non-cocoon version 
of the Serializer.  It would take a motivated individual who knew what 
to do in order to support such a project.  My continued personal 
interest is in generating reports via Cocoon and the HSSF Serializer.

>>Are you using the serializer?  For what?  how?
>>
>>...and then bug reports and requests could drive the development a bit
>>
>>
>more.
>we (that is my customer) are using it to create invoive-files which in
>a later stage will be converted to pdfs.
>we are still in early development so i cant say how well it will work out.
>but we will generate more than 300 invoices per week and the number is
>going to increase.
>  
>
Cool!  Would you mind writing up a case study for POI? 
 http://jakarta.apache.org/poi/casestudies.html

I'll look through what Sven did.  My only concern is whether you'll end 
up with Cocoon anyhow as your project scales up.

>>Well it actually kinda sucks and is probably hard to hand generate.  It
>>probably actually sucks more than
>>the Gnumeric format, but it more cleanly maps to the file format.
>>
>>
>hmm, i think the gnumeric-format is not so great, even thou i have to admit
>that there even worser ones.
>
>what is on the one hand realy nice is that the formating part is separeted
>from the content part but that is also the drawback. when changing the file
>by hand you almost surely f*ck the whole thing up. actually that is what
>i did on thursday of last week: destroying 1 1/2 days of work when trying
>to make a stylesheet out of a gnumeric-file.
>
>i settled now for a multistage-process. i'll fill in variables in the
>format of ant ( ${varname} ) in gnumeric -> replacing the variables
>by means of regex with '' and then
>merging the stylesheet and the date to a gnumeric-file and this one is
>being serialized.
>  
>
Well one thing I don't recommend is generating the gnumeric format 
directly once you know what you're
doing.  Meaning come up with an interim format.

XML-> YOUR XML -> Gnumeric
   XSLT  XSLT

The first XSLT converts your datafeed into an XML Invoice (your own tag 
langauge).  The second stylesheet generically applys styling to this and 
makes it into a Gnumeric workbook.

>but what i want to do later to is to create a pdf-file instead of an excel-
>file. i'll be using xsl-fo for that and i see some hard times coming to
>first create an xsl-fo file out of gnumeric.
>  
>
I don't think it has to be if you do as above.

>but to be honest i dont know any better solution than gnumeric. and at least
>the solution is symetrical gnumeric->excel->gnumeric.
>  
>
You prefer this to the Excel xml format?

-Andy

>ciao robertj
>
>Robert Kuzelj
>Gaissacherstrasse 7   email: [EMAIL PROTECTED]
>81371 Muenchentel:   0177/5302230
>
>the trinity of desirables of (software) architecture:
>Firmitas, Utilitas, Venustas (marcus vitruvius 20 BC)
>strength, utility, beauty
>
>
>
>-
>Please check that your question  has not already been answered in the
>FAQ before posting. 
>
>To unsubscribe, e-mail: <[EMAIL PROTECTED]>
>For additional commands, e-mail:   <[EMAIL PROTECTED]>
>
>
>  
>




-
Please check that your question  has not already been answered in the
FAQ before posting. 


continuation ID

2002-07-24 Thread Mohamed El-Refaey



Daniel Fagerstrom wrote:
 
>Here, the parameter "form" is a Form object and 
"view" is a string. I don't>follow the interfaces in XMLForm in every 
detail. Note that thanks to the>continuations, we can group together the 
form page code, followed by the>code that takes care of its output and 
not the other way around: take care>of input from last form followed by 
generating the next form page, as in the>sitemap.
>>
  
              
  
  

>>
 
But I tried to use the action attribute of the form 
by the value of the continuation or any other value, but it doesn't work. is 
this syntax is precise or it is just an idea of how to use the continuation into 
the XMLTransformer or this action parameter is different than the action of the 
XMLForm ??
 
any help please ?
 
Mohamed


Macros in velocity generator

2002-07-24 Thread Carles Canellas

Hello.
I'm using a velocity generator in a internal pipeline
on my sitemap in order to get a xsp file.

My problem is that i want to use velocimacros to
simplify the source vm file, but I don't know where
cocoon is trying to find the VM_global_library.vm
where I have defined the macros.

the internal pipeline is:











The message in the sitemap.log is:
INFO(2002-07-24) 10:57.05:695   [sitemap]
(/cocoon/impresion/imprime)
Thread-7/VelocityGenerator: Velocimacro :
initialization starting.
INFO(2002-07-24) 10:57.05:695   [sitemap]
(/cocoon/impresion/imprime)
Thread-7/VelocityGenerator: Velocimacro : adding VMs
from VM library template : VM_global_library.vm
ERROR   (2002-07-24) 10:57.05:695   [sitemap]
(/cocoon/impresion/imprime)
Thread-7/VelocityGenerator: ResourceManager : unable
to find resource 'VM_global_library.vm' in any
resource loader.
INFO(2002-07-24) 10:57.05:695   [sitemap]
(/cocoon/impresion/imprime)
Thread-7/VelocityGenerator: Velocimacro : error using 
VM library template VM_global_library.vm :
org.apache.velocity.exception.ResourceNotFoundException:
Unable to find resource 'VM_global_library.vm'
INFO(2002-07-24) 10:57.05:695   [sitemap]
(/cocoon/impresion/imprime)
Thread-7/VelocityGenerator: Velocimacro :  VM library
template macro registration complete.

I have searched in the documentation and in the
cocoon.xconf and I have found nothing about that
issue.

My java is not so good to find it in the source code.

In wich path is cocoon trying to find these files?
Can I change this path? How?

Thanks in advance.
Carles.


___
Yahoo! Messenger
Nueva versión: Webcam, voz, y mucho más ¡Gratis! 
Descárgalo ya desde http://es.messenger.yahoo.com

-
Please check that your question  has not already been answered in the
FAQ before posting. 

To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail:   <[EMAIL PROTECTED]>




unknown font error

2002-07-24 Thread zhaiyun
Hi
I am running cocoon-2.0.2 under tomcat-4.0.3 and fop-0.20.3.
i used fop to generate PDF.

useconfig file is specified in sitemap.xmap as following:

   

   

following are defined in the userconfig.xml

  
   
  

in fo i use mysimsun as following:

 
  
   
  
 

following error out in the logs of tomcat:

2002-07-23 13:26:50 ERROR   (2002-07-23) 13:26.50:017   [fop ]
(/OTSYS/report/bill/APL) HttpProcessor[8080][0]/MessageHandler: unknown font
mysimsun,normal,normal so defaulted font to any

who can point out the miss?

Thanks!

ZhaiYun


-
Please check that your question  has not already been answered in the
FAQ before posting. 

To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail:   <[EMAIL PROTECTED]>


Re: Excel generator

2002-07-24 Thread Nicola Ken Barozzi


[EMAIL PROTECTED] wrote:
> hi oliver,
> 
> 
>>Well we do have some samples, but its been limited at the moment by kind
>>of a chicken and the egg scenario.  The serializer is there, the samples
>>are there but we can't more because we don't have any usage scenarios
>>except for mine (translation: lots of people are using POI but few
>>people are using the serializer).  But that may in itself be the reaons
>>that we don't.
> 
> i guess the problem is another one (imho). at the moment the whole
> serializing stuff is to much tied to cocoon. this makes it virtually
> infeasable to use it simply out of the box with poi. i would have
> not made it run without the help of sven (so here once again thanks
> to sven). all those jars of one does not know which ones are necessary
> and which are not - not to mention the fact that when deploying all
> of them you surely increase the proballity of jar-hell (one of the
> biggest problems in large java-development-shops).
> 
> another problem at the moment is, that concrete interface for the
> HSSFSerializer is way to complex. you have to create all this
> logging-stuff and readers and so on. well i'd say "no batteries included".
> 
> something like:
> OutputStream os = (new HSSFSerializer()).convert(gnumeric_file_or_stream);
> would be much easier to use for newbies.

This is in the works, as project Morphos in Commons scratchpad.
Someone has already a working standalone version of the serializer, and 
we will put it in Morphos.

Morpher myMorpher = MorpherFactory.getMorpher("hssf");
mymorpher.morph(gnumeric_file_or_stream, os);

>>Are you using the serializer?  For what?  how?
>>
>>...and then bug reports and requests could drive the development a bit
> 
> more.
> we (that is my customer) are using it to create invoive-files which in
> a later stage will be converted to pdfs.
> we are still in early development so i cant say how well it will work out.
> but we will generate more than 300 invoices per week and the number is
> going to increase.
> 
> 
>>Well it actually kinda sucks and is probably hard to hand generate.  It
>>probably actually sucks more than
>>the Gnumeric format, but it more cleanly maps to the file format.
> 
> hmm, i think the gnumeric-format is not so great, even thou i have to admit
> that there even worser ones.
> 
> what is on the one hand realy nice is that the formating part is separeted
> from the content part but that is also the drawback. when changing the file
> by hand you almost surely f*ck the whole thing up. actually that is what
> i did on thursday of last week: destroying 1 1/2 days of work when trying
> to make a stylesheet out of a gnumeric-file.
> 
> i settled now for a multistage-process. i'll fill in variables in the
> format of ant ( ${varname} ) in gnumeric -> replacing the variables
> by means of regex with '' and then
> merging the stylesheet and the date to a gnumeric-file and this one is
> being serialized.
> 
> but what i want to do later to is to create a pdf-file instead of an excel-
> file. i'll be using xsl-fo for that and i see some hard times coming to
> first create an xsl-fo file out of gnumeric.
> 
> but to be honest i dont know any better solution than gnumeric. and at least
> the solution is symetrical gnumeric->excel->gnumeric.

Yup. And XSLT files for easy conversion to the Excel format.



-- 
Nicola Ken Barozzi   [EMAIL PROTECTED]
 - verba volant, scripta manent -
(discussions get forgotten, just code remains)
-


-
Please check that your question  has not already been answered in the
FAQ before posting. 

To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail:   <[EMAIL PROTECTED]>




Re: Excel generator

2002-07-24 Thread Jens Lorenz

- Original Message -
From: "Andrew C. Oliver" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, July 23, 2002 8:06 PM
Subject: Re: Excel generator


> Sorry if it sounds like I'm hounding on this issue, but its very
helpful.
>
> And you find the gnumeric format preferrable to striving for Excel 2000
> XML format compatibility?
> (with the understanding that If I did do the generator in Excel format
> I'd probably rewrite the serializer to that as well)
>
> -Andy
>


The rewrite of the serializer is enough of a reason, not to change the
format. (IMHO) Why change something, if it works, as long as there is
no strong reason ? (and Excel format compatibility is no strong reason
for me)

Gnumeric XML is powerful enough and well documented. The latter is the
most important for me. This pdf describing every single tag and
attribute is a huge help, when having to generate a spreadsheet
programmatically.



Jens

--

jens.lorenz at interface-projects dot de

interface:projects GmbH \\|//
Tolkewitzer Strasse 49  (o o)
01277 Dresden   oOOo~(_)~oOOo
Germany


-
Please check that your question  has not already been answered in the
FAQ before posting. 

To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail:   <[EMAIL PROTECTED]>




Re: Excel generator

2002-07-24 Thread Jens Lorenz

- Original Message - 
From: "Andrew C. Oliver" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, July 23, 2002 3:56 PM
Subject: Re: Excel generator


> But the more important part of my answer was "What do you want on your 
> generator, and
> what do you wish you had on your serializer  --  would you like fries 
> too?"  Meaning I need ideas!  
> I'm on the fence,  I want some input.
> 
> -Andy
> 


I think the gnumeric XML format is the way to go. Why bothering with
Excel XML format if it's going to change anyway (if it's just a
translation of the binary format, it is most likely to change). And
Excel still can read and write the old binary formats.
This way you could also use other serializers to produce OpenOffice.org
spreadsheets or any other spreadsheet application.

So, my wish would be a Gnumeric XML generator and serializer. Served
with backed potatoes and some garnish ... ;)



Jens

-- 

jens.lorenz at interface-projects dot de

interface:projects GmbH \\|//
Tolkewitzer Strasse 49  (o o)
01277 Dresden   oOOo~(_)~oOOo
Germany


-
Please check that your question  has not already been answered in the
FAQ before posting. 

To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail:   <[EMAIL PROTECTED]>




Re: Excel generator

2002-07-24 Thread robert_kuzelj

hi oliver,

> Well we do have some samples, but its been limited at the moment by kind
> of a chicken and the egg scenario.  The serializer is there, the samples
> are there but we can't more because we don't have any usage scenarios
> except for mine (translation: lots of people are using POI but few
> people are using the serializer).  But that may in itself be the reaons
> that we don't.
i guess the problem is another one (imho). at the moment the whole
serializing stuff is to much tied to cocoon. this makes it virtually
infeasable to use it simply out of the box with poi. i would have
not made it run without the help of sven (so here once again thanks
to sven). all those jars of one does not know which ones are necessary
and which are not - not to mention the fact that when deploying all
of them you surely increase the proballity of jar-hell (one of the
biggest problems in large java-development-shops).

another problem at the moment is, that concrete interface for the
HSSFSerializer is way to complex. you have to create all this
logging-stuff and readers and so on. well i'd say "no batteries included".

something like:
OutputStream os = (new HSSFSerializer()).convert(gnumeric_file_or_stream);
would be much easier to use for newbies.

> Are you using the serializer?  For what?  how?
>
> ...and then bug reports and requests could drive the development a bit
more.
we (that is my customer) are using it to create invoive-files which in
a later stage will be converted to pdfs.
we are still in early development so i cant say how well it will work out.
but we will generate more than 300 invoices per week and the number is
going to increase.

> Well it actually kinda sucks and is probably hard to hand generate.  It
> probably actually sucks more than
> the Gnumeric format, but it more cleanly maps to the file format.
hmm, i think the gnumeric-format is not so great, even thou i have to admit
that there even worser ones.

what is on the one hand realy nice is that the formating part is separeted
from the content part but that is also the drawback. when changing the file
by hand you almost surely f*ck the whole thing up. actually that is what
i did on thursday of last week: destroying 1 1/2 days of work when trying
to make a stylesheet out of a gnumeric-file.

i settled now for a multistage-process. i'll fill in variables in the
format of ant ( ${varname} ) in gnumeric -> replacing the variables
by means of regex with '' and then
merging the stylesheet and the date to a gnumeric-file and this one is
being serialized.

but what i want to do later to is to create a pdf-file instead of an excel-
file. i'll be using xsl-fo for that and i see some hard times coming to
first create an xsl-fo file out of gnumeric.

but to be honest i dont know any better solution than gnumeric. and at least
the solution is symetrical gnumeric->excel->gnumeric.

ciao robertj

Robert Kuzelj
Gaissacherstrasse 7   email: [EMAIL PROTECTED]
81371 Muenchentel:   0177/5302230

the trinity of desirables of (software) architecture:
Firmitas, Utilitas, Venustas (marcus vitruvius 20 BC)
strength, utility, beauty



-
Please check that your question  has not already been answered in the
FAQ before posting. 

To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail:   <[EMAIL PROTECTED]>




RE: == I18N question ==

2002-07-24 Thread Piroumian Konstantin

> From: Vadim Gritsenko [mailto:[EMAIL PROTECTED]] 
> > From: Piroumian Konstantin [mailto:[EMAIL PROTECTED]]
> > 
> > I think that this discussion that happened at Forrest 
> project will help you
> > a little: http://marc.theaimsgroup.com/?t=10240438142&r=1&w=2
> 
> or you can simply do something (don't know exactly):
> 
> 
>   
> 
>   
>   ...
> 

Note, that type="lang" action was used for the LangSelect action which is
deprecated in 2.0.3 and were removed from the 2.1. The correct version will
look like:

 
   
 
   
   ...
 

>  
> You can even check existence of the file with 
> ResourceExistAction and return default language if 
> translation is not available.

You can check if the translation is present in this order:
locale = lang_country_variant (e.g. de_AT_EURO)
lang_country (e.g. en_US)
lang (e.g. en)

This is how i18n trasformer looks for dictionary files.

Maybe something like an new LocalizedFileAction action would be more
convenient for this task. It can check for the existence of required
resource then return the first matched one or the default file name, e.g.:

 
   
   
   ...
 

Konstantin

> 
> 
> Vadim
> 
> 
> > --
> > Konstantin Piroumian
> > [EMAIL PROTECTED]
> > 
> > 
> > > -Original Message-
> > > From: JИrТme Iffrig [mailto:[EMAIL PROTECTED]]
> > > Sent: Monday, July 22, 2002 4:36 PM
> > > To: [EMAIL PROTECTED]
> > > Subject: == I18N question ==
> > >
> > >
> > > Hi,
> > >
> > > I am new with Cocoon, so I am not sure this is the rigth
> > > channel to ask question, please accept my apology if it is
> > > not.
> > > I would like to internationalize my Site - NOT the site
> > > itself, but rather its CONTAINT. e.g. I would like to, let
> > > say, localise the HELP page of my site in 4 langages and
> > > rely on Cocoon for the localisation (depending on the
> > > preferences of the visitor). Which means that on one hand I
> > > would like to have the XML files for the content in
> > > different languages (I would like to have one XML file per
> > > language for administration ease), and on the other hand, I
> > > would like to have my Cocoon style file. At the end all the
> > > localised content files would be parsed according to the
> > > style file to he coherent in the styles with different
> > > languages.
> > > Have anyone of you done this before? I can see tutorials on
> > > how to create dictionaries and how to replace strings
> > > (Cocoon official website), but nothing realy clear
> > > regarding my question.
> > >
> > > Thanks for your time.
> > > Jé-
> > > __
> > > Boîte aux lettres - Caramail - http://www.caramail.com
> 
> 
> -
> Please check that your question  has not already been answered in the
> FAQ before posting. 
> 
> To unsubscribe, e-mail: <[EMAIL PROTECTED]>
> For additional commands, e-mail:   <[EMAIL PROTECTED]>
> 

-
Please check that your question  has not already been answered in the
FAQ before posting. 

To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail:   <[EMAIL PROTECTED]>




Actions - Basics

2002-07-24 Thread Richard

Hi Guys

I am trying to compile the HelloWorldAction.java file under...

C:\Program Files\Apache Tomcat 4.0\webapps\cocoon\WEB-INF\lib\

the compiler gives me unresolve symbol errors for the
org.apache.avalon.framework.*  and  org.apache.cocoon.* classes/packages.

now what i did was look for these packages inside the

Apache Tomcat 4.0\webapps\cocoon\WEB-INF\lib\*.jar files,
eventually I have found all the packages that i need. in the end i have
managed  to compile the HelloWorldAction. but what i got is an org folder
under the \WEB-INF\lib\ folder, containing packages for org-apache-avalon,
org-apache-cocoon and org-xml.

to illustrate...

WEB-INF\lib\ folder
  |
  |
  | -> org
 |
 |--> apache
 |  |--> avalon
 |  |--> cocoon
 |
 |---> xml folder

Is this alright? ( I think there is something wrong with it )

Why cant the javac see the packages inside the jar files?

I have also tried to use the javac -classpath C:\Program Files\Apache Tomcat
4.0\webapps\cocoon\WEB-INF\lib HelloWorldAction.java command. It gives the
same error.

Notes:
-I used the javac command in DOS mode to compile the java file.
-JAVA_HOME = C:\jdk1.3.1_03
-CATALINA_HOME = C:\Program Files\Apache Tomcat 4.0
-CLASSPATH=C:\jdk1.3.1_03\lib;C:\Program Files\Apache Tomcat
4.0\webapps\cocoon\WEB-INF\lib
-COCOON_HOME=C:\Program Files\Apache Tomcat 4.0\webapps\cocoon

PC Configuration
--
Windows 2000 Server Professional
Java 2 SDK 1.3.01
Jakarta Tomcat 4.0.4
cocoon-2.0.2 dev


Now I have add this line in the main sitemap file (C:\Program Files\Apache
Tomcat 4.0\webapps\cocoon\sitemap.xmap)



is this correct?

Thanks in advance...


-
Please check that your question  has not already been answered in the
FAQ before posting. 

To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail:   <[EMAIL PROTECTED]>




Schematron Validation 2

2002-07-24 Thread michael_hampel

Another question:

   I also have non mandatory fields - but if
   the user gives an input I want to validate the input.
   So, is there a way in Schematron to say
   if(input is not empty)
  assert

   Can I do something like nested asserts?

Thanx again for any help,


 miHam


-
Please check that your question  has not already been answered in the
FAQ before posting. 

To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail:   <[EMAIL PROTECTED]>