File Uploads With Flow, per the Wiki

2004-02-11 Thread Mark Lundquist
This page:
http://wiki.cocoondev.org/Wiki.jsp?page=FileUploadsWithFlow
had an example of how to manage uploads using flow.  Unfortunately, the 
example didn't work out of the box.  To pull all the pieces together, 
you had to follow a link to Bugzilla and get two source file 
attachments to compile, and the details in the Wiki example didn't 
match the text of the patch description, which in turn didn't match up 
with the code in the patch.

Not so great for noobs such as myself!  So anyway, after I figured out 
how to get it all working (man, I learned a lot doing that! :-), I 
attached a .jar file to the Wiki page and amended/supplemented the 
example so that it will actually work.

It seems like this is sort of a FAQ... I remember reading posts on this 
list about it a few months ago, when I was still just starting to look 
at Cocoon.  Back then I didn't understand any of it... I was like, OK, 
yeah uploading a file, that's probably something I'll have to figure 
out how to do someday.  But even recently here I saw a post from a 
couple of weeks ago, where the poor guy tried to type in everything 
from the Wiki page verbatim, and it didn't work.  Dang it, now I can't 
find that post for the life of me!  So whoever you are, if you're out 
there I hope this helps :-)

Anyway... someday 2.1.4 will come out and we will have wd:upload, but 
until then hopefully this will help somebody out...
~ml

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


URGENT: Cocoon+FO Project needs a new owner

2004-02-11 Thread Phil Blake
Hi Everyone,

I started a paid project for a friend and have been so snowed under 
with work that I can't complete it in a reasonable time.

Anyone interested in a cocoon 2.1 FoxPro/ESQL/FO PDF publishing 
project, contact me asap for complete details. The project is 90% 
complete.

It's a great job, and if you're interested it will most likely lead to 
other similar projects.

Thanks for your time.

Phil
PS Good handle on FO and PDF essential.


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


Re: aggregate files that match in a request

2004-02-11 Thread Jan Hoskens
You can get a filelist through the directory generator, then apply an
xsl-stylesheet to create cinclude or xinclude tags and then apply the
transformer for that include:

1) generate your filelist by directory generator
2) apply xsl that creates something like cinclude:include src=file/ or
xinclude elements
3) map:transform type=cinclude or xinclude

Got it? (if not, just say so:), see cocoon docs/wiki for more info!)

So that's a yes;-)

Greetz,
Jan


- Original Message - 
From: [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, February 11, 2004 9:14 AM
Subject: aggregate files that match in a request



 hi people

 i just want to ask if it's posible to aggregate
 an (unknown) number of .xml files that match in a request

 for example all the .xmls that are in a specific folder
 or all files that match /content/*.xml


 any hint?

 --stavros



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



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



RE: Embedded JavaScript file inside dynamic SVG isn't working

2004-02-11 Thread robby . pelssers
Hi Steve and Gautam,

you can try the following to see if your code works at all   I did embed
the scripting and CSS in the stylesheet, because I wanted a quick solution
and hadn't any knowledge of how to use the sitemap. 


xsl:stylesheet xmlns:xlink=http://www.w3.org/1999/xlink;
xmlns:xsl=http://www.w3.org/1999/XSL/Transform; version=1.0
  xsl:template match=/   
svg xmlns:svg=http://www.w3.org/2000/svg; width=1000 heigth=120  
  script language=JavaScript type=text/javascript
![CDATA[  
  //
  // Declare Global Variables //
  //
  var SVGDoc = null

  // Make sure we're using the correct SVG object on the page
  //   - there can be more than 1 sourced element
  //
  function getObj(mouseEvent) {
SVGDoc = mouseEvent.getTarget().getOwnerDocument()
  }

  
  // SVG Manipulation Functions //
  

  // change the fill color of an element
  function elemColor(mouseEvent, elemName, value) {
// get the proper SVG object
getObj(mouseEvent)

// check for AI converted spaces
elemName = spaceTrans(elemName)

// get the element we want to change
  var thisElem = SVGDoc.getElementById(elemName).getStyle()

// perform the fill color change
  thisElem.setProperty('fill', value)
  }

  // change the stroke width of an element
  function elemStrokeWidth(mouseEvent, elemName, value) {
// get the proper SVG object
getObj(mouseEvent)

// check for AI converted spaces
elemName = spaceTrans(elemName)

// get the element we want to change
var thisElem = SVGDoc.getElementById(elemName).getStyle()

// perform the stroke width change
thisElem.setProperty('stroke-width', value)
  }

  // change the stroke color of an element
  function elemStrokeColor(mouseEvent, elemName, value) {
  // get the proper SVG object
  getObj(mouseEvent)

  // check for AI converted spaces
  elemName = spaceTrans(elemName)

  // get the element we want to change
  var thisElem = SVGDoc.getElementById(elemName).getStyle()

  // perform the stroke color change
  thisElem.setProperty('stroke', value)
  }

  // show an element - note: these work with the display property,
not visibility
  function elemShow(mouseEvent, elemName) {
  // get the proper SVG object
  getObj(mouseEvent)

  // check for AI converted spaces
  elemName = spaceTrans(elemName)

  // get the element we want to change
  var thisElem = SVGDoc.getElementById(elemName).getStyle()

  // make the element visible
  thisElem.setProperty('display', 'inline')
  }

  // hide an element - note: these work with the display property,
not visibility
  function elemHide(mouseEvent, elemName) {
  // get the proper SVG object
  getObj(mouseEvent)

  // check for AI converted spaces
  elemName = spaceTrans(elemName)

  // get the element we want to change
  var thisElem = SVGDoc.getElementById(elemName).getStyle()

  // hide the element
  thisElem.setProperty('display', 'none')
  }

  // translate spaces into equivalent AI exported space string
  function spaceTrans(stringIn) {
  var result = 
  for (var i = 0; i  stringIn.length; i++) {
  if (stringIn.charAt(i) ==  ) {
result += _x0020_
  } else {
result += stringIn.charAt(i)
  }
  }
  return result
  }

  ]]/script

  defs
style type=text/css![CDATA[
  path {
   fill: none;
   stroke: grey;
   stroke-opacity:0.8;
   stroke-width: 1;
  }
  line {
   fill:none;
   stroke:grey;
   stroke-opacity:0.8;
   stroke-width:1;
  } 
  rect {
   fill:none;
   stroke:grey;
   stroke-opacity:0.8;
   stroke-width:1; 
  }
  text {
   font-size:10;
   

Re: Re: Ant task in Cocoon 2.1.3 xsltc

2004-02-11 Thread Martin Geissler
Hello,
thanks for the hints. It works.

I had to set the Environment Variable ANT_OPTS
with the value.
e.g. on my Windows System:
SET
ANT_OPTS=-Djava.endorsed.dirs=C:\cocoon-2.1.3-src\cocoon-2.1.3\lib\endorsed

Per command line as you showed did not work for me.

Martin

 [EMAIL PROTECTED] Dienstag, 10. Februar 2004 23:00:24 
On 10.02.2004 22:46, Upayavira wrote:

 Joerg Heinicke wrote:
 
 When forking a new JVM you have to specify a parameter 
 -Dendorsed.dirs=COCOON_HOME/lib/endorsed, i.e. pointing to Cocoon's

 endorsed dir. I don't know if the Cocoon task forks, if not you can

 add the property when calling ant.
 
 
 It doesn't fork. How do you provide it to Ant?

The same way, but the parameter is correctly names java.endorsed.dirs:

build -Djava.endorsed.dirs=COCOON_HOME/lib/endorsed yourtarget

build can also be ant of course, the command line parameters just 
must not get lost in a script.

Joerg

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


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



Re: Please help! wt:form-template location attribute

2004-02-11 Thread Mark Lundquist
Another update on this problem...

I built a Cocoon from the daily snapshot, and my problem doesn't occur 
there.  So, I guess this is fixed in 2.1.4.  That's good news and bad 
news for me... not sure what I'm going to do.

I have a tiny test case for this, in case anyone is interested in 
looking at it.  Maybe someone who knows the Cocoon innards better that 
I do (which is to say, who knows any little bit about them :-) can help 
me figure out how to debug this...?

~ml

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


Re: Problem with date format for a woody widget in xsp

2004-02-11 Thread Bruno Dumon
On Tue, 2004-02-10 at 09:03, Alex Kovacs wrote:
 Hi,
 
 I am using cocoon-2.1.3 with Woody. I have a situation where I am using xsp
 to display some data from a Woody form. The problem is when trying to
 display the value of a date widget and the date format is the default one
 instead of the one set in the widget definition. I have the following
 configuration (using xml binding):
 
 Widget definition:
 ...
 wd:field id=start_date
 wd:datatype base=date
 wd:convertor type=formatting
 wd:patterns
 wd:patterndd/MM//wd:pattern
 /wd:patterns
 /wd:convertor
 /wd:datatype
 wd:labelStart Date/wd:label
 /wd:field
 ...
 
 
 The confirm.xsp file:
 ...
 xsp:logic
 //Fetching the form from the request attribute
 Form form = (Form)request.getAttribute(theform);
 Field start_date = (Field)form.getWidget(start_date);
 /xsp:logic
 ...
 item
xsp:exprstart_date.getValue()/xsp:expr
  /item
 ...
 
 And the output is in the form of: Tue Feb 10 00:00:00 EST 2004, instead of
 10/02/2004.
 
 Can anyone help?

The start_date.getValue() call returns a Date object, so the date you're
seeing it the default Date.toString() behaviour of Java.

Unfortunately, AFAIK, there's currently no method on the Field widget to
retrieve its converted string value (it's only part of the generated
XML). Seems useful to me though, and would only be 3 lines of code.

-- 
Bruno Dumon http://outerthought.org/
Outerthought - Open Source, Java  XML Competence Support Center
[EMAIL PROTECTED]  [EMAIL PROTECTED]


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



Re: SQL Transformer generates illegal element names

2004-02-11 Thread Jorg Heymans
recently I ran into a problem with SQL Transformer. The column names 
returned from the database are used for naming the children of sql:row, 
but those names can be something like count(distinct xxx) or 
'SYS$', which violates the wellformed conditions of the return document.

alias your columns as a temporary workaround?
ie select sysdate-1 as mydate from dual;
I know oracle can do this , dunno about other databases.
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


unescaping xml in XSP-page

2004-02-11 Thread Erik Hofstra
Hi all,

I have a problem with my xml-string. From a XSP-page i call a JavaClass
which makes a SOAP-call. The JavaClass returns a XML document in
String type.
When i place this string in my page with xsp:expr the '' and '' of the
XML string are replaced with 'lt;' and 'gt;'. Because of this replacement
the transformer doesn't 'recognize' the tags.
I tried util:include-expr, unescapeXml, unescapeHtml and even the
string.replaceAll() method (:S) but nothing helps.

Does anyone knows how to solve this problem or has an idea?

Thanks!
Erik

btw, here is a piece of my XSP code:
xsp:logic
String xmlString = soapCall.doSOAPCall();
/xsp:logic

xsp:exprxmlString/xsp:expr


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



Re: AW: Special chars problem

2004-02-11 Thread Bruno Dumon
On Wed, 2004-02-11 at 08:59, Jan Hoskens wrote:
 After searching the archives, I found some stuff about the encoding in
 cocoon. I tried changing the ISO-8859-1 to UTF-8 in the web.xml, but that
 did not change the problem.
 (http://marc.theaimsgroup.com/?t=106760662600010r=1w=2)When I passed the
 url, it still was in the wrong format 'A?'(String assuming Unicode instead
 of UTF-8). I found a wiki page concerning encoding in cocoon at
 http://wiki.cocoondev.org/Wiki.jsp?page=RequestParameterEncoding. I fixed my
 problem by applying a conversion to all parameters in my flow that may
 contain an incoming url. This conversion is also stated in the wiki page:
 value = new String(value.getBytes(ISO-8859-1), UTF-8);So whenever you're
 using parameters and passing something that's UTF-8, do that conversion to
 avoid problems concerning the special chars.

As explained on that wiki page, this conversion is exactly what Cocoon
already does for you. If it does not work, it's likely because of a
misconfiguration (except if there got some new bug in there, which I
doubt).

So in the web.xml, you put the container-encoding to ISO-8859-1 and the
form-encoding to UTF-8?

-- 
Bruno Dumon http://outerthought.org/
Outerthought - Open Source, Java  XML Competence Support Center
[EMAIL PROTECTED]  [EMAIL PROTECTED]


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



Question: auth-fw, roles, authorisation file format

2004-02-11 Thread Andrei Lunjov
Hello,

I tried to find details in docs and samples, but seems I am quite stupid 
:) Possibly I missed something improtant? I am currently developing 
kind of skeleton and guidelines for quite large application to be used 
for long time - so I want to make things as standard as possible.

Questions are about roles and authorisation/access delimeting.
I understood well (ok, I hope :) ) how authentication works. But what is 
 with authorisation?

Suppose I have some number of roles in authentication xml produced by 
authentication resource like described here 
http://cocoon.apache.org/2.1/developing/webapps/authentication.html
Is there any standart mechanism to allow access for particular resources 
/ sitemap parts depending upon roles user has? Something like RoleMatcher?

Another question is about authentication xml format - same doc says 
quite foggy about multiple roles.
would this be correct? :

authentication
IDUnique ID of the user in the system/ID
roles
rolerolename1/role
rolerolename2/role
/roles
data
Any additional optional information can be supplied here.
This will be stored in the session for later retrieval
/data
/authentication


Any info appreciated.

Andrei Lunyov



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


Re: Need some help w/ Woody Template

2004-02-11 Thread Bruno Dumon
On Tue, 2004-02-10 at 11:37, Mark Lundquist wrote:
 Hi all,
 
 I need to put a couple of forms on a page. 
 TheWoodyTemplateTransformer wiki page says the way to do this is to
 usethe special @location attribute on wt:form-template, to tell
 thetransformer where to pick up the form instance.
 
 It's kinda sketchy, but I think I can dig what they're getting
 atthere.  So I did this:
 
 wd:form-template
 location=getAttribute($request, 'form1')
   action=#{$continuation/id}.continue method=POST
 
 
 ...and then I went like this in my flow:
 
 form1 = new Form (form1.wd);
 cocoon.request.setAttribute (form1, form1.form);
 
 form2 = new Form (form2.wd);
 cocoon.request.setAttribute (form2, form2.form);
 
 I can see that if I call showForm() on either of these, the whole
 pageshould get displayed with both forms.  So, I went ahead and:
 
 form2.showForm (display-forms);
 
 Poofo, it works!  There's my page, with both forms, all styled like
 Iwant.
 
 Oops, no it doesn't.  When I click the submit button, I get this:
 
 Description:org.apache.cocoon.ProcessingException: Failed to execute
 pipeline.:org.xml.sax.SAXException: No form found at
 locationgetAttribute($request, 'form1').

That's because the request is an object that lives only for the duration
of one request. Thus if you put something in a request attribute, it
only remains there for the current request. The submit is a new request,
so you would have to put the forms back in the attributes on that new
request. But with the woody2.js this is rather hard, since you can't do
that AFAIK without modifications.

The whole woody-flowscript integration is quite focussed on displaying
one form at a time, so you're a bit on your own if you want to display
multiple forms... (not that it's impossible, but you'll have to write
some more code by your own)

snip/

-- 
Bruno Dumon http://outerthought.org/
Outerthought - Open Source, Java  XML Competence Support Center
[EMAIL PROTECTED]  [EMAIL PROTECTED]


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



Re: aggregate files that match in a request

2004-02-11 Thread gounis
On Wed, 11 Feb 2004, Jan Hoskens wrote:

 You can get a filelist through the directory generator, then apply an
 xsl-stylesheet to create cinclude or xinclude tags and then apply the
 transformer for that include:
 
 1) generate your filelist by directory generator
 2) apply xsl that creates something like cinclude:include src=file/ or
 xinclude elements
 3) map:transform type=cinclude or xinclude
 
 Got it? (if not, just say so:), see cocoon docs/wiki for more info!)
 
 So that's a yes;-)
 
 Greetz,
 Jan
 

GREAT, GREAT

an other one time that u have just to keep jour think simple
thnx

--stavros
 
 - Original Message - 
 From: [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Wednesday, February 11, 2004 9:14 AM
 Subject: aggregate files that match in a request
 
 
 
  hi people
 
  i just want to ask if it's posible to aggregate
  an (unknown) number of .xml files that match in a request
 
  for example all the .xmls that are in a specific folder
  or all files that match /content/*.xml
 
 
  any hint?
 
  --stavros
 
 
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 


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



Re: WoodyTemplateTransformer vs. WoodyGenerator

2004-02-11 Thread Bruno Dumon
On Tue, 2004-02-10 at 03:17, Mark Lundquist wrote:
snip/
 
 Then flow came along, and the WoodyTemplateTransformer was
 madeflow-friendly: first and foremost, it knows about the continuation
 ID! But the WoodyGenerator fell behind the curve, probably because it
 wasa second-class citizen already.  It is not flow-happy!  (Compare
 thesource for the generator and transformer to see).
 
 This is where I got stuck  I could create and display a form
 usingflow and display it using the generator (and my stylesheet), but
 thenfor flow you have to encode that continuation ID into the
 formaction=... somehow, and there's no way to do it!

I don't have time to read this whole thread, but my eyes jus fell on
this.

You can provide the continuation ID to your XSL using a parameter in the
sitemap. There's an inputmodule with which you can get it (though it's
only in CVS and still in scratchpad).

I don't think it's the role of the WoodyGenerator to supply you with the
continuation ID.

snip/
 With WoodyGenerator, you're kinda roughing it a little bit because
 itonly supports the (c) way, and it's undocumented how to do it
 fromflow (and arguably, that's OK for now, since WoodyGenerator can't
 makea form that you can handle with flow!).

There have been updates to the WoodyGenerator, with latest CVS the
lookup of the form works similary as with the template transformer
(IIUC). (won't help you for the case with the multiple forms on one page
though)

As far as the whole template vs generator debate is concerned, just use
what fits your case best. If your forms are pretty generic and always
follow the same layout, you're probably better of with the generator. 

The idea behind the templatetransformer is that in most cases this isn't
the case (i.e. you want to have full control over how you position
things), and that maintaining an XSLT is more work and requires more
expertise than the simple template file.

-- 
Bruno Dumon http://outerthought.org/
Outerthought - Open Source, Java  XML Competence Support Center
[EMAIL PROTECTED]  [EMAIL PROTECTED]


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



svg and cocoon in debug mode

2004-02-11 Thread Jorg Heymans
Has anyone succeeded in running cocoon in debug mode while rendering 
svg's? Tomcat crashes instantly without any errormessage (windows XP) on 
my install so i can always only use one or the other, annoying!

Jorg

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


Re: URGENT: Cocoon+FO Project needs a new owner

2004-02-11 Thread Matthias Schäfer
Phil Blake wrote:
Hi Everyone,

I started a paid project for a friend and have been so snowed under with 
work that I can't complete it in a reasonable time.

Anyone interested in a cocoon 2.1 FoxPro/ESQL/FO PDF publishing project, 
contact me asap for complete details. The project is 90% complete.

It's a great job, and if you're interested it will most likely lead to 
other similar projects.

Thanks for your time.

Phil
PS Good handle on FO and PDF essential.


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

Hello Phil,

currently I am working on a Project wich uses Cocoon to add PDF-Printing 
with FOP to a JSP-Application.
Maybe I can help you. So please give me more Details...

Matthias



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


Re: AW: Special chars problem

2004-02-11 Thread Jan Hoskens
I did change the file web.xml:

-web.xml snip-
init-param
  param-namecontainer-encoding/param-name
  param-valueISO-8859-1/param-value
/init-param

init-param
  param-nameform-encoding/param-name
  param-valueutf-8/param-value
/init-param
-snip-

But if I look at the logs I get:
-core.log snip-
REQUEST: /test/AYG%C3%9CL.html

CONTEXT PATH:
SERVLET PATH: /test/AYGÃ?L.html
-snip-

And in my flowscript I print my parameters that were passed with my function
call:

-flow.log snip-
parameter dataSrc before conversion= test/AYGÃ?L.xml-  that's what
I get by retreiving the parameter
parameter dataSrc after conversion: dataSrc=test/AYGÜL.xml- after my
own conversion from iso-8859-1 to utf-8
-snip-

I'm using cocoon 2.1 cvs head updated last 2/2/2004, running with jetty.

Jan

- Original Message - 
From: Bruno Dumon [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, February 11, 2004 9:47 AM
Subject: Re: AW: Special chars problem


 On Wed, 2004-02-11 at 08:59, Jan Hoskens wrote:
  After searching the archives, I found some stuff about the encoding in
  cocoon. I tried changing the ISO-8859-1 to UTF-8 in the web.xml, but
that
  did not change the problem.
  (http://marc.theaimsgroup.com/?t=106760662600010r=1w=2)When I passed
the
  url, it still was in the wrong format 'A?'(String assuming Unicode
instead
  of UTF-8). I found a wiki page concerning encoding in cocoon at
  http://wiki.cocoondev.org/Wiki.jsp?page=RequestParameterEncoding. I
fixed my
  problem by applying a conversion to all parameters in my flow that may
  contain an incoming url. This conversion is also stated in the wiki
page:
  value = new String(value.getBytes(ISO-8859-1), UTF-8);So whenever
you're
  using parameters and passing something that's UTF-8, do that conversion
to
  avoid problems concerning the special chars.

 As explained on that wiki page, this conversion is exactly what Cocoon
 already does for you. If it does not work, it's likely because of a
 misconfiguration (except if there got some new bug in there, which I
 doubt).

 So in the web.xml, you put the container-encoding to ISO-8859-1 and the
 form-encoding to UTF-8?

 -- 
 Bruno Dumon http://outerthought.org/
 Outerthought - Open Source, Java  XML Competence Support Center
 [EMAIL PROTECTED]  [EMAIL PROTECTED]


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



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



Re: svg and cocoon in debug mode

2004-02-11 Thread Sylvain Wallez
Jorg Heymans wrote:

Has anyone succeeded in running cocoon in debug mode while rendering 
svg's? Tomcat crashes instantly without any errormessage (windows XP) 
on my install so i can always only use one or the other, annoying!


?? Not later than 2 days ago, I was in debugging the SVG serializer. But 
I'm using Jetty...

Sylvain

--
Sylvain Wallez  Anyware Technologies
http://www.apache.org/~sylvain   http://www.anyware-tech.com
{ XML, Java, Cocoon, OpenSource }*{ Training, Consulting, Projects }
Orixo, the opensource XML business alliance  -  http://www.orixo.com


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


generator and request attribute

2004-02-11 Thread Roman Hrivik

Hi

I have custom generator where I set to request.attribute any value
via
ObjectModelHelper.getRequest(objectModel).getAttribute(RESULT_KEY)

next in the sitemap I want there request attribute selector
to decide what transformer to use
this attribute is setted before any sax events generated.

but it seems from my logs that selector is executed before I set attribute
to request in generator.

Do you have any hints how to solve this problem?
My generator generate 2 diffrent XML depends of some logic behind.

Is it possible to do it some way?
Or should I better write transformer behind generator.

my sitemap looks like this:

map:match pattern=mycustom.xml
map:generate type=mygen
... map:parameters there ...
... before any events are generated
the request attribute is setted in generator
/map:generate
map:select type=mygenrequestresult
map:when test=exception
map:serialize type=xml/
/map:when
map:otherwise
map:transform src=styles/anytransf.xslt/
map:transform type=i18n/
map:serialize type=xml/
/map:otherwise
/map:select
/map:match


Thanks

Roman







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



actions parameter levels

2004-02-11 Thread Jorg Heymans
Below sitemap snippet just seems so counter-intuitive that i thought 
i'ld share it.

map:match pattern=*.*
  map:act type=resource-exists
map:parameter name=url value=file://{1}.{2}/
map:aggregate element=aggregation label=debug1
map:part src=file://{../1}.{../2}/
map:part src=cocoon:/{../1}/
/map:aggregate
..
The url action parameter does not need the extra {../} while the ones 
inside the aggregation do! (note that aggregation can be replaced by 
plain transformers etc)

I guess the reason is that the src parameter belongs to the action level 
itself.

Admit, this looks strange (and had me going for a few minutes!)

Jorg

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


Sendmail logicsheet internationalization

2004-02-11 Thread Philippe Guillard
Hi,
I've got a problem to internationalize my sendmail :

I use a Woody form, then XSP logicsheet as in the sendmail sample, where
i get the values entered by woody and add some text that i need to be
internationalized to compose the body of the mail. I can't use i18n
transformer as the mail seems to be sent during the XSP generation. 

Then i planned to do some logic with if statements on the locale. Below
is what i plan to do but i can't get the locale value...I'm thinking
also about doing this in flow.

Any suggestion or method is welcomed !

Phil

--

xsp:logic
  // (THIS IS NOT CORRECT)  getLocale(locale);
  if (locale = en_US) {
  String bodymessage = Message.in any language;
  }
}
else {
  String bodymessage = Message in English;
}

/xsp:logic

  sendmail:send-mail

sendmail:bodyxsp:exprbodymessage/xsp:exprxsp-request:get-parameter 
name=This_coming_from_woody template//sendmail:body

   /sendmail:send-mail


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



Strange: BlobSource cannot access Datasource

2004-02-11 Thread [EMAIL PROTECTED]


	Hello All,

	Please, help, because I'm really out of ideas here.. The thing is,
when I try to use a blob: protocol (from the BlobSource component), I
keep getting an

	Exception during source resolving.:
org.apache.excalibur.source.SourceException: Cannot get datasource
'DBGES'

	At first I thought there was something wrong with the datasource
definition, but if I use the DBGES pool in a XSP serverpage, or in a
SQL transformer, it works flawlessly, so the datasource definition is
correct.

	In my previous project it worked flawlessly.. Does anybody know
what may i be doing wrong?

	Thanks all,

	Nacho Jimenez




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



Re: SQL Transformer generates illegal element names

2004-02-11 Thread Askild Aaberg Olsen
  recently I ran into a problem with SQL Transformer. The column names
  returned from the database are used for naming the children 
 of sql:row, 
  but those names can be something like count(distinct xxx) or 
  'SYS$', which violates the wellformed conditions of the 
 return document.
  
 alias your columns as a temporary workaround?
 ie select sysdate-1 as mydate from dual;
 I know oracle can do this , dunno about other databases.

This is a standard SQL-feature, that should work in any SQL-compliant
database (at least I know it works in MSSQL and DB2 also).
But I guess that the problem is that Johann lets the user enter SQL
directly, loosing control of whats submitted to the DB.
(which seems like a huge security risk, but I guess that this is adressed
elsewhere in the application...)

Johann - if you are brave ;) - you could use XSLT to parse the submitted
SQL, and then extend the SELECT-clause with aliases?

Askild
-


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



How can I make IE display html in auto encoding utf-8?

2004-02-11 Thread

Hi,all: I want to use Chinese chacter in the page and don't want it to be encoded as someting like #8983.So I change configurations in web.xml: init-param param-namecontainer-encoding/param-name param-valueutf-8/param-value /init-param
 init-param param-nameform-encoding/param-name param-valueutf-8/param-value /init-param and I also change HTMLSerializer config in root sitemap. map:serializer logger="sitemap.serializer.html" mime-type="text/html" name="html" pool-grow="4" pool-max="32" pool-min="4" src=""
 encodingutf-8/encoding /map:serializer
Now I can see Chinese in the page,but IE still auto encode it with iso-8859-1,I must change the encoding to "unicode" manully.How can I make IE auto select encoding in "unicode"?the html generated list here:htmlheadMETA http-equiv="Content-Type" content="text/html; charset=utf-8"
Thanks in advance.

roy huangguangzhou guangdong China.
[EMAIL PROTECTED]or [EMAIL PROTECTED]   MSN Messenger   

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



Re: SQL Transformer generates illegal element names

2004-02-11 Thread Jorg Heymans
snipped
This is a standard SQL-feature, that should work in any SQL-compliant
database (at least I know it works in MSSQL and DB2 also).
But I guess that the problem is that Johann lets the user enter SQL
directly, loosing control of whats submitted to the DB.
(which seems like a huge security risk, but I guess that this is adressed
elsewhere in the application...)
Johann - if you are brave ;) - you could use XSLT to parse the submitted
SQL, and then extend the SELECT-clause with aliases?
:) indeed he would need to be pretty darn brave to parse a SQL statement 
using XSLT.

Less braveness though required with antlr, i'm sure there are few SQL92 
grammars around that suit his needs.

Alternatively there are various opensource java relational databases 
around, they must have already done the hard work.

Askild
Jorg

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


[Woody] Validation with function show

2004-02-11 Thread Mike Teichman
Hi all,
I'm trying to use validation with Woody. In order to do that, there is a  
function show([String] uri, [Function] validator) called on the Form Object. 
Although there is an example with this function, how can I warn the user 
with a message in case of violation?

In which way do I have to use that function?

Thanks.

_
Check out the great features of the new MSN 9 Dial-up, with the MSN Dial-up 
Accelerator. http://click.atdmt.com/AVE/go/onm00200361ave/direct/01/

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


Re: SQL Transformer generates illegal element names

2004-02-11 Thread Askild Aaberg Olsen
  This is a standard SQL-feature, that should work in any 
 SQL-compliant 
  database (at least I know it works in MSSQL and DB2 also). 
 But I guess 
  that the problem is that Johann lets the user enter SQL directly, 
  loosing control of whats submitted to the DB. (which seems 
 like a huge 
  security risk, but I guess that this is adressed elsewhere in the 
  application...)
  
  Johann - if you are brave ;) - you could use XSLT to parse the 
  submitted SQL, and then extend the SELECT-clause with aliases?
 :) indeed he would need to be pretty darn brave to parse a 
 SQL statement 
 using XSLT.
 
 Less braveness though required with antlr, i'm sure there are 
 few SQL92 
 grammars around that suit his needs.
 
 Alternatively there are various opensource java relational databases 
 around, they must have already done the hard work.

 Jorg

Not necessarily, since you don't have to parse the entire SQL-grammar (that
would have been stupid in XSLT, not brave... ;)
This is a simplified, untested template-match that could do the trick:

xsl:template match=sql:query
xsl:copy
xsl:copy-of select=@*/
!-- ensure CASE on keywords --
xsl:variable name=sql select=translate(., 'fromselect' ,
'FROMSELECT')/
xsl:textSELECT/xsl:text
!-- Go trough every select column --
xsl:for-each
select=str:tokenize(substring-before(substring-after($sql, 'SELECT'),
'FROM'),',')
xsl:value-of select=./
!-- Check if it contains illegal characters for
XML-names --
xsl:if test=string-length(translate(.,'all
characters not allowed in XML NCNAME')) != string-length(.)
!-- If so, set the column name to x1, x2,
etc. --
xsl:text AS x/xsl:text
xsl:value-of select=position()/
/xsl:if
xsl:if test=position() != last(),/xsl:if
/xsl:for-each
!-- Output  the rest of the SQL --
xsl:text FROM/xsl:text
xsl:value-of select=substring-after($sql, 'FROM')/
/xsl:copy
/xsl:template

Askild


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



Re: component pooling in cocoon

2004-02-11 Thread Olivier Billard
Hi Daniel,

Just in case, don't forget your component must inherit the avalon Poolable interface.

for your questions, see below :

On 10/02/2004 07:49, Daniel von Aesch wrote:

Hi,

Can someone explain me how the component pooling in cocoon exactly works ? I
am new to cocoon and unfortunately I was not able to find out from the
cocoon and avalon docs how the pooling of components works.
1. Are there pool-min instances created at startup ?
Yes, pool-min is the number of components instanciated at the cocoon startup.
more info :
http://avalon.apache.org/excalibur/api/org/apache/avalon/excalibur/pool/Poolable.html
2. If 1 is true - what could be wrong if there are not pool-min instances
created at startup ?
Not sure, but I presume no objects are instanciated at cocoon startup

3. We saw that even with pool-min and pool-grow, the system did not
behaviour as exptected. It did not instantiate pool-min components and if a new
component was requested there was exactly 1 new component instantiated (instead of
pool-grow).
Maybe your component didn't inherited the Poolable interface...

--
Olivier BILLARD
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: JXTemplate Status

2004-02-11 Thread Alan
* Joerg Heinicke [EMAIL PROTECTED] [2004-02-11 00:06]:
 On 10.02.2004 20:41, Alan wrote:
 
 Actually I think Woody was not designed to be used with Flow.  Joerg 
 used the word propagated, and that seems right.  When Flow was 
 introduced, Woody was brought forward to play together with it ??well, 
 the WoodyTemplateTransformer, anyway! 
 
 
 I can't find a definition of propagated that fits that sentence.
 
 http://www.m-w.com/cgi-bin/dictionary?va=propagated
 
 Er, extend maybe, but propagetion is really something rabbits do.
 
 Propagate should means publicize, maybe propagandize is more in use, or 
 announce, or ...
 
 http://dict.tu-chemnitz.de/dings.cgi?o=3001;count=50;dlink=self;service=de-en;query=propagieren

Definition 3b in the http://m-w.com/ entry does fit your sentence.

Propagate is pretty tightly bound to perpetuate, pass on,
continue, like in propagtion of execptions.

Propagandize is the better verb to evoke politics. Publicize is
a straight-foward way to say it.

When its time for me to talk about my software, however, I don't
publicize, I proselyzize:

http://www.m-w.com/cgi-bin/dictionary?va=proselytize 

Thanks for the dictionary link, one of my New Years Resolutions is
to learn German.

We now return to or regularly scheduled programme (maybe).

-- 
Alan / [EMAIL PROTECTED] / http://engrm.com/

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



upload dir cleared at Cocoon startup

2004-02-11 Thread Bert Van Kets
Hi all,
I have a very annoying problem regarding uploads.
To be able to do multi part uploads I went to web.xml and set the
enable-uploads init-param to true and the upload-directory to data (no
quotes of course). As I need ony one upload directory, it looked like the
obvious choice to me to have Cocoon handle the uploads.

Since I set these parameters, my upload directory is cleared totally when I
restart Tomcat. This is totally unusable of course. It worked perfectly in
an older version of Cocoon, but with a very recent CVS HEAD the upload dir
is cleared.
I have looked all over the web.xml file, but can't see any indication of
this being settable.

I'm not talking about uploading a file and processing it. The whole
directory is cleared at Cocoon startup.

Any ideas? I can't find any mention of it anywhere.

Bert



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



RE: Embedded JavaScript file inside dynamic SVG isn't working

2004-02-11 Thread Gautam Ganguly
hi Robby ,
   Thanks for that that worked.I ahd tried that logic earlier for
including the
script code inside the svg file itself but that didnot seem to work.Now
when i looked your example here..i changed the script type from
text/ecmascript to text/javascript,it started working.Thanks a lot
for that.Even though the svg gets a lot bigger given the fact that i
would put all the logic inside it,but i i will check into the fact as to
why the sitemap can't find the javascript file from inside the generated
svg.I will keep you all informed on that.
  ..and thanks to you too Steve,for your time and your help.

  As always thanks to all those who always seem to somehow make a dumb
person like me, look a little bit intelligent in his own world!!!

regards,
Gautam

 [EMAIL PROTECTED] 02/11/04 02:32AM 
Hi Steve and Gautam,

you can try the following to see if your code works at all   I did
embed
the scripting and CSS in the stylesheet, because I wanted a quick
solution
and hadn't any knowledge of how to use the sitemap. 


xsl:stylesheet xmlns:xlink=http://www.w3.org/1999/xlink;
xmlns:xsl=http://www.w3.org/1999/XSL/Transform; version=1.0
  xsl:template match=/   
svg xmlns:svg=http://www.w3.org/2000/svg; width=1000
heigth=120  
  script language=JavaScript type=text/javascript
![CDATA[  
  //
  // Declare Global Variables //
  //
  var SVGDoc = null

  // Make sure we're using the correct SVG object on the page
  //   - there can be more than 1 sourced element
  //
  function getObj(mouseEvent) {
SVGDoc = mouseEvent.getTarget().getOwnerDocument()
  }

  
  // SVG Manipulation Functions //
  

  // change the fill color of an element
  function elemColor(mouseEvent, elemName, value) {
// get the proper SVG object
getObj(mouseEvent)

// check for AI converted spaces
elemName = spaceTrans(elemName)

// get the element we want to change
  var thisElem =
SVGDoc.getElementById(elemName).getStyle()

// perform the fill color change
  thisElem.setProperty('fill', value)
  }

  // change the stroke width of an element
  function elemStrokeWidth(mouseEvent, elemName, value) {
// get the proper SVG object
getObj(mouseEvent)

// check for AI converted spaces
elemName = spaceTrans(elemName)

// get the element we want to change
var thisElem =
SVGDoc.getElementById(elemName).getStyle()

// perform the stroke width change
thisElem.setProperty('stroke-width', value)
  }

  // change the stroke color of an element
  function elemStrokeColor(mouseEvent, elemName, value) {
  // get the proper SVG object
  getObj(mouseEvent)

  // check for AI converted spaces
  elemName = spaceTrans(elemName)

  // get the element we want to change
  var thisElem =
SVGDoc.getElementById(elemName).getStyle()

  // perform the stroke color change
  thisElem.setProperty('stroke', value)
  }

  // show an element - note: these work with the display
property,
not visibility
  function elemShow(mouseEvent, elemName) {
  // get the proper SVG object
  getObj(mouseEvent)

  // check for AI converted spaces
  elemName = spaceTrans(elemName)

  // get the element we want to change
  var thisElem =
SVGDoc.getElementById(elemName).getStyle()

  // make the element visible
  thisElem.setProperty('display', 'inline')
  }

  // hide an element - note: these work with the display
property,
not visibility
  function elemHide(mouseEvent, elemName) {
  // get the proper SVG object
  getObj(mouseEvent)

  // check for AI converted spaces
  elemName = spaceTrans(elemName)

  // get the element we want to change
  var thisElem =
SVGDoc.getElementById(elemName).getStyle()

  // hide the element
  thisElem.setProperty('display', 'none')
  }

  // translate spaces into equivalent AI exported space string
  function spaceTrans(stringIn) {
  var result = 
  for (var i = 0; i  stringIn.length; i++) {
  if (stringIn.charAt(i) ==  ) {

Calling sendmail action from flowscript

2004-02-11 Thread Robert Clarke
Hi,
I'm using cocoon 2.1.3 and would like to call sendmail from flowscript. I
have a working sendmail action in my sitemap. However, when I try to use the
act function in my flow I get:

TypeError: act is not a function

Which suggests there's a resource that I should be including. I'm going
round in circles trying to work out what that thing is.

Any pointers regarding my no doubt simple mistake would be a huge help.

Please help, my project is nearly finished!

Thanks,
Rob

#
Robert Clarke
 
Web Systems Developer
Bradford College
 

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



RE: Question: auth-fw, roles, authorisation file format

2004-02-11 Thread Ralph Goers
The authentication framework doesn't do anything with Roles. It is rather
confusing that they are included in the framework documentation, but the
examples come from the Cocoon Portal which does make use of the roles.
However, you don't really need any other components. You can use the
ParameterSelector to direct your pipeline based upon whatever roles the user
may have.

Ralhp

 -Original Message-
 From: Andrei Lunjov [mailto:[EMAIL PROTECTED]
 Sent: Wednesday, February 11, 2004 12:49 AM
 To: [EMAIL PROTECTED]
 Subject: Question: auth-fw, roles, authorisation file format
 
 
 Hello,
 
 I tried to find details in docs and samples, but seems I am 
 quite stupid 
 :) Possibly I missed something improtant? I am currently developing 
 kind of skeleton and guidelines for quite large application 
 to be used 
 for long time - so I want to make things as standard as possible.
 
 Questions are about roles and authorisation/access delimeting.
 I understood well (ok, I hope :) ) how authentication works. 
 But what is 
   with authorisation?
 
 Suppose I have some number of roles in authentication xml produced by 
 authentication resource like described here 
 http://cocoon.apache.org/2.1/developing/webapps/authentication.html
 Is there any standart mechanism to allow access for 
 particular resources 
 / sitemap parts depending upon roles user has? Something like 
 RoleMatcher?
 
 Another question is about authentication xml format - same doc says 
 quite foggy about multiple roles.
 would this be correct? :
 
 authentication
  IDUnique ID of the user in the system/ID
   roles
   rolerolename1/role
   rolerolename2/role
   /roles
  data
  Any additional optional information can be supplied here.
  This will be stored in the session for later retrieval
  /data
 /authentication
 
 
 
 Any info appreciated.
 
 
 Andrei Lunyov
 

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



Re: Calling sendmail action from flowscript

2004-02-11 Thread Jan Hoskens
What you're saying suggests that you're calling the function act() that does
not exist in your flowscript. Maybe you have to call it through the cocoon
object: cocoon.act(), as with the sendpage and other's(as on the wiki page:
http://wiki.cocoondev.org/Wiki.jsp?page=Flow)

Hope this helps,
Greetz,
Jan

- Original Message - 
From: Robert Clarke [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, February 11, 2004 4:40 PM
Subject: Calling sendmail action from flowscript


 Hi,
 I'm using cocoon 2.1.3 and would like to call sendmail from flowscript. I
 have a working sendmail action in my sitemap. However, when I try to use
the
 act function in my flow I get:

 TypeError: act is not a function

 Which suggests there's a resource that I should be including. I'm going
 round in circles trying to work out what that thing is.

 Any pointers regarding my no doubt simple mistake would be a huge help.

 Please help, my project is nearly finished!

 Thanks,
 Rob

 #
 Robert Clarke

 Web Systems Developer
 Bradford College


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



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



Error Handling exception

2004-02-11 Thread Lionel Crine
I need more explanation about the exception.

in this page : 
http://cocoon.apache.org/2.1/userdocs/concepts/errorhandling.html

There is this example which interested but it's not working because 
class=SAXException does not exists.

map:selector name=exception 
src=org.apache.cocoon.selection.ExceptionSelector
exception name=processing class=ProcessingException 
unroll=true/
exception name=sax class=SAXException/
exception name=application class=ApplicationException/
/map:selector
...
map:pipeline
map:match pattern=resource
...
/map:match
map:handle-errors
map:select type=exception
map:when test=processing.../map:when
map:when test=sax.../map:when
map:when test=application.../map:when
/map:select
/map:handle-errors
/map:pipeline



I'm interesting in catching the SAXException, has someone already done that ?

Thanks a lot.
Lionel
Lionel CRINE
Ingénieur Systèmes documentaires
Société : 4DConcept
22 rue Etienne de Jouy 78353 JOUY EN JOSAS
Tel : 01.34.58.70.70 Fax : 01.39.58.70.70
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: Error Handling exception

2004-02-11 Thread Mark Lundquist
On Feb 11, 2004, at 8:04 AM, Lionel Crine wrote:

I need more explanation about the exception.

in this page : 
http://cocoon.apache.org/2.1/userdocs/concepts/errorhandling.html

There is this example which interested but it's not working because 
class=SAXException does not exists.

map:selector name=exception 
src=org.apache.cocoon.selection.ExceptionSelector
exception name=processing class=ProcessingException 
unroll=true/
exception name=sax class=SAXException/
Try org.xml.sax.SAXException

~ml

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


Re: WoodyTemplateTransformer vs. WoodyGenerator

2004-02-11 Thread Mark Lundquist
On Feb 11, 2004, at 1:13 AM, Bruno Dumon wrote:

On Tue, 2004-02-10 at 03:17, Mark Lundquist wrote:
This is where I got stuck  I could create and display a form
usingflow and display it using the generator (and my stylesheet), but
thenfor flow you have to encode that continuation ID into the
formaction=... somehow, and there's no way to do it!
I don't have time to read this whole thread, but my eyes jus fell on
this.
You can provide the continuation ID to your XSL using a parameter in 
the
sitemap. There's an inputmodule with which you can get it (though it's
only in CVS and still in scratchpad).
ah right... FlowContinuationModule... good.

I don't think it's the role of the WoodyGenerator to supply you with 
the
continuation ID.
I agree.

There have been updates to the WoodyGenerator, with latest CVS the
lookup of the form works similary as with the template transformer
(IIUC).
Very nice!

 (won't help you for the case with the multiple forms on one page
though).
Sure... understood.

As far as the whole template vs generator debate is concerned, just use
what fits your case best. If your forms are pretty generic and always
follow the same layout, you're probably better of with the generator.
Yes, that's how it should be.

Thanks for the info!
~ml
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: Need some help w/ Woody Template

2004-02-11 Thread Mark Lundquist
On Feb 11, 2004, at 12:54 AM, Bruno Dumon wrote:

That's because the request is an object that lives only for the 
duration
of one request. Thus if you put something in a request attribute, it
only remains there for the current request.
OK I figured that's what must be going on.

I'm new to Cocoon continuations and I had a bad think goin'.  I thought 
well, the request is part of the flow context, and a continuation 
ought to close over the entire context including the request.  But of 
course not... it's not that there's one request that gets suspended and 
resumed, it's that you have one request that inaugurates the flow, and 
another request(s) that resume it.  Yeah I get it :-)

The whole woody-flowscript integration is quite focussed on displaying
one form at a time, so you're a bit on your own if you want to display
multiple forms... (not that it's impossible, but you'll have to write
some more code by your own.
Right, I kind  of saw that coming :-)  I figure all the pieces are 
there in woody2.js, I'll just have to put them together differently.

thx-a-lot,
~ml
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Excel Spreadsheet Generator|Transformer

2004-02-11 Thread Daniel McOrmond
Is there are Generator|Transformer that produces xml from an excel
document? Perhaps something utilizing Jakarta POI-HSSF?
-Daniel



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


Re: Excel Spreadsheet Generator|Transformer

2004-02-11 Thread Dave Kavanagh
There wasn't when I looked, so I made the HSSFTransformer (that membership 
uses).

David

Quoting Daniel McOrmond [EMAIL PROTECTED]:

 Is there are Generator|Transformer that produces xml from an excel
 document? Perhaps something utilizing Jakarta POI-HSSF?
 
 -Daniel
 
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 



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



Access random input from an xsp

2004-02-11 Thread Lionel Crine
Hi,

I try to access to the input module RandomNumberModule and it works fine.
But I try to define the max and min, how can I do that ?
here is my line in my xsp input:get-attribute name=random module=random/

Lionel

Lionel CRINE
Ingénieur Systèmes documentaires
Société : 4DConcept
22 rue Etienne de Jouy 78353 JOUY EN JOSAS
Tel : 01.34.58.70.70 Fax : 01.39.58.70.70
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: Error Handling exception

2004-02-11 Thread Lionel Crine
It's not working.



At 08:18 11/02/2004 -0800, you wrote:

On Feb 11, 2004, at 8:04 AM, Lionel Crine wrote:

I need more explanation about the exception.

in this page : 
http://cocoon.apache.org/2.1/userdocs/concepts/errorhandling.html

There is this example which interested but it's not working because 
class=SAXException does not exists.

map:selector name=exception 
src=org.apache.cocoon.selection.ExceptionSelector
exception name=processing class=ProcessingException 
unroll=true/
exception name=sax class=SAXException/
Try org.xml.sax.SAXException

~ml

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
Lionel CRINE
Ingénieur Systèmes documentaires
Société : 4DConcept
22 rue Etienne de Jouy 78353 JOUY EN JOSAS
Tel : 01.34.58.70.70 Fax : 01.39.58.70.70
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: Excel Spreadsheet Generator|Transformer

2004-02-11 Thread Dave Kavanagh
Whoops! I meant to reply to Daniel directly. FWIW, I could supply my 
transformer to the list (minus a project specific block of code). Anyone else 
need something like this? We've found it quite usefull. It takes some config 
XML as input to tell it how to process the Excel file (it gets from a multipart 
upload).

David

Quoting Dave Kavanagh [EMAIL PROTECTED]:

 There wasn't when I looked, so I made the HSSFTransformer (that membership 
 uses).
 
 David
 
 Quoting Daniel McOrmond [EMAIL PROTECTED]:
 
  Is there are Generator|Transformer that produces xml from an excel
  document? Perhaps something utilizing Jakarta POI-HSSF?
  
  -Daniel
  
  
  
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
  
 
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 



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



Re: Excel Spreadsheet Generator|Transformer

2004-02-11 Thread Derek Hohls
I think it would be useful for many of us;
maybe the comitters can add it to the scratch
area of Cocoon?

D Hohls
Environmental Systems Developer
CSIR Environmentek
PO Box 17001
Kwa-Zulu Natal
South Africa
4013
www.csir.co.za

 [EMAIL PROTECTED] 02/11/04 7:16 PM 
Whoops! I meant to reply to Daniel directly. FWIW, I could supply my 
transformer to the list (minus a project specific block of code). Anyone
else 
need something like this? We've found it quite usefull. It takes some
config 
XML as input to tell it how to process the Excel file (it gets from a
multipart 
upload).

David

Quoting Dave Kavanagh [EMAIL PROTECTED]:

 There wasn't when I looked, so I made the HSSFTransformer (that
membership 
 uses).
 
 David
 
 Quoting Daniel McOrmond [EMAIL PROTECTED]:
 
  Is there are Generator|Transformer that produces xml from an excel
  document? Perhaps something utilizing Jakarta POI-HSSF?
  
  -Daniel
  
  
  
 
-
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
  
 
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 



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



-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
MailScanner thanks transtec Computers for their support.


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



Excel Spreadsheet Generator|Transformer

2004-02-11 Thread Daniel McOrmond
Is there are Generator|Transformer that produces xml from an excel 
document? Perhaps something utilizing Jakarta POI-HSSF?

-Daniel

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


Re: Cocoon and soap

2004-02-11 Thread Anna Bikkina
Hi,

Thanks for the reply. I have one problem using the xml file to transform. 
Below is my code where I call the soapserver that returns a xml file . Here 
soap-result should contain my xml file.

When I tried to get the new xsl in the stylesheets I am getting an error
The element type META must be terminated by the matching end-tag /META.
and I do not have META any where. Can anyone please tell me what I am doing 
wrong here.

 xscript:variable name=soap-result
  soap:call url=http://localhost:8080/axis/services/HelloAxis;
ns1:sayHello xmlns:ns1=urn:HelloAxis
  soap:enc/
  symbol xsi:type=xsd:string xmlns:xsi=http:// 
 
www.w3.org/1999/XMLSchema-instance xmlns:xsd=/
ns1:sayHello
  /soap:call
/xscript:variable

xscript:variable name=stylesheet
  href=stylesheets/soap-hello.xsl/

xscript:transform name=soap-result stylesheet=stylesheet/


Thanks,
Anna.


On Tuesday 10 February 2004 05:04 pm, Alten, Jelle Paul wrote:
 Hi Anna,

 Well, what I'd try: you can make a pipeline that calls the soap server,
 transform the result into html and serialize it...

 for example:
 make a pipeline like this:

  map:generate
 src=http://www.soapserver.com/soaprequest?reqarg=argvalue/
  map:transform src=transforms/soap2html.xsl
  map:serialize/


 where the generate src should point to your soapserver with the right
 request
 and the soap2html.xsl in the transforms directory would be somethink like
 the following transformation (I just hacked it up for you, hope it shows
 what you can do.

 greetings,

 Jelle

 -- transforms/soap2html.xsl  --


 ?xml version=1.0 encoding=UTF-8?
 xsl:stylesheet version=1.0
 xmlns:xsl=http://www.w3.org/1999/XSL/Transform;
 xmlns:fo=http://www.w3.org/1999/XSL/Format;

 xsl:template match=/
   html
   head
   titleSOAP Message/title
   style type=text/css
   code {color: #808080;}
   /style
   /head
   body
   table border=1
   xsl:for-each select=*
   tr
   thxsl:value-of
 select=name()//th
   tdxsl:apply-templates
 select=. mode=value//td
   /tr
   /xsl:for-each
   /table
   /body
   /html
 /xsl:template

 xsl:template match=*[not(*) and count(text())=1]
   tr
   thxsl:value-of select=name()//th
   tdxsl:value-of select=.//td
   /tr
 /xsl:template

 xsl:template match=*
   tr
   td colspan=2
   xsl:for-each select=@*
   xsl:if test=position()1br//xsl:if
   codexsl:value-of
 select=name()/=xsl:value-of select=.//code
   /xsl:for-each
   /td
   /tr
   xsl:for-each select=*
   tr
   thxsl:value-of select=name()//th
   tdxsl:apply-templates select=.
 mode=value//td
   /tr
   /xsl:for-each

 /xsl:template

 xsl:template match=*[*] mode=value
   table border=1xsl:apply-templates select=.//table
 /xsl:template


 /xsl:stylesheet




 -- end of file --





 -Oorspronkelijk bericht-
 Van: Anna Bikkina [mailto:[EMAIL PROTECTED]
 Verzonden: dinsdag 10 februari 2004 21:47
 Aan: [EMAIL PROTECTED]
 Onderwerp: Cocoon and soap


 Hi all,

 I am trying to write a cocoon page which talks to a soap server . The soap
 envelope  has an xml file. I have to display this xml file as html using
 cocoon. Can anyone tell me how I can do that in cocoon. Below is my soap
 envelope.

 -soapenv:Envelope
   +soapenv:Body
   +ns1:sayHelloResponse
 soapenv:encodingStyle=http://schemas.xmlsoap.org/
 soap/encoding/
   ns1:sayHelloReturn href=#id0/
   /ns1:sayHelloResponse
   +multiRef id=id0 soapenc:root=0
 soapenv:encodingStyle=http://

 schemas.xmlsoap.org/soap/encoding/ xsi:type=ns2:Document
   -slideshow title=SampleSlide Show
   -slide
   titleOverview/title
   itemn1/item
   /slide
   -slide
   titleIntroduction/title
   itemcheck this out/item
   /slide
   /slideshow
   /multiRef
   /soapenv:Body
 /soapenv:Envelope

 Thanks in advance,
 Anna.


 -
 To unsubscribe, 

Re: upload dir cleared at Cocoon startup

2004-02-11 Thread Bert Van Kets
Doesn't anybody have an idea on this one.
This is just a bump back up the list.

Bert
- Original Message - 
From: Bert Van Kets [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, February 11, 2004 4:02 PM
Subject: upload dir cleared at Cocoon startup


 Hi all,
 I have a very annoying problem regarding uploads.
 To be able to do multi part uploads I went to web.xml and set the
 enable-uploads init-param to true and the upload-directory to data (no
 quotes of course). As I need ony one upload directory, it looked like the
 obvious choice to me to have Cocoon handle the uploads.

 Since I set these parameters, my upload directory is cleared totally when
I
 restart Tomcat. This is totally unusable of course. It worked perfectly in
 an older version of Cocoon, but with a very recent CVS HEAD the upload dir
 is cleared.
 I have looked all over the web.xml file, but can't see any indication of
 this being settable.

 I'm not talking about uploading a file and processing it. The whole
 directory is cleared at Cocoon startup.

 Any ideas? I can't find any mention of it anywhere.

 Bert



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





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



Re: Excel Spreadsheet Generator|Transformer

2004-02-11 Thread JD Daniels
Yes!!

I was just about to start something like it. :)

JD

Derek Hohls wrote:

I think it would be useful for many of us;
maybe the comitters can add it to the scratch
area of Cocoon?
D Hohls
Environmental Systems Developer
CSIR Environmentek
PO Box 17001
Kwa-Zulu Natal
South Africa
4013
www.csir.co.za

[EMAIL PROTECTED] 02/11/04 7:16 PM 
Whoops! I meant to reply to Daniel directly. FWIW, I could supply my 
transformer to the list (minus a project specific block of code). Anyone
else 
need something like this? We've found it quite usefull. It takes some
config 
XML as input to tell it how to process the Excel file (it gets from a
multipart 
upload).

David

Quoting Dave Kavanagh [EMAIL PROTECTED]:


There wasn't when I looked, so I made the HSSFTransformer (that
membership 

uses).

David

Quoting Daniel McOrmond [EMAIL PROTECTED]:


Is there are Generator|Transformer that produces xml from an excel
document? Perhaps something utilizing Jakarta POI-HSSF?
-Daniel




-

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


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




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


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


Re: upload dir cleared at Cocoon startup

2004-02-11 Thread Askild Aaberg Olsen
 Doesn't anybody have an idea on this one.
 This is just a bump back up the list.

http://marc.theaimsgroup.com/?l=xml-cocoon-usersm=107626758900778w=2

Read Geoff's second paragraph. Maybe this is the reason?

Askild


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



Re: Windows/Tomcat/Cocoon Installation --htm attached.

2004-02-11 Thread Nicolas Toper
This is a great idea!!! Actually I've spent 2 days
figuring out how to do it (eventually I installed
Linux=)
 --- Jim Bloggs [EMAIL PROTECTED] a écrit : 
Greetings!
 
 I don't know whether this will be of any use, but I
 made out a how-to for
 installing Cocoon 2.1.3 on Tomcat 5.0.18 on Windows
 2000 with
 j2sdk1.4.2_01.
 
 I thought it just might be useful but, if not, my
 apologies for wasting
 your time and you can just ignore this email. It may
 also not be the best
 way of doing things, but at least it seemed to work
 for me. Hope it
 helps.
 
 Many thanks.
 
 best, Jim
 
 -- 
 http://www.fastmail.fm - Same, same, but different…
 
-
acronym {
text-transform:lowercase;font-variant:small-caps; } 
body { margin:3.0em }   p.note { border:1px solid
gray; width:80%; background-color:linen;
padding:0.2em; visibility:visible; margin:1.0em; }  
Windows/Tomcat/Cocoon Installation  Tomcat
5.0.18/Cocoon 2.1.3 on Windows 2000 with j2sdk1.4.2_01

Installing Tomcat and Cocoon is easy if you know how,
but can be complicated if you don't. As I went through
it, I promised myself I would make notes once I'd
finished. Outlined below are the steps I took to
install Cocoon 2.1.3 on Tomcat 5.0.18 on Windows 2000
with j2sdk1.4.2_01. I hope they help.

11 February 2004

The following assumes you have already installed
Sun's Java Development Kit (j2sdk1.4.2_01) in
directory c:\j2skd1.4.2_01. 

   Do this: Download the file called 5.0.18.zip from
the Tomcat 5.0.18 section near the bottom of the
Release Builds section: 
   
 http://jakarta.apache.org/site/binindex.cgi


Consider this: It may be possible to use the .exe or
Deployer files instead, but I used the zip.

   Do this: Extract everything to c:\ using Winzip,
which should create a directory called: 
c:\jakarta-tomcat-5.0.18   
 

Consider this: You can tell Winzip will create a
subdirectory by looking at the value in the path
column on the right hand side.

   Do this: Set the JAVA_HOME and CATALINA_HOME
environment variables.  
Right-click My Computer  Properties  
Advanced 
Environment variables...  System Variable pane,
New... etc.
 
JAVA_HOME  
 
c:\j2sdk1.4.2_01   
 
CATALINA_HOME  
 
c:\jakarta-tomcat-5.0.18   
   
  
Consider this: Environment variables can also be set
in a DOS box using DOS commands, but in that case,
they are only meaningful within and for the lifetime
of that DOS box.


   Do this: Test the server by running the batch file
provided.   
c:\jakarta-tomcat\bin\startup.bat  
 

Consider this: This is only one way of running the
server. A better way is to install it as a Windows
service.

   Do this: View the default installation screen. The
screen should be available when you see the message
INFO:Server startup in nms, by visiting:  
http://localhost:8080/ 
 

Consider this: Tomcat listens on port 8080 by default.
Apache listens on port 80 by default. Browsers
normally hit on port 80 unless told otherwise.

   Do this: Stop the server by running the batch file
provided.   
shutdown.bat
 

Re: upload dir cleared at Cocoon startup

2004-02-11 Thread Geoff Howard
Bert Van Kets wrote:

Hi all,
I have a very annoying problem regarding uploads.
To be able to do multi part uploads I went to web.xml and set the
enable-uploads init-param to true and the upload-directory to data (no
quotes of course). As I need ony one upload directory, it looked like the
obvious choice to me to have Cocoon handle the uploads.
Since I set these parameters, my upload directory is cleared totally when I
restart Tomcat. This is totally unusable of course. It worked perfectly in
an older version of Cocoon, but with a very recent CVS HEAD the upload dir
is cleared.
I have looked all over the web.xml file, but can't see any indication of
this being settable.
I'm not talking about uploading a file and processing it. The whole
directory is cleared at Cocoon startup.
Any ideas? I can't find any mention of it anywhere.
Not much time now, but:
1) Make sure you've read and understood the link provided in the 
response from Askild.  Sounds like knew that already though.
2) What was the older version of Cocoon approximately?  2.1.3? pre 
2.1.0?  2.0.x?
3) Where is your upload dir, and did you switch from tomcat to jetty?
4) If you stop the container (jetty, tomcat, etc.), place a file in the 
upload dir, start the container, check for the file  replace if 
missing, upload a file, check for both files  replace the original if 
missing (the uploaded file should not be there after the request 
finishes), stop the container, check for the original file what happens?

Geoff

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


Re: Excel Spreadsheet Generator|Transformer

2004-02-11 Thread Geoff Howard
Sure - submit a patch to bugzilla and we'll take a look at it.  Won't 
make it in 2.1.4 which now looks once again like it'll be this week, but 
 it'd be considered after that.

Geoff

JD Daniels wrote:

Yes!!

I was just about to start something like it. :)

JD

Derek Hohls wrote:

I think it would be useful for many of us;
maybe the comitters can add it to the scratch
area of Cocoon?
D Hohls
Environmental Systems Developer
CSIR Environmentek
PO Box 17001
Kwa-Zulu Natal
South Africa
4013
www.csir.co.za

[EMAIL PROTECTED] 02/11/04 7:16 PM 


Whoops! I meant to reply to Daniel directly. FWIW, I could supply my 
transformer to the list (minus a project specific block of code). Anyone
else need something like this? We've found it quite usefull. It takes 
some
config XML as input to tell it how to process the Excel file (it gets 
from a
multipart upload).

David

Quoting Dave Kavanagh [EMAIL PROTECTED]:


There wasn't when I looked, so I made the HSSFTransformer (that


membership

uses).

David

Quoting Daniel McOrmond [EMAIL PROTECTED]:


Is there are Generator|Transformer that produces xml from an excel
document? Perhaps something utilizing Jakarta POI-HSSF?
-Daniel


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


Re: Windows/Tomcat/Cocoon Installation --htm attached.

2004-02-11 Thread Michael Wolf
what about putting the info on the wiki-page?
So people don't have to keep this email and people not in this list can 
access the information too.

Michael

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


Re: AW: How to initialize a component coming from the pool?

2004-02-11 Thread Stephan Coboos
Olivier Billard wrote:

Hi Stefan,

I had the same pb, and I solved it the way Marco wrote, that is to say :

private field :
 - private Connection connection;
initialize (called once in the lifetime) :
 - get the datasource
dispose (called once in the lifetime);
 - release the datasource
recycle (called each time your component returns to the pool) :
 - close the connection and set it to null;
private getConnection() {
if (connection==null)
connection = datasource.getConnection();
return connection;
}
and each time you need a connection, use getConnection() to get it.

For me, it works good.


OK, I will try it.

Thank you.

Stephan

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


Re: Windows/Tomcat/Cocoon Installation --htm attached.

2004-02-11 Thread Geoff Howard
Michael Wolf wrote:
what about putting the info on the wiki-page?
So people don't have to keep this email and people not in this list can 
access the information too.
That'd be great, but there is very little here which is specific to your 
set up.  These same instructions should work for:
1) any recent tomcat
2) any jdk1.4
3) any cocoon release or cvs snapshot.
4) any windows environment (except probably 95, 98, maybe ME)

Sometimes specifying too much version specific information makes people 
feel that the instructions they need aren't present because they are 
using a slightly different version - in this case just not true.

Geoff



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


Re: Need some help w/ Woody Template

2004-02-11 Thread Sylvain Wallez
Mark Lundquist wrote:

On Feb 11, 2004, at 12:54 AM, Bruno Dumon wrote:

That's because the request is an object that lives only for the 
duration of one request. Thus if you put something in a request 
attribute, it only remains there for the current request.


OK  I figured that's what must be going on.

I'm new to Cocoon continuations and I had a bad think goin'.  I 
thought well, the request is part of the flow context, and a 
continuation ought to close over the entire context including the 
request.  But of course not... it's not that there's one request that 
gets suspended and resumed, it's that you have one request that 
inaugurates the flow, and another request(s) that resume it.  Yeah I 
get it :-)


The simple rule is that only local variables of the script function are 
part of the continuation. Every object you access through the cocoon 
object is not part of the continuation and is likely to change when you 
cross a cocoon.sendPageAndWait().

The whole woody-flowscript integration is quite focussed on 
displaying one form at a time, so you're a bit on your own if you 
want to display multiple forms... (not that it's impossible, but 
you'll have to write some more code by your own.


Right, I kind  of saw that coming :-)  I figure all the pieces are 
there in woody2.js, I'll just have to put them together differently.


You can make use of the upcoming bookmark continuations in the 
upcoming 2.1.4 release. These are continuations that are not related to 
a sendPage and can therefore be used to go back at any particular 
location in your script. This allows to easily handle a previous 
button in a wizard.

Sylvain

--
Sylvain Wallez  Anyware Technologies
http://www.apache.org/~sylvain   http://www.anyware-tech.com
{ XML, Java, Cocoon, OpenSource }*{ Training, Consulting, Projects }
Orixo, the opensource XML business alliance  -  http://www.orixo.com


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


RE: Windows/Tomcat/Cocoon Installation --htm attached.

2004-02-11 Thread H . vanderLinden
Hi,

This is a great idea and, like Michael suggested it would be a great
contribution to the Wiki. Following Geoff's suggestions you could add some
text at the top that stated that it should pretty much work with see
Geoff's mail, but for clarity you describe it using your version set.

If you find it difficult to add it to the Wiki, I'd be glad to do it for
you.

Thanks for the work.

Bye, Helma

 -Original Message-
 From: Jim Bloggs [mailto:[EMAIL PROTECTED] 
 Sent: Wednesday, 11 February 2004 20:25
 To: [EMAIL PROTECTED]
 Subject: Windows/Tomcat/Cocoon Installation --htm attached.
 
 
 Greetings!
 
 I don't know whether this will be of any use, but I made out 
 a how-to for
 installing Cocoon 2.1.3 on Tomcat 5.0.18 on Windows 2000 with
 j2sdk1.4.2_01.
 
 I thought it just might be useful but, if not, my apologies 
 for wasting
 your time and you can just ignore this email. It may also not 
 be the best
 way of doing things, but at least it seemed to work for me. Hope it
 helps.
 
 Many thanks.
 
 best, Jim
 
 -- 
 http://www.fastmail.fm - Same, same, but different...
 

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



Re: CInclude or XInclude

2004-02-11 Thread Joerg Heinicke
On 05.02.2004 16:14, Lionel Crine wrote:

Hi,

I'd like to merge some part of document coming from different pattern.
On cocoon.apache.org, I saw tat Cinclude and Xinclude can merge some 
document calling href.

Also, I saw that Xinclude can use xml:base calling some cocoon uri.
It's a little bit blur for me.
Is there any document out there ?
What exactly is your problem? There should be documentation on both the 
cinclude and the xinclude transformer. Both work using cocoon:/.

Joerg

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


Re: HTMLGenerator and Request Params

2004-02-11 Thread Joerg Heinicke
On 05.02.2004 21:21, Brent L Johnson wrote:

Im attempting to pass some parameters through to
the src of the HTML generator and I'm getting an
IOException.  Here is my sitemap snippet:
map:match pattern=test.xml
map:act type=request
map:parameter name=parameters value=true/
map:generate type=html
src=http://www.somewebsite.com/someSearchUrl.cgi?param={searchParams}/
map:transform src=styles/test.xsl/
map:serialize type=xml/
/map:act
/map:match
I try to access this by going to
http://localhost/test.xml?searchParams=my%20param
I get an error that says Could not get resource
http://www.somewebsite.com/someSearchUrl.cgi?param=my param
It looks like it decodes the %20 and turns it back into a normal space
but the generator does NOT like that.  Does anyone have any suggestions
as to how I can get around this problem?  If I just hardcode my%20param
for the generator it works just fine.
The request parameters are not decoded back in the sitemap. Does the raw 
request param module work for you? See 
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=23283 for an example. 
Unfortunately there is another bug open, that states that it might not 
work: http://nagoya.apache.org/bugzilla/show_bug.cgi?id=25102.

Joerg

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


Re: org.apache.cocoon.ProcessingException: Unable to get transformer handler for

2004-02-11 Thread Joerg Heinicke
On 06.02.2004 00:39, Dan Durkin wrote:

I have an existing cocoon app running in 2.0.4 and I'm trying to get it 
running in cocoon-2.1.4-dev the cvs head from a day or 2 ago.
Which container do you use? If you don't use the bundled, stripped-down 
Jetty delivered with Cocoon and if you use JDK 1.4 have you down 
something about the endorsed libs?

org.apache.cocoon.ProcessingException: Unable to get transformer handler 
for
Nothing more than this?

I tried setting the default transformer to xalan to see if the error 
message would change but it remained the same.
Xalan is already the default transformer when using the transformer 
named xslt. xsltc is the other one and maybe this gives another 
error message.

Joerg

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


RE: HTMLGenerator and Request Params

2004-02-11 Thread Brent L Johnson
The raw request parameter input module does not work.
So you can change the bug to confirmed :)  Joakim
actually patched it and it's working for me now.
I think he just added a URLEncode to the parameter
before its returned.

- Brent

 -Original Message-
 From: Joerg Heinicke [mailto:[EMAIL PROTECTED] 
 Sent: Wednesday, February 11, 2004 4:32 PM
 To: [EMAIL PROTECTED]
 Subject: Re: HTMLGenerator and Request Params
 
 
 On 05.02.2004 21:21, Brent L Johnson wrote:
 
  Im attempting to pass some parameters through to
  the src of the HTML generator and I'm getting an
  IOException.  Here is my sitemap snippet:
  
  map:match pattern=test.xml
  map:act type=request
  map:parameter name=parameters value=true/
  map:generate type=html 
  
 src=http://www.somewebsite.com/someSearchUrl.cgi?param={searchParams}
  /
  
  map:transform src=styles/test.xsl/
  map:serialize type=xml/
  /map:act
  /map:match
  
  I try to access this by going to 
  http://localhost/test.xml?searchParams=my%20param
  
  I get an error that says Could not get resource 
  http://www.somewebsite.com/someSearchUrl.cgi?param=my param
  
  It looks like it decodes the %20 and turns it back into a 
 normal space 
  but the generator does NOT like that.  Does anyone have any 
  suggestions as to how I can get around this problem?  If I just 
  hardcode my%20param for the generator it works just fine.
 
 The request parameters are not decoded back in the sitemap. 
 Does the raw 
 request param module work for you? See 
 http://nagoya.apache.org/bugzilla/show_bug.cgi?id=23283 for 
 an example. 
 Unfortunately there is another bug open, that states that it 
 might not 
 work: http://nagoya.apache.org/bugzilla/show_bug.cgi?id=25102.
 
 Joerg
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 
 


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



FileUploadsWithFlow problem

2004-02-11 Thread Bert Van Kets
Hi all,
I have finally gotten the FileUploadsWithFlow sample working without errors,
but I still can't see anything arriving on the server. :-(

I get no error anywhere. Not in the console, not in the browser, not in the
logs. The Flow script throws me to the success page, which should mean the
object was successfully created.
From what I read in the FileUploadManager.java file the upload directory is
taken from the context. But regardless of what I set in web.xml I see
nothing hapening there.
I know that Cocoon removes the files from the upload directory at the end of
teh request, but is this also the case here? After all the file is manually
written to disk.

What do I need to set in the web.xml file to get things running? Do I need
to copy the file to a different directory again after the FileUploadMagager
has already written it to disk?

If I get this running I promise I'll update the Wiki page so it's more
usable for newbies like me.

Thanks for any help,
Bert



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



RE: Windows/Tomcat/Cocoon Installation --htm attached again.

2004-02-11 Thread Jim Bloggs

On Wed, 11 Feb 2004 22:09:01 +0100, [EMAIL PROTECTED] said:
 Hi,
 
 Following Geoff's suggestions you could add some
 text at the top that stated that it should pretty much work with see
 Geoff's mail, but for clarity you describe it using your version set.
 
 If you find it difficult to add it to the Wiki, I'd be glad to do it for
 you.
 
Hi Helma,

I've added a boxout to the top right á la Geoff. Hope it's OK.

I would be most grateful if you would add it to the Wiki for me as I
haven't used the Wiki before.

Many thanks.

best, Jim

-- 
http://www.fastmail.fm - One of many happy users:
  http://www.fastmail.fm/docs/quotes.html


	
	
		Windows/Tomcat/Cocoon Installation

		Tomcat 5.0.18/Cocoon 2.1.3 on Windows 2000 with j2sdk1.4.2_01

		11 February 2004

		
			Other Versions
			These same instructions should work for:

	any recent tomcat
	any jdk1.4
	any cocoon release or cvs snapshot.
	any windows environment (except probably 95, 98, maybe ME)

			
		

		Installing Tomcat and Cocoon is easy if you know how, but can be complicated if you don't. As I went through it, I promised myself I would make notes once I'd finished. Outlined below are the steps I took to install Cocoon 2.1.3 on Tomcat 5.0.18 on Windows 2000 with j2sdk1.4.2_01. I hope they help.

		
			The following assumes you have already installed Sun's Java Development Kit (j2sdk1.4.2_01) in directory c:\j2skd1.4.2_01.
		

		
			Do this: Download the file called 5.0.18.zip from the Tomcat 5.0.18 section near the bottom of the Release Builds section:

	
		http://jakarta.apache.org/site/binindex.cgi
	

Consider this: It may be possible to use the .exe or Deployer files instead, but I used the zip.
			
			Do this: Extract everything to c:\ using Winzip, which should create a directory called:

	c:\jakarta-tomcat-5.0.18

Consider this: You can tell Winzip will create a subdirectory by looking at the value in the path column on the right hand side.
			
			Do this: Set the JAVA_HOME and CATALINA_HOME environment variables.

	Right-click My Computer > Properties > Advanced > Environment variables... > System Variable pane, New... etc.
	
		
			JAVA_HOME
		
		
			c:\j2sdk1.4.2_01
		
		
			CATALINA_HOME
		
		
			c:\jakarta-tomcat-5.0.18
		
	
	Consider this: Environment variables can also be set in a DOS box using DOS commands, but in that case, they are only meaningful within and for the lifetime of that DOS box.

			
			Do this: Test the server by running the batch file provided.

	c:\jakarta-tomcat\bin\startup.bat

Consider this: This is only one way of running the server. A better way is to install it as a Windows service.
			
			Do this: View the default installation screen. The screen should be available when you see the message INFO:Server startup in nms, by visiting:

	http://localhost:8080/

Consider this: Tomcat listens on port 8080 by default. Apache listens on port 80 by default. Browsers normally hit on port 80 unless told otherwise.
			
			Do this: Stop the server by running the batch file provided.

	c:\jakarta-tomcat\bin\shutdown.bat

Consider this: Because the batch file appears to hang, you will need to run this batch file from another DOS window.
			
			Do this: Install Tomcat as a Windows service by running the batch file provided.

	c:\jakarta-tomcat\bin\service.bat

Consider this: Windows services can be controlled independently throught the Services control panel.
			
			Do this: Change the service status to automatic for automatic start on reboot. The service should be named Apache Tomcat in:

	Control Panel > Administrative Tools > Services

Consider this: You can start, stop and restart any service using the corresponding button in the top panel
			
			Do this: Download the file called cocoon-latest-src.zip from:

	
		http://cocoon.apache.org/mirror.cgi
	

Consider this: It is necessary to download the entire source which can take a long time.
			
			Do this: Extract the source to c:\ using Winzip, which should place everything in a directory called:

	c:\cocoon-2.1.3

Consider this: You can find more details on installing Cocoon in c:\cocoon-2.1.3\INSTALL.txt
			
			Do this: Build the binary. It may run for quite a while, in my case 30 mins.

	build

Consider this: During this time there will be many disturbing warning messages. You can see other build options by doing build -projecthelp
			
			Do this: Test Cocoon in the Jetty Servlet container.

	cocoon servlet

Consider this: Jetty is provided with Cocoon so that it can be tested independently of a separately installed servlet container such as Tomcat.
			
			Do this: View 

Fwd: Cocoon upload manager

2004-02-11 Thread Mark Lundquist


Begin forwarded message:

From: Mark Lundquist [EMAIL PROTECTED]>
Date: February 11, 2004 3:59:04 PM PST
To: [EMAIL PROTECTED]
Cc: Bert Van Kets [EMAIL PROTECTED]>
Subject: Cocoon upload manager

Hi Nicolas,

I, along with another [EMAIL PROTECTED] list member, are trying to use the FileUpdateManager component that you donated and we're having some trouble.  Briefly, the upload() method reports success, but it doesn't appear that anything got uploaded  however, the Cocoon logs don't show any exceptions.  From looking at your code, I don't see how that is possible!

So I have these questions:

1) How do I configure the logger for this component?  The main upload method is well-instrumented if I could get my hands on the log messages, but I'm too lame of a Cocooner to know how to configure it :-/  (I know how to configure the log in logkit.conf, I just need to know how to set up the component logger).

2) How do I configure the default download directory (at configuration time)?

I'll forward you my reply to the other Cocooner, because it has some more details.  He's Cc:ed on this email and I'll copy him on that one too, so you can reply to both of us.

Thanks a lot for any help you can give,
Mark Lundquist



Re: Need some help w/ Woody Template

2004-02-11 Thread Mark Lundquist
On Feb 11, 2004, at 1:03 PM, Sylvain Wallez wrote:

You can make use of the upcoming bookmark continuations in the 
upcoming 2.1.4 release. These are continuations that are not related 
to a sendPage and can therefore be used to go back at any particular 
location in your script. This allows to easily handle a previous 
button in a wizard.

Very nice!
~ml
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


reading binary stream into xsp page

2004-02-11 Thread beyaNet Consultancy
Hi,
I have the following code in my xsp page:

byte[] binImg = newArt.getArtistPhoto1();

I now want to display this stream in the page like so:

xsp:expr>binImg/xsp:expr>

but am getting, as expected, casting errors. What do i need to do to display the contents of this stream, which was a simple txt file read into postgresql as a byte array? Any help with this issue will be most appreciated.


many thanks in advance

Re: FileUploadsWithFlow problem

2004-02-11 Thread David Crossley
Mark Lundquist wrote:
snip/
 
 I tried to contact the author of the upload component (Nicolas 
 Maisonneuve), to see if he could get me started in the right direction 
 debugging this, but the address I have for him gets blocked by 
 rsl.visi.com which has (wrongly!) listed my mail server as an open 
 relay.
 
 So I'm going to forward my two messages to the list.  Maybe NM will 
 read them here, or maybe somebody else will have the know how to point 
 me in the right direction.

I think that this is a lesson to always keep the discussions
on the list. Starting private off-list discussions just leads to
trouble. There are many more people here that can help (not me :-)
and if not then everyone can listen and learn.

--David


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



Re: FileUploadsWithFlow problem

2004-02-11 Thread Geoff Howard
Bert Van Kets wrote:
Hi all,
I have finally gotten the FileUploadsWithFlow sample working without errors,
but I still can't see anything arriving on the server. :-(
Finally got a chance to look at this tonight, and I think I have 
answers.  I have not tested any of this, so it's all fresh from 5 
minutes in the patch code, and cvs (all while watching a very 
interesting show on the Medicis...).  Point is, check what I'm saying - 
I could be wrong.

I get no error anywhere. Not in the console, not in the browser, not in the
logs. The Flow script throws me to the success page, which should mean the
object was successfully created.
I think you're right.  The logs should go into core.log, but the default 
logging level (set in logkit.xconf, modified if desired by build 
properties) is WARN or ERROR now.  So, to see the .debug() level as in 
this case, you need to modify it to lower to DEBUG.

From what I read in the FileUploadManager.java file the upload directory is
taken from the context. But regardless of what I set in web.xml I see
nothing hapening there.
I know that Cocoon removes the files from the upload directory at the end of
teh request, but is this also the case here? After all the file is manually
written to disk.
Yes, this is a flaw of the upload manager component as written - because 
it uses the upload dir in web.xml as the default destination dir, the 
default behavior is to rename a PartOnDisk to the same file name.  When 
the files are cleaned up at the end of the request in 2.1.3 and before 
all PartOnDisks in the Request are looped over and the underlying File 
deleted (even though you've resaved it).  Ironically, because the code 
in 2.1.3 looks for PartOnDisk, if you set autosave to false the 
PartInMemorys will be skipped over during cleanup and the file would 
survive.

To use the component as is, simply configure a different upload dir, 
which you can do from reading the component info by adding this 
somewhere as a top-level child in cocoon.xconf:

upload_manager !-- from shorthand in roles file --
  uploadfolder/any/other/dir/uploadfolder
/upload_manager
There is a new feature in current cvs, about to be released in 2.1.4 
which mitigates this issue, but the component needs to be modified to 
take advantage of it.  Three new methods are added to Part, but the 
important one is called setDisposeWithRequest(boolean) which you can use 
to signal the framework to leave this item alone.  The default if you do 
not set it is true (erase at end as now).  So, with this you no longer 
need a component for the simplest case: uploading all files to one 
directory, set in web.xml.  You could in your flowscript just get the 
Part as described now on the wiki and call 
part.setDisposeWithRequest(false).  C'est tout.

What do I need to set in the web.xml file to get things running? Do I need
to copy the file to a different directory again after the FileUploadMagager
has already written it to disk?
Just to make sure you understood the above, you should be able to 
provide several interesting answers to these questions yourself now...

If I get this running I promise I'll update the Wiki page so it's more
usable for newbies like me.
Please do.  There is also a problem with the component example code at 
the bottom - I posted a fix for that recently on the list (within the 
last week).

Geoff

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


Re: reading binary stream into xsp page

2004-02-11 Thread Eduard Drenth
On Thu, 2004-02-12 at 01:48, beyaNet Consultancy wrote:
 Hi,
 I have the following code in my xsp page:
 
 byte[] binImg = newArt.getArtistPhoto1();
 
 I now want to display this stream in the page like so:
 
 xsp:exprbinImg/xsp:expr
 

If this is a textfile try: xsp:exprnew String(binImg)/xsp:expr

 but am getting, as expected, casting errors. What do i need to do
 todisplay the contents of this stream, which was a simple txt file
 readinto postgresql as a byte array? Any help with this issue will be
 mostappreciated.
 
 
 many thanks in advance
-- 
Eduard Drenth [EMAIL PROTECTED]
home sweet home


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



Re: Excel Spreadsheet Generator|Transformer

2004-02-11 Thread Eduard Drenth
On Wed, 2004-02-11 at 18:16, Dave Kavanagh wrote:
 Whoops! I meant to reply to Daniel directly. FWIW, I could supply my 
 transformer to the list (minus a project specific block of code). Anyone else 
 need something like this?

Yes, it would indeed be very usefull!! In our company excel wizzards
make visual basic applications for ordering stuff, but the same stuff
gets ordered by other means as well, so we want to transform all the
different ordering info into a predefined XML and continue from there.
When there is a decent excel generator I will consider using that,
otherwise I might build one myself.

  We've found it quite usefull. It takes some config 
 XML as input to tell it how to process the Excel file (it gets from a multipart 
 upload).
 
 David
 
 Quoting Dave Kavanagh [EMAIL PROTECTED]:
 
  There wasn't when I looked, so I made the HSSFTransformer (that membership 
  uses).
  
  David
  
  Quoting Daniel McOrmond [EMAIL PROTECTED]:
  
   Is there are Generator|Transformer that produces xml from an excel
   document? Perhaps something utilizing Jakarta POI-HSSF?
   
   -Daniel
   
   
   
   -
   To unsubscribe, e-mail: [EMAIL PROTECTED]
   For additional commands, e-mail: [EMAIL PROTECTED]
   
  
  
  
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
  
 
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
-- 
Eduard Drenth [EMAIL PROTECTED]
home sweet home


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



Re: Sendmail logicsheet internationalization

2004-02-11 Thread Eduard Drenth
On Wed, 2004-02-11 at 12:28, Philippe Guillard wrote:
 Hi,
 I've got a problem to internationalize my sendmail :
 
 I use a Woody form, then XSP logicsheet as in the sendmail sample, where
 i get the values entered by woody and add some text that i need to be
 internationalized to compose the body of the mail. I can't use i18n
 transformer as the mail seems to be sent during the XSP generation. 
 

Yes I think that you are right there. Consider using a mail transformer,
I have build one that works nicely with different encodings, also there
is a mailtransformer in 2.1.3.

 Then i planned to do some logic with if statements on the locale. Below
 is what i plan to do but i can't get the locale value...I'm thinking
 also about doing this in flow.
 
 Any suggestion or method is welcomed !
 
 Phil
 
 --
 
 xsp:logic
   // (THIS IS NOT CORRECT)  getLocale(locale);
   if (locale = en_US) {
   String bodymessage = Message.in any language;
   }
 }
 else {
   String bodymessage = Message in English;
 }
 
 /xsp:logic
 
   sendmail:send-mail
 
 sendmail:bodyxsp:exprbodymessage/xsp:exprxsp-request:get-parameter 
 name=This_coming_from_woody template//sendmail:body
 
/sendmail:send-mail
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
-- 
Eduard Drenth [EMAIL PROTECTED]
home sweet home


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



Re: URGENT: Cocoon+FO Project needs a new owner

2004-02-11 Thread Eduard Drenth
On Wed, 2004-02-11 at 10:27, Matthias Schäfer wrote:
 Phil Blake wrote:
  Hi Everyone,
  
  I started a paid project for a friend and have been so snowed under with 
  work that I can't complete it in a reasonable time.
  
  Anyone interested in a cocoon 2.1 FoxPro/ESQL/FO PDF publishing project, 
  contact me asap for complete details. The project is 90% complete.
  
  It's a great job, and if you're interested it will most likely lead to 
  other similar projects.
  
  Thanks for your time.
  
  Phil
  PS Good handle on FO and PDF essential.
  
  
  
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
  
  
 Hello Phil,
 
 currently I am working on a Project wich uses Cocoon to add PDF-Printing 
 with FOP to a JSP-Application.
 Maybe I can help you. So please give me more Details...
 
 Matthias
 
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]

Hi Phil,

I am working with SVG and FO in cocoon for 2 years, among other things I
have written a FO serializer which can post process a PDF after it has
been rendered by fop, for example using ghostscript.

Also I have a transformer which translates any svg into XSL-FO.

I don't have a lot of time, but if you have specific questions I can try
to answer them.

Eduard

-- 
Eduard Drenth [EMAIL PROTECTED]
home sweet home


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