Re: Does cocoon support xq files?

2004-08-03 Thread Derek Hohls
If you supply some more info about the file
type, someone might be able to help

 [EMAIL PROTECTED] 2004/08/02 04:56:06 PM 
Hi everyone,

Does cocoon support xq files?

 

-- 
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]



Why Cocoon 2.1.5 hasn't the sample of portal engine ?

2004-08-03 Thread Vladimir Lisin

Hi,
Cocoon v.2.1.4 have the sample
with the newer portal engine but to my regret with bugs. When I have installed
Cocoon 2.1.5 I detected that this sample
is absent. Can anyone comment this situation ?
Thanks.
Regards, Vladimir

Re: Encoding problems

2004-08-03 Thread Jan Hoskens
You may want to take a look at the wiki page: 
http://wiki.apache.org/cocoon/RequestParameterEncoding
I had this problem a while ago: 
http://marc.theaimsgroup.com/?l=xml-cocoon-usersm=109100902605917w=2
I'm wondering what the best solution is and which encoding is preferred 
for handling special characters or when UTF-8 / ISO 8859-1 should/could 
be used.

Kind Regards,
Jan
[EMAIL PROTECTED] wrote:
FREDERIC MOSER wrote:
Hi,
I've got some encoding problems using the xhtml serializer, I don't
really understand .
(I use Mozilla on Win XP and my editor is set to use UTF-8)
Part 1:
---
I've got the following stylesheet:
-- 

?xml version=1.0 encoding=UTF-8?
xsl:stylesheet version=1.0
xmlns:xsl=http://www.w3.org/1999/XSL/Transform;
xsl:output method=xml version=1.0 encoding=UTF-8 
indent=no/
xsl:template match=/
html
head
titleplop/title
link rel=stylesheet type=text/css 
href=simple.css/
meta http-equiv=Content-Type content=text/html;
charset=UTF-8 /
/head
body
h1Monographie ééé/h1
div
form method=post action=ModifierMonographie
...
-- 

If I use : map:serialize type=html/, everything work but the browser
detect my encoding as IS0-8859-1 (because we can't encode HTML 4.01 as
UTF-8 I guess??)

Did you check in the components section of your sitemap.xmap how the 
serializers are configured?

To supply HTML using UTF-8 you could use
-- 

map:serializer name=html mime-type=text/html; charset=utf-8
logger=sitemap.serializer.html pool-grow=2
pool-max=64 pool-min=2
src=org.apache.cocoon.serialization.XMLSerializer
   doctype-public-//W3C//DTD XHTML 1.0 
Strict//EN/doctype-public 
doctype-systemhttp://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd/doctype-system 

   omit-xml-declarationyes/omit-xml-declaration
   omit-namespacesyes/omit-namespaces
   encodingUTF-8/encoding
   indentyes/indent
/map:serializer
-- 



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


Re: Why Cocoon 2.1.5 hasn't the sample of portal engine ?

2004-08-03 Thread Claudius Spellmann
My installation still contains the portal engine.
Try the your cocoon directory/samples/blocks/portal directory, there 
you'll find your portal engine.

Claudius
Vladimir Lisin schrieb:
Hi,
Cocoon v.2.1.4  have the sample with the newer portal engine but to my 
regret with bugs. When I have  installed  Cocoon  2.1.5  I  detected 
that  this sample is absent.  Can  anyone comment this situation ?
Thanks.
Regards,  Vladimir 

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


Re: Does cocoon support xq files?

2004-08-03 Thread Tun Lin
Example of an xq file does like this as shown below:

xquery version 1.0;

declare namespace util=http://exist-db.org/xquery/util;;
declare namespace dc=http://purl.org/dc/elements/1.1/;;
declare namespace fn=http://exist-db.org/local-functions;;
declare namespace rdf=http://www.w3.org/1999/02/22-rdf-syntax-ns#;;
declare namespace x=http://exist.sourceforge.net/dc-ext;;

(: Map query field parameter to xpath selection :)
declare function fn:query-field($field as xs:string) as xs:string
{
if ($field = au) then
dc:creator|(dc:editor|dc:contributor)
else if ($field = ti) then
dc:title
else if ($field = ab) then
dc:description
else if ($field = su) then
dc:subject
else if ($field = ye) then
dc:date
else
.
};

(: Create filter expression from query term, field and mode :)
declare function fn:filter-expr($term as xs:string, $field as xs:string,
$mode as xs:string) as xs:string
{
let $f := fn:query-field($field),
$t := concat(', $term, ')
return
if ($mode = near) then
concat(near(, $f, , , $t, ))
else if ($mode = exact) then
concat($f,  = , $t)
else
concat($f,  amp;= , $t)
};

(: Map order parameter to xpath for order by clause :)
declare function fn:order-expr($field as xs:string) as xs:string
{
 if ($field = creator) then
  (dc:creator|dc:editor)[1], $r/dc:title
 else if ($field = title) then
  dc:title, (dc:creator|dc:editor)[1]
 else
  dc:date descending, dc:title
};

(: Assemble the query string :)
declare function fn:build-query($term1 as xs:string, $orderby as xs:string)
as xs:string
{
let $field1 := request:request-parameter(field1, any),
$mode1 := request:request-parameter(mode1, all),
  $expr1 := fn:filter-expr($term1, $field1, $mode1),
  $term2 := request:request-parameter(term2, ),
  $expr :=
   if ($term2 = ) then $expr1
   else
let $field2 := request:request-parameter(field2, any),
 $mode2 := request:request-parameter(mode2, all)
return
 concat($expr1,  and ,
  fn:filter-expr($term2, $field2, $mode2)),
  $t := request:set-session-attribute(query, $expr)
return
concat(for $r in document()//rdf:Description[,
$expr, ] order by $r/,
fn:order-expr($orderby),  return $r)
};

(:  display creators: if there's more than one creator, output the
first one and add et al.
:)
declare function fn:get-creators($i as element()) as xs:string
{
let $creators := for $c in $i/(dc:creator|dc:editor) return $c,
$count := count($creators)
return
if($count = 0) then

else if($count = 1) then
string(item-at($creators, 1))
else
concat(item-at($creators, 1),  et al.)
};

(: Display a single record from the query results :)
declare function fn:display-details($hits as node()+)
as element()
{
let $count := count($hits),
$start := xs:int(request:request-parameter(start, 1)),
$max := request:request-parameter(howmany, 10) cast as xs:int,
$hit := item-at($hits, $start)
return
query-results hits={$count} start={$start}
next={$start + 1} max={$max}
{$hit}
/query-results
};

(: Present an overview of query results :)
declare function fn:display-summary($hits as node()+)
as element()
{
let $count := count($hits),
$max := request:request-parameter(howmany, 10) cast as xs:int,
$start := request:request-parameter(start, 1) cast as xs:int,
$end := if ($start + $max - 1  $count) then $start + $max - 1 else
$count
return
query-results hits={$count} start={$start}
next={$end + 1} max={$max}
{
for $p in $start to $end
let $current := item-at($hits, $p)
let $creators := fn:get-creators($current)
return
item
year{$current/dc:date}/year
{$current/dc:title}
creator{ $creators }/creator
/item
}
/query-results
};

(:  Call display-summary or display-details :)
declare function fn:display($hits as node()+)
as element()
{
let $mode := request:request-parameter(display, summary)
return
if ($mode = summary) then
fn:display-summary($hits)
else
fn:display-details($hits)
};

(: Re-order the search results :)
declare function fn:reorder($query as xs:string, $orderby as xs:string)
as element()
{
 let $expr := concat(for $r in document()//rdf:Description[,
 $query, ] order by $r/, fn:order-expr($orderby),
  return $r),
  $hits := util:eval($expr),
  $s := request:set-session-attribute(
   results, subsequence($hits, 1, 100)
  )
 return
  if (empty($hits)) then
   pNothing found!/p
  else
   fn:display($hits)
};

declare function fn:main() as element()+
{
let $term1 := 

Re: Why Cocoon 2.1.5 hasn't the sample of portal engine ?

2004-08-03 Thread Vladimir Lisin

Very thanks and sorry for my inattention
:-)))
On HTML page of samples ( in v.
2.1.5 ) refrence at portal engine
was moved in section Unstable block.
Question was closed :-)
Regards

My installation still contains the portal engine.
Try the your cocoon directory/samples/blocks/portal directory,
there 
you'll find your portal engine.

Claudius






Re: memory issues, SAX

2004-08-03 Thread Bruno Dumon
Lars,

are you aware that the Java VM doesn't automatically use all available
memory? IIRC on Windows by default it uses maximum 64 MB. You can
augment that by adding a parameter like -Xmx192m to the java startup
command. If you search the cocoon wiki or the internet you'll find
plenty of information on that.

As for the XSLT transforms: yes, these build a complete model of your
document in memory before doing the transform, though it's an optimized
model that should be much smaller then a typical DOM. From your earlier
non-updateable-dom problems, I'd assume that the
SourceWritingTransformer also builds a DOM in memory. By default the
serialized output of a pipeline is also completely buffered before
sending it to the client, see the explanation for outputBufferSize in
the default root sitemap on how to avoid that.

On Tue, 2004-08-03 at 05:25, Lars Huttar wrote:
 Dear Cocoon gurus,  [Cocoon 2.1.2, Tomcat 4.1]
 
 We have an application where we need to generate an index
 from a large database. We seem to be running out of memory
 even in getting the unprocessed out of the database.
 
 We initially did (sitemap pseudocode)
   - xsp query to get rows from Index table of database
   - XSLT transformation that groups together rows with certain identical fields
   - XSLT transformation that wraps source:write markup around
 the XML
   - the write-source transformer to put the XML into a file
   - (serialize as XML)
 
 This worked for small rowsets, but when we jump from 3700 to
 9500 rows, it fails, with the message
 org.apache.cocoon.ProcessingException: Exception in ServerPagesGenerator.generate():
 java.lang.RuntimeException: org.apache.cocoon.ProcessingException: insertFragment: 
 fragment is
 required.
 
 which sounds like write-source transformer is complaining that it didn't
 get its fragment (data to write to the file), so I supposed
 there was a failure before the write-source transformer.
 I wondered if the XSLT transformations were each building
 a DOM for the entire input. This would account for running out
 of memory.
 
 So I tried reducing the pipeline to just obtaining the data
 and writing it to a file without grouping.
 First I tried
 
   - xsp query to get rows from Index table of database
   - XSLT transformation that just wraps source:write markup around
 the XML
   - the write-source transformer to put the XML into a file
 
 but this failed too, and of course it has an XSLT transformation
 which is suspect -- is it building a DOM? So next I tried
 
   - file generator to get a file that contained a source:write
 wrapper around a cinclude statement
   - cinclude transformer to get the data
   - the write-source transformer to put the XML into a file
 
 And in a separate pipeline called by the cinclude statement,
 
   - xsp query to get rows from Index table of database
 
 But this still failed!
 
 So now I'm wondering how it's possible to process big sets
 of data at all in Cocoon. We thought SAX meant that the XML
 data was sent piece-by-piece down the pipeline, serially,
 so you didn't run out of memory when you had a big XML data
 file. Does using XSLT mess that up by building DOMs?
 What about cinclude?
 What *can* you use to get lots of data from a database
 and process it without having to have it all in memory
 at once? Does this task need to be done outside of Cocoon?
 
 Of course, we can split the operation up into little pieces;
 but we don't want to go through that hassle if it's avoidable.
 
 Is it possible that I'm missing the point completely and
 there's something other than memory that's causing the
 operation to fail?
 By the way this machine has 384MB, and another I was testing
 on had 512MB. They both failed at about the same point.
 
 Thanks for any explanations or suggestions...
 Lars

-- 
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: Flow : Accessing Repeater Rows value in Flow

2004-08-03 Thread Bruno Dumon
On Mon, 2004-08-02 at 17:21, oceatoon wrote:
 Hi  
 
 I found a post POPUALTING SELECTIONLISTS INA REPEATER FROM FLOW  where a
 similar question was asked but I can't seem to get Joergs technique(getRow
 before getting the value) to function. 
 
 my repeater only contains an upload widget (minimum one so Row(0) allways
 exists, with add and delete). Then in my Flow, I need to retreive the value
 of the uploaded file from the widget to move it around.
 
 wid = handleForm(masterform, forms/, document);
 
 //I'd like to retreive the value 
 wid.houseuploads.getRow(0).getValue();
 
  But this doesn't seem to work allways returns null

From the wid.houseuploads notation I'd assume you're using the
javascript-wrapped variant of the widget tree, which has a different
API.

 Also, do I have run through the whole repeater or is there a size or length
 method associated to now how many entries have been submitted?

For the java API, this can be retrieved with the method getSize() of the
repeater.

I think you can find the javascript-equivalents of these in the samples.

-- 
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]



HTMLArea in a table

2004-08-03 Thread karim . alkhader
Hi

I modified the HTMLArea example form template using a table.
The head (buttons) is displayed but not the textArea (using IE 6)...
Suggestions of what can be wrong are welcome.

Regards

Karim


page xmlns:ft=http://apache.org/cocoon/forms/1.0#template;
  xmlns:fi=http://apache.org/cocoon/forms/1.0#instance;
  titleHTMLArea/title
  content
ft:form-template action=#{$continuation/id}.continue method=POST
table
trtd
 ft:widget-label id=data/
/td/tr

trtd
 ft:widget id=datafi:styling type=htmlarea style=width: 100%; 
rows=20 //ft:widget
/td/tr  
/table
br/
  input type=submit/
/ft:form-template
  /content
/page

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



Re: Encoding problems

2004-08-03 Thread [EMAIL PROTECTED]
Jan Hoskens wrote:
You may want to take a look at the wiki page: 
http://wiki.apache.org/cocoon/RequestParameterEncoding
I had this problem a while ago: 
http://marc.theaimsgroup.com/?l=xml-cocoon-usersm=109100902605917w=2
I'm wondering what the best solution is and which encoding is preferred 
for handling special characters or when UTF-8 / ISO 8859-1 should/could 
be used.
I can't see any reason why not to use Unicode charset with UTF-8 
encoding only. It is supported by all common browsers ans allows you to 
use *all* Unicode http://www.ltg.ed.ac.uk/~richard/unicode-sample.html 
characters by just typing them into the source code.
Make sure that the charset information sent with HTTP header is 
compliant with the document's encoding.
Most browsers will use it for encoding input in forms.
--
Volkmar W. Pogatzki

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


Cocoon 2.1.5.1 build fails under Windows 98SE

2004-08-03 Thread Trevor Turton




I downloaded Cocoon 2.1.5.1 onto Windows 98SE with j2sdk1.4.1_01 installed
and ran the Cocoon build.bat, with results as shown in the console log
appended.  Build expects to find tools.jar in %JAVA_HOME%\JRE\lib\, but
it's actually in %JAVA_HOME%\lib\.  I tried copying all jars from lib into
JRE\lib and the build got a bit further and then failed.  The console log
includes an echo of %JAVA_HOME% and a dir of %JAVA_HOME%\lib\tools.jar to
show what's there.

Trevor Turton

D:\Downloads\Java\Cocoon\cocoon-2.1.5.1build.bat
Bad command or file name
Bad command or file name
Bad command or file name
Bad command or file name
Bad command or file name

Syntax error
Unable to locate tools.jar. Expected to find it in
D:\JAVA\J2SDK1.4.1_01\JRE\lib\tools.jar
Buildfile: build.xml

prepare:
==
 Apache Cocoon 2.1.5.1 [1999-2004]
==
 Building with Apache Ant version 1.6.1 compiled on February 12 2004
--
 Using build file D:\Downloads\Java\Cocoon\cocoon-2.1.5.1\build.xml
--
 Compiler options:
   - debug . [on]
   - optimize .. [on]
   - deprecation ... [off]
==

compile-core:
Compiling 1 source file to
D:\Downloads\Java\Cocoon\cocoon-2.1.5.1\build\cocoon-2.1.5.1\mocks

BUILD FAILED
D:\Downloads\Java\Cocoon\cocoon-2.1.5.1\tools\targets\compile-build.xml:49:
Unable to find a javac compiler;
com.sun.tools.javac.Main is not on the classpath.
Perhaps JAVA_HOME does not point to the JDK

Total time: 5 seconds

D:\Downloads\Java\Cocoon\cocoon-2.1.5.1echo %JAVA_HOME%
d:\java\j2sdk1.4.1_01

D:\Downloads\Java\Cocoon\cocoon-2.1.5.1dir %JAVA_HOME%\lib\tools.jar

 Volume in drive D is DATA
 Volume Serial Number is 401A-DD91
 Directory of D:\Java\j2sdk1.4.1_01\lib

TOOLSJAR 4,926,685  04-26-04  4:14p tools.jar
 1 file(s)  4,926,685 bytes
 0 dir(s)4,601.28 MB free



The information transmitted in this e-mail is intended only for the person or entity 
to which it is addressed and may contain confidential and/or privileged material. Any 
review, retransmission, dissemination or other use of, or taking of any action in 
reliance upon this information by persons or entities other than the intended 
recipient is prohibited. If you received this in error, please contact the sender and 
delete the material from your computer.

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



Re: Encoding problems

2004-08-03 Thread FREDERIC MOSER
I did not know some settings have to be done in web.xml, here is what I
was looking for:

init-param
  param-nameform-encoding/param-name
  param-valueUTF-8/param-value
/init-param


I uncommented it and now it works perfectly!

Thanks to you guys,


Fred


 Messages d´origine 
De: Jan Hoskens [EMAIL PROTECTED]
Date: Mardi, Août 3, 2004 8:29 am
Objet: Re: Encoding problems

 You may want to take a look at the wiki page: 
 http://wiki.apache.org/cocoon/RequestParameterEncoding
 I had this problem a while ago: 
 http://marc.theaimsgroup.com/?l=xml-cocoon-usersm=109100902605917w=2
 I'm wondering what the best solution is and which encoding is 
 preferred 
 for handling special characters or when UTF-8 / ISO 8859-1 
 should/could 
 be used.
 
 Kind Regards,
 Jan
 
 [EMAIL PROTECTED] wrote:
 
  FREDERIC MOSER wrote:
 
  Hi,
 
  I've got some encoding problems using the xhtml serializer, I don't
  really understand .
  (I use Mozilla on Win XP and my editor is set to use UTF-8)
 
 
  Part 1:
  ---
 
  I've got the following stylesheet:
  
 -- 
 
  ?xml version=1.0 encoding=UTF-8?
  xsl:stylesheet version=1.0
  xmlns:xsl= target=lhttp://www.w3.org/1999/XSL/Transform;
  xsl:output method=xml version=1.0 encoding=UTF-8 
  indent=no/
  xsl:template match=/
  html
  head
  titleplop/title
  link rel=stylesheet type=text/css 
  href=simple.css/
  meta http-equiv=Content-Type content=text/html;
  charset=UTF-8 /
  /head
  body
  h1Monographie ééé/h1
  div
  form method=post 
 action=ModifierMonographie ...
  
 -- 
 
 
  If I use : map:serialize type=html/, everything work but 
 the browser
  detect my encoding as IS0-8859-1 (because we can't encode HTML 
 4.01 as
  UTF-8 I guess??)
 
 
  Did you check in the components section of your sitemap.xmap how 
 the 
  serializers are configured?
 
  To supply HTML using UTF-8 you could use
  -
 - 
 
  map:serializer name=html mime-type=text/html; charset=utf-8
  logger=sitemap.serializer.html pool-grow=2
  pool-max=64 pool-min=2
  src=org.apache.cocoon.serialization.XMLSerializer
 doctype-public-//W3C//DTD XHTML 1.0 
  Strict//EN/doctype-public 
  doctype-system 

target=lhttp://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd/doctype-system

 
 omit-xml-declarationyes/omit-xml-declaration
 omit-namespacesyes/omit-namespaces
 encodingUTF-8/encoding
 indentyes/indent
  /map:serializer
  -
 - 
 
 
 
 
 
 ---
 --
 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: Encoding problems

2004-08-03 Thread Gerald Aichholzer
On Tue, 03 Aug 2004 11:02:43 +0200, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:
Jan Hoskens wrote:
You may want to take a look at the wiki page:  
http://wiki.apache.org/cocoon/RequestParameterEncoding
I had this problem a while ago:  
http://marc.theaimsgroup.com/?l=xml-cocoon-usersm=109100902605917w=2
I'm wondering what the best solution is and which encoding is preferred  
for handling special characters or when UTF-8 / ISO 8859-1 should/could  
be used.
I can't see any reason why not to use Unicode charset with UTF-8  
encoding only. It is supported by all common browsers ans allows you to  
use *all* Unicode http://www.ltg.ed.ac.uk/~richard/unicode-sample.html  
characters by just typing them into the source code.
Make sure that the charset information sent with HTTP header is  
compliant with the document's encoding.
Most browsers will use it for encoding input in forms.
I have a similar experience (and still no solution for it). All my
source XML-files are UTF-8 encoded. Coocon generates UTF-8 encoded
XHTML.
Mozilla and Firebird display the national characters correctly. But
Internet Explorer and Opera show only garbage instead of the special
characters.
My XHTML-serializer is configured as follows:
map:serializer mime-type=text/html name=xhtml ...
  doctype-public-//W3C//DTD XHTML 1.0 Strict//EN/doctype-public
  
doctype-systemhttp://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd/doctype-system
  encodingUTF-8/encoding
/map:serializer
All my XML-files contain the following directive:
?xml version=1.0 encoding=UTF-8
Aside from this I haven't implemented anything special regarding
character encoding.
Any help is appreciated,
thanx in advance,
Gerald
--
Using M2, Opera's revolutionary e-mail client: http://www.opera.com/m2/
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: Encoding problems

2004-08-03 Thread [EMAIL PROTECTED]
Gerald Aichholzer wrote:
On Tue, 03 Aug 2004 11:02:43 +0200, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:
Jan Hoskens wrote:
You may want to take a look at the wiki page:  
http://wiki.apache.org/cocoon/RequestParameterEncoding
I had this problem a while ago:  
http://marc.theaimsgroup.com/?l=xml-cocoon-usersm=109100902605917w=2
I'm wondering what the best solution is and which encoding is 
preferred  for handling special characters or when UTF-8 / ISO 8859-1 
should/could  be used.

I can't see any reason why not to use Unicode charset with UTF-8  
encoding only. It is supported by all common browsers ans allows you 
to  use *all* Unicode 
http://www.ltg.ed.ac.uk/~richard/unicode-sample.html  characters by 
just typing them into the source code.
Make sure that the charset information sent with HTTP header is  
compliant with the document's encoding.
Most browsers will use it for encoding input in forms.

I have a similar experience (and still no solution for it). All my
source XML-files are UTF-8 encoded. Coocon generates UTF-8 encoded
XHTML.
Mozilla and Firebird display the national characters correctly. But
Internet Explorer and Opera show only garbage instead of the special
characters.
Don't know exactly about Opera, but M$IE definitely doesn't evaluate
  ?xml version=1.0 encoding=...?.
Instead it wants to get the correct HTTP header's charset information.
--
Volkmar W. Pogatzki
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


RE: Cocoon 2.1.5.1 build fails under Windows 98SE

2004-08-03 Thread Perez Carmona, David

Maybe the JAVA_HOME environment variable doesn't point to the JDK root, but the JRE 
root.

 -Mensaje original-
 De: Trevor Turton [mailto:[EMAIL PROTECTED]
 Enviado el: martes, 03 de agosto de 2004 11:02
 Para: [EMAIL PROTECTED]
 Asunto: Cocoon 2.1.5.1 build fails under Windows 98SE







 I downloaded Cocoon 2.1.5.1 onto Windows 98SE with
 j2sdk1.4.1_01 installed
 and ran the Cocoon build.bat, with results as shown in the console log
 appended.  Build expects to find tools.jar in
 %JAVA_HOME%\JRE\lib\, but
 it's actually in %JAVA_HOME%\lib\.  I tried copying all jars
 from lib into
 JRE\lib and the build got a bit further and then failed.  The
 console log
 includes an echo of %JAVA_HOME% and a dir of
 %JAVA_HOME%\lib\tools.jar to
 show what's there.

 Trevor Turton

 D:\Downloads\Java\Cocoon\cocoon-2.1.5.1build.bat
 Bad command or file name
 Bad command or file name
 Bad command or file name
 Bad command or file name
 Bad command or file name

 Syntax error
 Unable to locate tools.jar. Expected to find it in
 D:\JAVA\J2SDK1.4.1_01\JRE\lib\tools.jar
 Buildfile: build.xml

 prepare:
 ==
  Apache Cocoon 2.1.5.1 [1999-2004]
 ==
  Building with Apache Ant version 1.6.1 compiled on February 12 2004
 --
  Using build file D:\Downloads\Java\Cocoon\cocoon-2.1.5.1\build.xml
 --
  Compiler options:
- debug . [on]
- optimize .. [on]
- deprecation ... [off]
 ==

 compile-core:
 Compiling 1 source file to
 D:\Downloads\Java\Cocoon\cocoon-2.1.5.1\build\cocoon-2.1.5.1\mocks

 BUILD FAILED
 D:\Downloads\Java\Cocoon\cocoon-2.1.5.1\tools\targets\compile-
 build.xml:49:
 Unable to find a javac compiler;
 com.sun.tools.javac.Main is not on the classpath.
 Perhaps JAVA_HOME does not point to the JDK

 Total time: 5 seconds

 D:\Downloads\Java\Cocoon\cocoon-2.1.5.1echo %JAVA_HOME%
 d:\java\j2sdk1.4.1_01

 D:\Downloads\Java\Cocoon\cocoon-2.1.5.1dir %JAVA_HOME%\lib\tools.jar

  Volume in drive D is DATA
  Volume Serial Number is 401A-DD91
  Directory of D:\Java\j2sdk1.4.1_01\lib

 TOOLSJAR 4,926,685  04-26-04  4:14p tools.jar
  1 file(s)  4,926,685 bytes
  0 dir(s)4,601.28 MB free



 The information transmitted in this e-mail is intended only
 for the person or entity to which it is addressed and may
 contain confidential and/or privileged material. Any review,
 retransmission, dissemination or other use of, or taking of
 any action in reliance upon this information by persons or
 entities other than the intended recipient is prohibited. If
 you received this in error, please contact the sender and
 delete the material from your computer.

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


 *
 Este correo ha sido procesado por el antivirus del Grupo FCC.
 *


*
Este correo ha sido procesado por el Antivirus del Grupo FCC
*

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



Re: Flow : Accessing Repeater Rows value in Flow

2004-08-03 Thread oceatoon
Hi Bruno 

Sorry for not being to clear, 
Yes, I'm in the Flow 
wid = form.getWidget();
//houseuploads is my repeater
//path would be the upload widget I want to retreive the content off
wid.houseuploads.getRow(0).getValue();  (return = null)
wid.houseuploads.getRow(0).path.getValue();  (also return = null)
wid.houseuploads.getSize();  (return = null)

???
It's probably in the way I manipulate the repeater ???
would you do this in the Java??
Thanks 

Bruno Dumon wrote:

 On Mon, 2004-08-02 at 17:21, oceatoon wrote:
 Hi
 
 I found a post POPUALTING SELECTIONLISTS INA REPEATER FROM FLOW  where
 a similar question was asked but I can't seem to get Joergs
 technique(getRow before getting the value) to function.
 
 my repeater only contains an upload widget (minimum one so Row(0) allways
 exists, with add and delete). Then in my Flow, I need to retreive the
 value of the uploaded file from the widget to move it around.
 
 wid = handleForm(masterform, forms/, document);
 
 //I'd like to retreive the value
 wid.houseuploads.getRow(0).getValue();
 
  But this doesn't seem to work allways returns null
 
From the wid.houseuploads notation I'd assume you're using the
 javascript-wrapped variant of the widget tree, which has a different
 API.
 
 Also, do I have run through the whole repeater or is there a size or
 length method associated to now how many entries have been submitted?
 
 For the java API, this can be retrieved with the method getSize() of the
 repeater.
 
 I think you can find the javascript-equivalents of these in the samples.
 



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



Re: Flow : Accessing Repeater Rows value in Flow

2004-08-03 Thread Bruno Dumon
Hi oceatoon,

On Tue, 2004-08-03 at 12:56, oceatoon wrote:
 Hi Bruno 
 
 Sorry for not being to clear, 
 Yes, I'm in the Flow 
 wid = form.getWidget();
 //houseuploads is my repeater
 //path would be the upload widget I want to retreive the content off
 wid.houseuploads.getRow(0).getValue();  (return = null)
 wid.houseuploads.getRow(0).path.getValue();  (also return = null)
 wid.houseuploads.getSize();  (return = null)
 
 ???
 It's probably in the way I manipulate the repeater ???

I don't have enough information to give an exact answer. If you could
tell what Form.js you import and what Cocoon version you're using I
might be able to help.

 would you do this in the Java??

nope, with Java API I mean the native API of the widgets, which is
transparently available in javascript.

-- 
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: Flow : Accessing Repeater Rows value in Flow

2004-08-03 Thread Derek Hohls
What about:

model = form.getModel();
file = model.houseuploads[0];  //or i for any row...
noOfRows = model.houseuploads.length - 1; //zero based array

 [EMAIL PROTECTED] 2004/08/03 12:56:30 PM 
Hi Bruno 

Sorry for not being to clear, 
Yes, I'm in the Flow 
wid = form.getWidget();
//houseuploads is my repeater
//path would be the upload widget I want to retreive the content off
wid.houseuploads.getRow(0).getValue();  (return = null)
wid.houseuploads.getRow(0).path.getValue();  (also return = null)
wid.houseuploads.getSize();  (return = null)

???
It's probably in the way I manipulate the repeater ???
would you do this in the Java??
Thanks 

Bruno Dumon wrote:

 On Mon, 2004-08-02 at 17:21, oceatoon wrote:
 Hi
 
 I found a post POPUALTING SELECTIONLISTS INA REPEATER FROM FLOW 
where
 a similar question was asked but I can't seem to get Joergs
 technique(getRow before getting the value) to function.
 
 my repeater only contains an upload widget (minimum one so Row(0)
allways
 exists, with add and delete). Then in my Flow, I need to retreive
the
 value of the uploaded file from the widget to move it around.
 
 wid = handleForm(masterform, forms/, document);
 
 //I'd like to retreive the value
 wid.houseuploads.getRow(0).getValue();
 
  But this doesn't seem to work allways returns null
 
From the wid.houseuploads notation I'd assume you're using the
 javascript-wrapped variant of the widget tree, which has a different
 API.
 
 Also, do I have run through the whole repeater or is there a size
or
 length method associated to now how many entries have been
submitted?
 
 For the java API, this can be retrieved with the method getSize() of
the
 repeater.
 
 I think you can find the javascript-equivalents of these in the
samples.
 



-
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]



forming new url with a parameter set

2004-08-03 Thread qMax
Hi.

How it would be better to perform following task:
for given url (requestedURI) i need to form new url with single
parameter added or changed, and all other left untouched.

Egg:
http://mysite/foo/bar/stuff.html?view=printfriendlylang=ruslang=foomode=detailed
and i want to form new URL:
http://mysite/foo/bar/stuff.html?view=printfriendlylang=ruslang=foomode=brief
but actually - i need several urls with all possible values of mode
parameter.

Currently, i do it in 184-lined XSLT stylesheet, but all possible parameters
should be hardcoded into this XSLT.

Any better solutions ?

-- 
 qMax


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



Re: HTMLArea in a table

2004-08-03 Thread Ugo Cei
Il giorno 03/ago/04, alle 11:01, [EMAIL PROTECTED] ha scritto:
Hi
I modified the HTMLArea example form template using a table.
The head (buttons) is displayed but not the textArea (using IE 6)...
Suggestions of what can be wrong are welcome.
It's a bug in IE6. I investigated a little on the project's forums 
(http://dynarch.com/htmlarea/) and at last I gave up and put all my 
textareas outside tables. In the meantime, I'm trying to convince all 
my customers to switch to Firefox, but it isn't easy ;-).

--
Ugo Cei - http://beblogging.com/


smime.p7s
Description: S/MIME cryptographic signature


Re: HTMLArea in a table

2004-08-03 Thread Derek Hohls
Ugo

Unfortunate news as it effectively renders this component 
unusable for general access sites (80% of the web browsers
are IE5 or IE6) UNLESS we can try using divs for layout ..
anyone want to test this??

Derek

 [EMAIL PROTECTED] 2004/08/03 02:13:02 PM 
Il giorno 03/ago/04, alle 11:01, [EMAIL PROTECTED] ha scritto:

 Hi

 I modified the HTMLArea example form template using a table.
 The head (buttons) is displayed but not the textArea (using IE 6)...
 Suggestions of what can be wrong are welcome.

It's a bug in IE6. I investigated a little on the project's forums 
(http://dynarch.com/htmlarea/) and at last I gave up and put all my 
textareas outside tables. In the meantime, I'm trying to convince all 
my customers to switch to Firefox, but it isn't easy ;-).

-- 
Ugo Cei - http://beblogging.com/

-- 
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]



Passing a pipeline exception\error to an error handler function?

2004-08-03 Thread Thomas Kjeldahl Nilsson
Hello all,
I'm writing some cocoon error handling for my project, and I'm a little 
stumped here. I've got a single error handle now, looking like this:

map:handle-errors
   map:generate src=documents/html/cocoon_error.html/
   map:serialize/
/map:handle-errors
What I'd like to do is call a flowscript function called errorFlow
which does some logging and other misc. logic before sending a 
jxtemplate page with the final, prettily formatted and translated error 
message. I need to pass the original exception object to this flowscript 
in order to do this. In other words I'd like something like this:

map:handle-errors
   map:call function=errorFlow
   map:parameter name=exceptionObject value=[exceptionObject]/
   /map:call
/map:handle-errors
So the million dollar question is: How do I get and pass the original 
exception object to the flowscript?

Thomas Kjeldahl Nilsson
Oslo, Norway
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re[2]: Does cocoon support xq files?

2004-08-03 Thread qMax
Tuesday, August 3, 2004, 2:08:02 PM, [EMAIL PROTECTED] wrote:

TL Example of an xq file does like this as shown below:

TL xquery version 1.0;

cocoon supports XUpdate files via XMLDB transformer.
these XUpdate can be applied to aby xmldb (either eXist or xindice)
via xmldb protocol.

-- 
 qMax


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



i18n:attr Problem -- can't translate the label of a button from an upload widget

2004-08-03 Thread Bald, Michael
Hi all,
I hope someone can help me with this...

My problem: 
I want to translate the label of buttons. I don't have any problems with the 
tanslation of normal buttons. The only exception is the button of the upload widget 
(Isn't it possible to configure the button in any way?)!!! 


I went through the Mail archives, the FAQs and the internet, but I didn't find any 
hint. :((

I hope someone can help me with this:

form2_template.xsp:
...
td valign=top
ft:widget id=upload value=search i18n:attr=value   
 fi:styling size=31 
style=BACKGROUND-COLOR: yellow/ 
   /ft:widget
/td
...

messages_en.xml
...
message key=searchSearch.../message 
...

Greetings 

Michael (from Germany)

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



(newbie question) xmldb from flowscript

2004-08-03 Thread qMax
Hi.

Is there a way to access and update xmldb from flowscript ?

I'm not experienced with avalon framework and all cocoon java background.
But i guess this should be enough simple with help of using cocoon components
directly from script.


-- 
 qMax


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



Re: Passing a pipeline exception\error to an error handler function?

2004-08-03 Thread Bruno Dumon
On Tue, 2004-08-03 at 14:50, Thomas Kjeldahl Nilsson wrote:
 Hello all,
 
 I'm writing some cocoon error handling for my project, and I'm a little 
 stumped here. I've got a single error handle now, looking like this:
 
 map:handle-errors
 map:generate src=documents/html/cocoon_error.html/
 map:serialize/
 /map:handle-errors
 
 What I'd like to do is call a flowscript function called errorFlow
 which does some logging and other misc. logic before sending a 
 jxtemplate page with the final, prettily formatted and translated error 
 message. I need to pass the original exception object to this flowscript 
 in order to do this. In other words I'd like something like this:
 
 map:handle-errors
 map:call function=errorFlow
 map:parameter name=exceptionObject value=[exceptionObject]/
 /map:call
 /map:handle-errors
 
 So the million dollar question is: How do I get and pass the original 
 exception object to the flowscript?

Using map:parameter you can only supply string values, so that wouldn't
work.

The exception (throwable) object is available in the objectModel, and
can be retrieved from it using ObjectModelHelper.getThrowable(). I don't
think there's a proper way to access this from flowscript, though there
are a variety of workarounds.

-- 
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: Passing a pipeline exception\error to an error handler function?

2004-08-03 Thread Thomas Kjeldahl Nilsson

The exception (throwable) object is available in the objectModel, and
can be retrieved from it using ObjectModelHelper.getThrowable(). I don't
think there's a proper way to access this from flowscript, though there
are a variety of workarounds.
Hmm, isn't the whole object model accessible from the flowscripts?
If not, do you have any particular suggestions\hints for workarounds?
regards,
Thomas Kjeldahl Nilsson
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: Passing a pipeline exception\error to an error handler function?

2004-08-03 Thread Bruno Dumon
On Tue, 2004-08-03 at 16:15, Thomas Kjeldahl Nilsson wrote:
  
  The exception (throwable) object is available in the objectModel, and
  can be retrieved from it using ObjectModelHelper.getThrowable(). I don't
  think there's a proper way to access this from flowscript, though there
  are a variety of workarounds.
  
 
 Hmm, isn't the whole object model accessible from the flowscripts?

This would suprise me.

 If not, do you have any particular suggestions\hints for workarounds?

I'm not sure what the easiest would be. One possible way is to make an
action that puts the throwable object in a request attribute.

-- 
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: (newbie question) xmldb from flowscript

2004-08-03 Thread Brent Johnson
Umm - I think you can just write a Java class that accesses your xmldb
and then make calls to that directly from flowscript.

Hope this helps,

- Brent

On Tue, 3 Aug 2004 20:47:37 +0700, qMax [EMAIL PROTECTED] wrote:
 Hi.
 
 Is there a way to access and update xmldb from flowscript ?
 
 I'm not experienced with avalon framework and all cocoon java background.
 But i guess this should be enough simple with help of using cocoon components
 directly from script.
 
 --
  qMax
 
 -
 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: Flow : Accessing Repeater Rows value in Flow

2004-08-03 Thread oceatoon
Nop 
I haven't seen getModel() as part of the Javascript 
specification of the Form Object ?? Is it? 
I tried it out and get an 
Avalon.Excepetion:
org.apache.avalon.framework.CascadingRuntimeException: getModel is not a
function

The getRow(int) solution seems to be a good path but I tried about all I
could think off in semantics but I simply don't have it right ... 
Thanks for the try Derek


 What about:
 
 model = form.getModel();
 file = model.houseuploads[0];  //or i for any row...
 noOfRows = model.houseuploads.length - 1; //zero based array
 


 [EMAIL PROTECTED] 2004/08/03 12:56:30 PM 
 Hi Bruno
 
 Sorry for not being to clear,
 Yes, I'm in the Flow
 wid = form.getWidget();
 //houseuploads is my repeater
 //path would be the upload widget I want to retreive the content off
 wid.houseuploads.getRow(0).getValue();  (return = null)
 wid.houseuploads.getRow(0).path.getValue();  (also return = null)
 wid.houseuploads.getSize();  (return = null)
 
 ???
 It's probably in the way I manipulate the repeater ???
 would you do this in the Java??
 Thanks
 
 Bruno Dumon wrote:
 
 On Mon, 2004-08-02 at 17:21, oceatoon wrote:
 Hi
 
 I found a post POPUALTING SELECTIONLISTS INA REPEATER FROM FLOW 
 where
 a similar question was asked but I can't seem to get Joergs
 technique(getRow before getting the value) to function.
 
 my repeater only contains an upload widget (minimum one so Row(0)
 allways
 exists, with add and delete). Then in my Flow, I need to retreive
 the
 value of the uploaded file from the widget to move it around.
 
 wid = handleForm(masterform, forms/, document);
 
 //I'd like to retreive the value
 wid.houseuploads.getRow(0).getValue();
 
  But this doesn't seem to work allways returns null
 
From the wid.houseuploads notation I'd assume you're using the
 javascript-wrapped variant of the widget tree, which has a different
 API.
 
 Also, do I have run through the whole repeater or is there a size
 or
 length method associated to now how many entries have been
 submitted?
 
 For the java API, this can be retrieved with the method getSize() of
 the
 repeater.
 
 I think you can find the javascript-equivalents of these in the
 samples.
 
 
 
 
 -
 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]



SendMailTransformer session issue

2004-08-03 Thread Rui Alberto L.
I all,

I need to use SendMailTransformer to send the user the current
page that he/she is viewing.
To do this, I'm doing:

email:sendmail
 ...
email:attachment name=Your page
  mime-type=text/html
  src=cocoon:/display_user_page/
...
/email:sendmail

I'm using cookies to identify the user session, and the
target cocoon:/display_user_page uses user session values.

It looks like SendMailTransformer ignores this and just performs
an http request as another new different client! (JSESSION id
cookie is not sent)

Does anyone would like to suggest an approach to this problem?
Thanks for any help.
Rui



-- 
Rui Alberto L. Gonalves [EMAIL PROTECTED]
PT Inovao


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



Re: Flow : Accessing Repeater Rows value in Flow

2004-08-03 Thread oceatoon
Hi Bruno

I'm using V2 Form.js on Cocoon 2.2.0 
Thanks fo ryour help
Tibor

Bruno Dumon wrote:

 Hi oceatoon,
 
 On Tue, 2004-08-03 at 12:56, oceatoon wrote:
 Hi Bruno
 
 Sorry for not being to clear,
 Yes, I'm in the Flow
 wid = form.getWidget();
 //houseuploads is my repeater
 //path would be the upload widget I want to retreive the content off
 wid.houseuploads.getRow(0).getValue();  (return = null)
 wid.houseuploads.getRow(0).path.getValue();  (also return = null)
 wid.houseuploads.getSize();  (return = null)
 
 ???
 It's probably in the way I manipulate the repeater ???
 
 I don't have enough information to give an exact answer. If you could
 tell what Form.js you import and what Cocoon version you're using I
 might be able to help.
 
 would you do this in the Java??
 
 nope, with Java API I mean the native API of the widgets, which is
 transparently available in javascript.
 



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



Re: map:redirect-to...

2004-08-03 Thread Sonny Sukumar
Alright, I finally isolated the problem: it's Mozilla Firebird 0.7!  It has 
a bizarre problem where it sends 2 requests when I only click once.  And 
somehow this only occurs when I use internal redirects within Cocoon.  Go 
figure.

I verified that it works correctly in both KDE Konqueror on RedHat Linux 7.3 
and IE6 on Windows XP.

Yeah, so I have no idea how to fix the Mozilla problem without an upgrade of 
the browser itself.  Oh well. sigh

Thanks again for your help,
Sonny
From: John L. Webber [EMAIL PROTECTED]
Reply-To: [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Subject: Re: map:redirect-to...
Date: Thu, 29 Jul 2004 09:18:43 +0200
Hi Sonny,
The only other thing I can suggest trying is to reproduce the bug with an 
alternate matcher, using different redirect resources and a different 
action. If the bug doesn't happen then, try swapping in your actual 
resources one at a time, and then your action. Something like:

map:match pattern=secure/reallySimpleTest
  map:act type=always-succeeds
map:redirect-to uri=cocoon:/pageExists1/
  /map:act
  map:redirect-to uri=cocoon:/pageExists2/
/map:match
If that works as expected (i.e. no bug), try replacing the first redirect 
with your actual redirect. Of course, you'll have to create the new 
resources first!

Good luck,
John
Sonny Sukumar wrote:
Hey John,
I took your advice and spent some time culling through sitemap.log and 
discovered that BOTH redirects are taking place when I use internal 
redirects...it's just that the test failed redirect happens second, so I 
always see that result page (even though the action's operations in 
modifying the database, etc. are performed successfully).

Why this happens is still a mystery to me, but here's the sitemap log info 
showing this:

INFO(2004-07-28) 10:47.42:387   [sitemap] (/secure/doTest) 
http8443-Processor2/RedirectToURINode: Redirecting to 
'cocoon:/showTestSucceededPage' at 
file:/usr/local/tomcat/webapps/cocoon/sitemap.xmap:1750:62

INFO(2004-07-28) 10:47.42:388   [sitemap] (/secure/doTest) 
http8443-Processor2/ForwardRedirector: Redirecting to 
'cocoon:/showTestSucceededPage'

INFO(2004-07-28) 10:47.42:711   [sitemap] (/secure/doTest) 
http8443-Processor2/RedirectToURINode: Redirecting to 
'cocoon:/showTestFailedPage' at 
file:/usr/local/tomcat/webapps/cocoon/sitemap.xmap:1755:68

INFO(2004-07-28) 10:47.42:712   [sitemap] (/secure/doTest) 
http8443-Processor2/ForwardRedirector: Redirecting to 
'cocoon:/showTestFailedPage'

So I then tried--just for the heck of it--putting an html serializer right 
after the first redirect like this:

map:match pattern=secure/doTest
 map:act type=perform-test
   !-- Test succeeded. --
   map:redirect-to uri=cocoon:/showTestSucceededPage/
   map:serialize type=html/
 /map:act
 !-- Test failed. --
 map:redirect-to uri=cocoon:/showTestFailedPage/
/map:match
And of course that didn't work either. :-)  Sooo...maybe there's a bug 
with internal redirects?

BTW, I'm using the absolute latest stable version of Cocoon (2.1.5.1) on 
Tomcat 4.1.30.  I upgraded just a few days ago...

Sonny
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
_
Don’t just search. Find. Check out the new MSN Search! 
http://search.msn.click-url.com/go/onm00200636ave/direct/01/

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


RE: SendMailTransformer session issue

2004-08-03 Thread Carsten Ziegeler
 
Rui Alberto L. Gonçalves wrote:
 
 I all,
 
 I need to use SendMailTransformer to send the user the 
 current page that he/she is viewing.
 To do this, I'm doing:
 
 email:sendmail
  ...
 email:attachment name=Your page
   mime-type=text/html
   src=cocoon:/display_user_page/ ...
 /email:sendmail
 
 I'm using cookies to identify the user session, and the 
 target cocoon:/display_user_page uses user session values.
 
 It looks like SendMailTransformer ignores this and just 
 performs an http request as another new different client! 
 (JSESSION id cookie is not sent)
 
 Does anyone would like to suggest an approach to this problem?
 Thanks for any help.
 Rui
 
I have currently no solution for this, but I can try to 
explain what is happening:

Usually, the cocoon protocol is resolved internally which means
if you use it, the request is handled internally and no new
http request is send. Of course, an internal request runs in
the same session as the original one.

Unfortunately, the cocoon protocol delivers by design XML, to
be more precise the XML send by the last transformer before
it is feed into the serializer.
Therefore if you want to create a PDF attachment, using the
cocoon protocol would simply fail. You wouldn't get PDF
but XSL:FO which is not what you want :(

Therefore the sendmail transformer rewrites the internal
cocoon protocol to an external one in order to run the correct
serializer at the end.

I think it is possible to append the session id or to add 
a cookie to the request, but it is not the same client! It is
the server that acts now as the client. If your servlet engine
verifies this, it won't work even if you would append 
the information.

Now, a possible solution would be to either extend or create
a new protocol that works the same way as the cocoon protocol
but doesn't always deliver XML. It would use the correct
serializer at the end and offer a byte stream instead of sax
events.

Carsten


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



getting rid of SunBow debugger in Tomcat?

2004-08-03 Thread Lars Huttar
Hi all,

I feel dumb: I set up something and can't figure
out how to un-set it up.
Here's the deal:
I have Cocoon 2.1.2 running under Tomcat 4.1.
I installed Sunbow (http://radio.weblogs.com/0108489/)
with its XSLT tracer for use in Eclipse.
In order to make it work, I did something to Tomcat
to make it run in debug mode. Now I want to run Tomcat
not-in-debug-mode, for performance reasons, and I can't
make it happen.

I thought that all I had done was add the following to
Tomcat's bin/catalina.bat:
 SET CATALINA_OPTS=-server -Xdebug -Xnoagent -Djava.compiler=NONE
   -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=8000

so I commented that out.
But when I run Tomcat/Cocoon, as soon as I run a Cocoon request
URL in the browser, the Tomcat shell window shows the message
  sunBow Debugger (C) sn AG activated.

I've searched through the Tomcat and Cocoon config files trying
to find anything that turns this on, but no luck.
I also looked in the Sunbow documentation but couldn't find
anything relevant.
I found instructions on configuring Eclipse to use sunBow,
but I'm not running Eclipse at the moment.

Any hints?

Thanks,
Lars


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



Re: Flow : Accessing Repeater Rows value in Flow

2004-08-03 Thread oceatoon
This is a Bug !!
The problem comes from the fact that the widget in my repeater is an upload
widget cause I tried adding a field widget and it works fine. otherwise the
way to access these fields are 
form.getWidget().repeaterName.getRow(0).widgetName.value (for row 0)

Doesn't change my needs, if anybody knows how I can extract this file name
from my repeater , I'd be more than gratefull...

Thanks 
Tibor

posté comme article et comme courrier

oceatoon wrote:

 Hi Bruno
 
 I'm using V2 Form.js on Cocoon 2.2.0
 Thanks fo ryour help
 Tibor
 
 Bruno Dumon wrote:
 
 Hi oceatoon,
 
 On Tue, 2004-08-03 at 12:56, oceatoon wrote:
 Hi Bruno
 
 Sorry for not being to clear,
 Yes, I'm in the Flow
 wid = form.getWidget();
 //houseuploads is my repeater
 //path would be the upload widget I want to retreive the content off
 wid.houseuploads.getRow(0).getValue();  (return = null)
 wid.houseuploads.getRow(0).path.getValue();  (also return = null)
 wid.houseuploads.getSize();  (return = null)
 
 ???
 It's probably in the way I manipulate the repeater ???
 
 I don't have enough information to give an exact answer. If you could
 tell what Form.js you import and what Cocoon version you're using I
 might be able to help.
 
 would you do this in the Java??
 
 nope, with Java API I mean the native API of the widgets, which is
 transparently available in javascript.




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



Sorting html tables dynamically

2004-08-03 Thread Anna Bikkina
Hi,

I have a cocoon portal appliation that displays information in html tables. I 
have to provide sorting of columns in this table to users. How can we do 
this? Can someone please shed some light on this and send me some code 
snippets.

Thanks,
Anna.


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



Re: [CForm] javascript validation doesn't work?

2004-08-03 Thread Phil Snowdon
Ok,  I found some references in the mailing list to this
functionality being removed at 2.1.5 in favour of widget
validators.
(http://marc.theaimsgroup.com/?l=xml-cocoon-usersm=108639582110249w=2)

So how do they work?  Anyone have a sample peice of code?

 Phil Snowdon 4/08/2004 9:08:51 a.m. 
Take this snippet from the samples.  Supposedly if the price is
less than one, then it will show a validation error.  It
doesn't.

 fd:validation
!-- This demonstrates form level validation --
fd:javascript
  var success = true;
  var price = widget.lookupWidget(dieselprice);
  if (price.value lt; 1) {
  price.setValidationError(new
Packages.org.apache.cocoon.forms.validation.ValidationError(It
can not be that low!, false));
  success = false;
  }
  
  // Must return true/false
  return success;
/fd:javascript
  /fd:validation

even simpler

  fd:validation
fd:javascript
  return false;
/fd:javascript
  /fd:validation

Which should always generate a validation error doesn't seems to
either.

Is this a known issue?  There's a comment in the Form.js code
// FIXME: Remove check for removed syntax later.
if (this.validator != undefined) {
throw Forms do not support custom javascript validators
anymore. Declare your validators in the form model file.;
}

Does this mean that we can't use javascript validadtors anymore.
 What does it mean by declaring your validators in the form model
file?

Cheers

Phil

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



Re: Flow : Accessing Repeater Rows value in Flow

2004-08-03 Thread oceatoon
Hi Joerg 

I still get a result null 
form.getWidget().houseuploads.getRow(0).getChild(path).value 
= returns null (path being my upload widget)
and the field widget in the same repeater returns its content ???

Another funny reaction is when I add an element to the repeater,all the
previously existent rows erase their upload widgets content and have to be
newly filled ???

The other problem I have, is the form.getWidget().houseuploads.size just
like in the form1 sample doesn't seem to work either ???

hope this sheds some light 
thanks for the help.
Tibor


Joerg Heinicke wrote:

 On 03.08.2004 21:41, oceatoon wrote:
 
 form.getWidget().repeaterName.getRow(0).widgetName.value (for row 0)
 
 Can you try
 form.getWidget().repeaterName.getRow(0).getChild(widgetName).value
 instead? The upload widget itself should not behave different than a
 field widget, but maybe the JS wrapper is broken for it.
 
 Joerg



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



Re: Flow : Accessing Repeater Rows value in Flow

2004-08-03 Thread Joerg Heinicke
On 04.08.2004 01:18, oceatoon wrote:
I still get a result null 
form.getWidget().houseuploads.getRow(0).getChild(path).value 
= returns null (path being my upload widget)
and the field widget in the same repeater returns its content ???

Another funny reaction is when I add an element to the repeater,all the
previously existent rows erase their upload widgets content and have to be
newly filled ???
The other problem I have, is the form.getWidget().houseuploads.size just
like in the form1 sample doesn't seem to work either ???
Something must be wrong ;-)
Can you post your form definition of the repeater and the flow script 
code where you do the tests?

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


CForms: configuration access via Java

2004-08-03 Thread Scott Yeadon
Hello,
Does anyone know how to access the cocoon-wide configuration values 
using the Java API? Also is it possible to get web.xml config values 
without an HttpServlet object (or get access to web.xml values within a 
listener)?

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


Where to store a hibernate session in Flow?

2004-08-03 Thread Joel McConaughy
I would like to open one hibernate session for each user session and 
close it when the session is invalidated or times out.  I can see how 
save the hibernate session in Flow using cocoon.session.setAttribute() 
and cocoon.session.getAttribute() however there doesn't seem to be a way 
to get notified when the session gets invalidated so I can close the 
hibernate session.   Is there a way to do this?  Thanks.

Joel

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


CForms: Validation via Java

2004-08-03 Thread Scott Yeadon
Hello,
The CForms doco states that custom validators can be written in Java, 
however I couldn't find any examples of this. How is the java class 
reference set up in the fd:validation element - I tried the java element 
(as per listener setup) however this is not recognised.

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


Re: Where to store a hibernate session in Flow?

2004-08-03 Thread Mark Lundquist
On Aug 3, 2004, at 6:20 PM, Joel McConaughy wrote:
I would like to open one hibernate session for each user session and 
close it when the session is invalidated or times out.  I can see how 
save the hibernate session in Flow using cocoon.session.setAttribute() 
and cocoon.session.getAttribute() however there doesn't seem to be a 
way to get notified when the session gets invalidated so I can close 
the hibernate session.   Is there a way to do this?
Hi Joel,
Just curious, why do you want the Hibernate session to have the same 
lifetime as the user session?  Typically, in a web application context 
a Hibernate session should be thought of as corresponding to a single 
HTTP request/reply.

See also this article: 
http://cocoon.apache.org/2.1/userdocs/forms/index.html

Actually, they make mention of the session-per-user-session 
anti-pattern at the end of that article...

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


Re: Where to store a hibernate session in Flow?

2004-08-03 Thread Joel McConaughy
Good to hear from you, Mark.  Actually, what I'd like to do is keep the 
session factory open during the course of either the session or 
application context.  Then I can just open and close sessions as needed 
-- hopefully providing a performance improvement.  If there really isn't 
any way to get notified when the session or application context get 
invalidated so I can close the factory, then they are pretty useless IMO.

As an alternative, I could write an HttpSessionListener implementation 
however since this is called by the container (configured in the web.xml 
file), I don't know how to access it from Flow.

This is one of those things that seems like it should be simple.  Any 
ideas?  Thanks in advance.

Mark Lundquist wrote:
On Aug 3, 2004, at 6:20 PM, Joel McConaughy wrote:
I would like to open one hibernate session for each user session and 
close it when the session is invalidated or times out.  I can see how 
save the hibernate session in Flow using 
cocoon.session.setAttribute() and cocoon.session.getAttribute() 
however there doesn't seem to be a way to get notified when the 
session gets invalidated so I can close the hibernate session.   Is 
there a way to do this?

Hi Joel,
Just curious, why do you want the Hibernate session to have the same 
lifetime as the user session?  Typically, in a web application context 
a Hibernate session should be thought of as corresponding to a single 
HTTP request/reply.

See also this article: 
http://cocoon.apache.org/2.1/userdocs/forms/index.html

Actually, they make mention of the session-per-user-session 
anti-pattern at the end of that article...

Cheers,
~ml
-
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]


CForms: collapsing repeaters

2004-08-03 Thread Scott Yeadon
Hello,
Is there a facility via the Java API to be able to make widgets hidden 
on redisplay of a page, e.g. for providing a facility for collapsing 
repeaters or treeview-type structures in a form? Although I could remove 
rows and keep the repeater info elsewhere that doesn't seem to be an 
ideal mechanism for achieving this!

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