Re: woody and content aggregation

2004-04-20 Thread Jan Hoskens
Title: woody and content aggregation



I'm not sure what you're meaning here, please give 
some more information (sitemap pieces, aggregation pipeline/display pipeline). 
Why do you refer to multiple forms on one page? Are you just meaning that you're 
aggregating a page and the display pipeline does not go through that 
aggregation?

(I'm not sure that I can help you, but anyway, more 
info is needed if someone otherreads your mail)

Kind Regards,
Jan

  - Original Message - 
  From: 
  Trevisani Andrea 
  To: 'cocoon_users' 
  Sent: Monday, April 19, 2004 5:15 
PM
  Subject: woody and content 
  aggregation
  
  I need a great help!! 
  I have a composite web page, combined with 
  map:aggregate. I have a great problem with a woody form: when Woody validates 
  the form and the the result is KO the flowscript invokes my display pipeline 
  but I can't display all the composite page, I get only the form
  I know that a solution exist for this 
  problem (multiple forms on a single page), please help me with an example 
  ... 
  Thanks (excuse me for my english 
  ...) 
  Andrea Trevisani 
  Wind Telecomunicazioni S.p.A. - 
  Direzione e Coordinamento di Enel S.p.A. Via Brunacci 36 - 30175 Marghera (VE) 
  Progettazione RF - Nord Est 
  Cell. 
  +39 328 7100204 Tel. Uff. +39 41 8293981 Fax +39 06 
  83175298 Fax2 +39 41 8293347 
  e-mail: 
  [EMAIL PROTECTED] 
  
  

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


RE: Link: Project: InvitoCMS - Web based WYSIWYG CMS

2004-04-20 Thread Derek Hohls
Thanks for all the info Horst; possibly someone who is 
German/English speaker may be interested in this project
and look to help support English-speaking Cocoon users as
well; after all, Cocoon is designed to handle internationalisation!

Derek

 Horst Rechner [EMAIL PROTECTED] 2004/04/19 08:56:34 PM 
 
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Hello Derek,

I am one of the programmers still active on the InvitoCMS project, and Robert 
forwarded me your e-mail. Unfortunately there was a mixup since Robert did not want 
his mail to end up on the cocoon user mailinglist. Anyhow, to answer your questions:

 Competition for Lenya?

We did not think so, when we started development. Since cocoon is a web dev framework, 
we thought that the only thing the cocoon community could agree on would be a cms 
framework, which never was our goal. Like we found out later (when reading more about 
it) InvitoCMS seems like kind of a competition to it.

 For those us whose German 
 is rusty to nonexistent, it would be useful to be able
 to view this site in English - for example, I assume

We especially wanted to encurage german developers to the use of cocoon (and our 
content management system), so we decided pretty early in the development stages, that 
the entire code comments and documentation should be in german. Accepting the fact 
that this might be problematic to cocoon users whose German is rusty to nonexistent.

Please do not interprete this as cutting out the english speakers, but more as trying 
to give german developers a port who want to dive into cocoon based cms systems. Since 
our site will disect cocoon 2.0 along with our cms (at least that is the plan) this 
hopefully will have a positive side effect: adding more developers to the worldwide 
cocoon community.

 this is an OS project, but under what license?

It is. At the moment: GPL @ Sourceforge. But we want to change the license to the 
Bremer License which is a specialized version of the GPL tailored towards the german 
legal system (and limiting the responsibility for the developers).

Regards, Horst

P.S. I am newly subscribed to the cocoon user mailinglist, and therefore cannot reply 
to your mailinglist question with the appropriate backreference (otherwise the thread 
in the archive would probably be broken, wouldn't it?). I would appreciate it, if you 
could forward this mail as a reply to your question in my name. Thank you.

- -Original Message-
From: Derek Hohls [mailto:[EMAIL PROTECTED] 
Sent: Monday, April 19, 2004 3:57 PM
To: [EMAIL PROTECTED]; Robert Soesemann
Subject: Re: Link: Project: InvitoCMS - Web based WYSIWYG CMS


Robert

Competition for Lenya?  For those us whose German
is rusty to nonexistent, it would be useful to be able
to view this site in English - for example, I assume
this is an OS project, but under what license?

Derek


 [EMAIL PROTECTED] 2004/04/19 12:20:54 PM 
http://www.invitocms.com/tiki-index.php 

Summary:

Intuitive browser-based content management system based on Cocoon featuring:
- - extensible XML-based content model
- - customizable content-type dependant XSL design templates
- - WYSIWYG editing mode
- - Windows-like Site Explorer
- - typical CMS approval process
- - numerous content import /export formats (e.g. RTF, Print View)
- - generation of navigation element (e.g overview pages, navigation tabs, article 
abstracts)
- - keyword-based content cross-selling (See also pages)
- - customizable design templates
.

- 
PS: Is there a way to edit an entry on Live Sites later on?

Regards

Robert Sösemann


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

-BEGIN PGP SIGNATURE-
Version: PGP 8.0

iQA/AwUBQIQgY15YwsB03X8BEQI+5wCfTqZR7jdEUmmLCxpQhMva1/n3F+EAn3Ld
JhnY5n1Zx4+GPvd/P7ojY7mU
=01HS
-END PGP SIGNATURE-




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



RE: Cocoon WebMail Client Application - java.lang.RuntimeException: org.xml.sax.SAXException:

2004-04-20 Thread Marot Laurent
many thanks

Laurent

-Message d'origine-
De : Joerg Heinicke [mailto:[EMAIL PROTECTED]
Envoyé : lundi 19 avril 2004 21:57
À : [EMAIL PROTECTED]
Objet : Re: Cocoon WebMail Client Application -
java.lang.RuntimeException: org.xml.sax.SAXException:


On 19.04.2004 21:29, Marot Laurent wrote:

 thanks a lot Joerg, i've upgrated from xalan 2.5.2 to 2.6.0 and it works fine !
 
 The other solution mentionned was to switch from UTF-8 to another encoding. where 
 can i do that. Sorry for stupid question but i'm totally newbie.

Somewhere in the root sitemap the serializer are configured:

map:serializers
   map:serializer name=html some-other-attributes=/
   map:serializer name=xml some-other-attributes=/
/map:serializers

and so on.

The encoding can be set (it defaults to UTF-8) by changing the 
serializer's configuration to:

   map:serializer name=xml some-other-attributes=
 encodingISO-8859-1/encoding
   /map:serializer

The element names here are the attribute names at an xsl:output element 
in XSLT.

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: cocoon under eclipse

2004-04-20 Thread Carmona Perez, David

I use Tomcat 4.1.x with Eclipse 2.1.x successfully.  For that I use the Sysdeo plugin: 
http://www.sysdeo.com/eclipse/tomcatPlugin.html .

-Mensaje original-
De: Flavio Palumbo [mailto:[EMAIL PROTECTED]
Enviado el: lunes, 19 de abril de 2004 17:10
Para: [EMAIL PROTECTED]
Asunto: Re: cocoon under eclipse



Hi Olivier,

thank you for the replay, but I overtook that phase ; in fact I found on
the mail archive a mail of yours with links to Wiki pages LoadInEclipse
and DebuggingCocoon; so I rebuilt my project following that documents
; unfortunately the built went fine, but when I tried to start jetty from
within eclipse, I always get an exception java.lang.NoClassDefFoundError:
Loader
Exception in thread main.
I configured jetty as an application following these notes, reported at
the bottom of the LoadInEclipse document :

- make sure ./tools/loader is on your eclipse classpath (it isn't by default)

- create an eclipse run configuration for Jetty Cocoon:

  - On configurations 'Main' tab use 'Loader' as the main class.

  - On the Arguments tab set:

- Program arguments: tools\jetty\conf\main.xml

- VM arguments: -Djava.endorsed.dirs=./lib/endorsed

-Dwebapp=./build/webapp

-Dorg.xml.sax.parser=org.apache.xerces.parsers.SAXParser
-Djetty.port= -Djetty.admin.port=8889
-Dhome=.
-Dloader.jar.repositories=./tools/jetty/lib,./lib/endorsed
-Dloader.main.class=org.mortbay.jetty.Server

Can you please help me ?

Thanks a lot

Flavio Palumbo



-- Original Message --
Reply-To: [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
From: Olivier Billard [EMAIL PROTECTED]
Subject: Re: cocoon under eclipse
Date: Mon, 19 Apr 2004 15:06:10 +0200


Hi Flavio,

It may come from a dependency on blocks
Check the block.properties if you didn't forget a block on what an other

block depends...

--
Olivier Billard


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





-
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: how to build webpage of growing length by cocoon

2004-04-20 Thread Yves Vindevogel
I use some DHTML to do that ...

Look at www.belgium-explorer.be.  Click on a letter in the list (sorry, site in dutch and french, but code in java ;)) )
I execute a script there to update the content of a DIV.  

You can do the same.  Dynamically change the content of your page.
All elements you need can be found in the script under /js/bex.js

On 20 Apr 2004, at 10:27, Lechael Han wrote:

Basically I want to create a page of growing length.
For example,
 first user select an item H from a droping list and then select some attributes for Item H,
Then user selects item B then select some attributes for item B.
and so on
I want a page with user's selections  up to now, as well as  future possible choices in a droping list
 
Then here is my question
1, I think some kind of loop is necessary in the pipeline.  am I right? Is there some kind of component in cocoon that can do this?
2. Or this can be done by several pipelines working together, but this way,   how can cocoon know the number of elements, and the number of attributes in every element  in the page up to now?
 
Thanks for your kind help!
Thanks

Met vriendelijke groeten,
Bien à vous,
Kind regards,

Yves Vindevogel
Implements

Mail: [EMAIL PROTECTED]  - Mobile: +32 (478) 80 82 91

Kempische Steenweg 206 - 3500 Hasselt - Tel-Fax: +32 (11) 43 55 76
Markt 18c  -  9700 Oudenaarde  -  Tel: +32 (55) 30 55 76

Web: http://www.implements.be
x-tad-smaller
First they ignore you.  Then they laugh at you.  Then they fight you.  Then you win.
Mahatma Ghandi./x-tad-smaller


Re: Newbie: Searching with html form parameters

2004-04-20 Thread David Swearingen
Nina:

I didn't see a reply to your post.  I'm relatively new to Cocoon but
can relate to your question and was considering this tonight.

Yes, if you're new to this environment it's going to be intimidating to
figure this out since yes, it's straightforward to do ith with a
relational db and servlet (I've done this).

Most of the experts on this board will probably tell you it's easy to
do this in Cocoon but of course they know how to do it.  What they mean
is it can be done with a few lines of code!  There's a difference
between easy and short.

Technically, I believe the answer entails a pipeline that scours the
directory for the file names, converting these to XML; next step in the
pipeline scours each file and extracts JUST the street element; next
step does the searching.  That's the highlevel approach.  You'll have
to spend a couple of hours learning what a pipeline is and matchers.

If you have thousands of files then for performance reasons you'd
probably want to batch (daily, hourly, whatever depending upon the
currency you need) the process of the first two steps above, and put
the results into a file that would look like this:

mydocs
 file name=foo1.xml street=elm/
 file name=foo2.xml street=maple/
 ...
/mydocs

then you would only have to search this file each time.  

This is just my thinking, from limited experience, but thought I'd put
my two cents in.  Like most things in Cocoon, seems there are numerous
solutions to each problem.

(I would have posted this to get others' feedback but I'm in the midst
of moving my list subscription to another email address so it was
difficult to do that.)

David







 
--- Nina Juliadotter [EMAIL PROTECTED] wrote:
 Hi everyone,
 
 Is there an obvious and reasonable simple way to search a XML
 repository (= a bunch
 of XML documents) using POST parameters supplied to by the user?
 
 What I have is an HTML form where the user can enter some search
 criteria and submit
 this, and get back all xml documents matching this (the documents all
 conform to a
 certain XML schema, so the elements in it are known). For example,
 there is an
 input type=text name=street where the user can enter the street
 name, and get
 back all XML documents that have a street element with the same
 value as the one
 supplied by the user.
 
 In a normal servlet/jdbc environment (relational database), this is
 so straight
 forward, but how would I ideally go about doing this in Cocoon? I've
 glanced at
 Xindice and Cocoon's Lucene, but it all seems so complicated that I'm
 starting to
 think I'm not looking in the right direction.
 
 Has anybody done something similar and can point me in the right
 direction?
 
 
 Thanks,
 Nina
 
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 





__
Do you Yahoo!?
Yahoo! Photos: High-quality 4x6 digital prints for 25¢
http://photos.yahoo.com/ph/print_splash

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



Re: Flow-Woody-Event-Woody... possible?

2004-04-20 Thread Steve Steinitz
Hello List,

Thank you for your reply to my colleague's query, Marc.

Marc Portier wrote:

not trying to subvert the relation between the form and it's
actions you should 'complete' the form and go onto the next one

change the action into:
 fd:submit id=remove action-command=remove 
   fd:labelRemove/fd:label
 /fd:submit

and then after the form.showForm you test what 'completed' the
form to decide on the next one to show:

 if (form.submitId == remove) {

 }

when looking for samples: see the 'switch' button in the aggregate
sample.

We couldn't find that example but here is what we've done:

fd:submit id=remove action-command=remove 
   fd:labelRemove/fd:label
/fd:submit

and in our xsp

wt:widget id=remove/

and in the flow

if (remove.equals(form.submitId)) 
{
...
}

This condition was never true so I logged the value of
form.submitid -- it was 'undefined'.

Is there anything else we need to do?

Thanks,

Steve


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



Re: how to build webpage of growing length by cocoon

2004-04-20 Thread laurent_rorive

Hi,

It is perhaps better if you use the
Woody capabilities (also known as Cocoon Forms) 

There you have possibilities to create
a kind of growing tables

Check in the cocoon samples :
PetStore

Laurent






Lechael Han [EMAIL PROTECTED]
20/04/2004 10:27
Please respond to users

To:
   [EMAIL PROTECTED]
cc:
   
Subject:
   how to build webpage of growing length
by cocoon


Basically I want to create a page of growing
length.
For example, 
first user select an item H from a droping
list and then select some attributes for Item H,
Then user selects item B then select some
attributes for item B.
and so on
I want a page with user's selections up
to now, as well as future possible choices in a droping list

Then here is my question
1, I think some kind of loop is necessary
in the pipeline. am I right? Is there some kind of component in cocoon
that can do this?
2. Or this can be done by several pipelines
working together, but this way,  how can cocoon know the number of
elements, and the number of attributes in every element in the page
up to now?

Thanks for your kind help!
Thanks


Re: Flow-Woody-Event-Woody... possible?

2004-04-20 Thread Joerg Heinicke
On 20.04.2004 09:44, Steve Steinitz wrote:
We couldn't find that example but here is what we've done:

fd:submit id=remove action-command=remove 
   fd:labelRemove/fd:label
/fd:submit

and in our xsp

wt:widget id=remove/

and in the flow

if (remove.equals(form.submitId)) 
{
...
}

This condition was never true so I logged the value of
form.submitid -- it was 'undefined'.
Is there anything else we need to do?
I had the same problem yesterday too:
http://marc.theaimsgroup.com/?l=xml-cocoon-devm=108238973125352w=4
and fixed it by changing the order of the form widgets in the definition.
Furthermore my form.submitId was also null at the end, while 
form.getSubmitWidget().getId() returned the correct value.

Does this help?

Joerg

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


Re: woody and content aggregation

2004-04-20 Thread laurent_rorive

Hi, 

I also do the same and it works correctly
:

Here is my aggregate page ( = a called
resource) 
==
!--
generate
a
page
by
merging
all
parts
making
up
a
page
--
  map:resource
name=show-simple-form
   map:act
type=locale
map:aggregate
element=PAGE
label=aftergenerator

map:part
src="">cocoon://internal-portal/top
element=TOP

strip-root=true
/

map:part
src="">cocoon://internal-portal/left

element=LEFT
strip-root=false
/

map:part
src="">{../page}
element=BODY

strip-root=false
/

map:part
src="">cocoon://internal-portal/bottom

element=BOTTOM
strip-root=false
/
/map:aggregate

 
map:transform
src="">{../style}
label=afterstyle
/


map:transform
type=translator
label=afteri18n
, search, print 

map:parameter
name=locale
value={locale}
/
/map:transform
!--
PAY
ATTENTION
--
!--
This
transformer
is
required
to
remove
the
comment
tag
at
the
end
of
the
pipeline
--
!--
We
have
to
do
that
because,
we
import
some
Notes
Content
in
the
XML
Stream
as
a
comment
--
!--
and
if
we
remove
the
comment
to
fast
,
we
will
lost
the
info
--
!--
So,
at
the
end
of
all
the
pipelines,
we
remove
the
comment
tag
--
map:transform
src="">context://stylesheets/system/mpe_clean_comment.xsl
label=content/map:transform
   
map:serialize
label=links,
content /
  
!--
For
Debug
--
!--
  

   map:serialize
type=xml/
  --

   /map:act
  /map:resource
=

An here is the woody call :


!--
Call
Tellus
Flow
--
   map:match
pattern=new
map:call
function=newTellUs
/  
   -- Call the flowscript
   /map:match
  
   
   !--
First
Call
to
Tell
us
is
the
Tell
us
creation
--
   map:match
pattern=new-display-pipeline

   map:call
resource=show-simple-form

 map:parameter
name=page
value=cocoon:/display-form/name=entry/
  !-- call an internal pipe to generate woody (see later)

 map:parameter
name=style
value=context://stylesheets/mpe_tellus.xsl/

   /map:call
   
   /map:match
   
   !--
After
the
submit
--
   map:match
pattern=new-success-pipeline

  map:call
resource=show-simple-form

   map:parameter
name=page
value=cocoon://internal-portal/tellus/success/

   map:parameter
name=style
value=context://stylesheets/mpe_simple.xsl/

   /map:call
   
   /map:match

=
Some internal pipe :


 map:pipeline
internal->true
type=caching-point

!--
Retrieve
and
Generate
the
Form
--
   map:match
pattern=display-form/name=*
map:act
type=locale
   map:generate
 src="">context://woody/tellus/forms/entry_template.xml
/
   map:transform
type=woody
label=afterwoody
/
   !--
REALLY
IMPORTANT
:
You
have
to
translate
the
woody
field,
validation
HERE
else
this
is
lost
--
   map:transform
type=translator
label=afteri18n
, search, print 

map:parameter
name=locale
value={locale}
/
/map:transform
   map:transform
src="">context://stylesheets/woody-main-styling.xsl
/
   
map:serialize
/
  /map:act
   /map:match


Here it is 

Hope it could help

Laurent







Jan Hoskens [EMAIL PROTECTED]
20/04/2004 08:11
Please respond to users

To:
   [EMAIL PROTECTED]
cc:
   
Subject:
   Re: woody and content aggregation


I'm not sure what you're meaning here, please
give some more information (sitemap pieces, aggregation pipeline/display
pipeline). Why do you refer to multiple forms on one page? Are you just
meaning that you're aggregating a page and the display pipeline does not
go through that aggregation?

(I'm not sure that I can help you, but anyway,
more info is needed if someone other reads your mail)

Kind Regards,
Jan
- Original Message - 
From: Trevisani
Andrea 
To: 'cocoon_users'

Sent: Monday, April 19, 2004 5:15 PM
Subject: woody and content aggregation

I need a great help!!

I have a composite web page, combined
with map:aggregate. I have a great problem with a woody form: when Woody
validates the form and the the result is KO the flowscript invokes my display
pipeline but I can't display all the composite page, I get only the form
I know that a solution exist for this
problem (multiple forms on a single page), please help me with an example
... 
Thanks (excuse me for my english ...)


Andrea Trevisani

Wind Telecomunicazioni S.p.A. - Direzione e Coordinamento di Enel S.p.A.

Via Brunacci 36 - 30175 Marghera (VE) 
Progettazione RF - Nord Est 
Cell.   +39 328
7100204 
Tel. Uff. +39 41
8293981 
Fax+39 06 83175298 
Fax2+39 41 8293347 
e-mail: [EMAIL PROTECTED] 


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


Re: Flow-Woody-Event-Woody... possible?

2004-04-20 Thread Marc Portier


Steve Steinitz wrote:
Hello List,

Thank you for your reply to my colleague's query, Marc.

Marc Portier wrote:


not trying to subvert the relation between the form and it's
actions you should 'complete' the form and go onto the next one
change the action into:
   fd:submit id=remove action-command=remove 
 fd:labelRemove/fd:label
   /fd:submit
and then after the form.showForm you test what 'completed' the
form to decide on the next one to show:
   if (form.submitId == remove) {

   }

when looking for samples: see the 'switch' button in the aggregate
sample.


We couldn't find that example but here is what we've done:

it's in cvs head
see here: 
http://cvs.apache.org/viewcvs.cgi/cocoon-2.1/src/blocks/forms/samples/aggregate/

fd:submit id=remove action-command=remove 
   fd:labelRemove/fd:label
/fd:submit

and in our xsp

wt:widget id=remove/

and in the flow

if (remove.equals(form.submitId)) 
{
...
}

This condition was never true so I logged the value of
form.submitid -- it was 'undefined'.
hm, checking for form.submitId should be behind the form.showForm, I 
take it you are using flowscript?

maybe you can send some more relevant portions of the flowscript and 
sitemap so I get a broader view

-marc=
--
Marc Portierhttp://outerthought.org/
Outerthought - Open Source, Java  XML Competence Support Center
Read my weblog athttp://blogs.cocoondev.org/mpo/
[EMAIL PROTECTED]  [EMAIL PROTECTED]
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: Newbie: Searching with html form parameters

2004-04-20 Thread laurent_rorive

Nina , 

Just us Lucene . This is
the search tool of Cocoon

Check the cocoon block 






David Swearingen [EMAIL PROTECTED]
20/04/2004 06:42
Please respond to users

To:
   [EMAIL PROTECTED], [EMAIL PROTECTED]
cc:
   
Subject:
   Re: Newbie: Searching with html form
parameters


Nina:

I didn't see a reply to your post. I'm relatively new to Cocoon but
can relate to your question and was considering this tonight.

Yes, if you're new to this environment it's going to be intimidating to
figure this out since yes, it's straightforward to do ith with a
relational db and servlet (I've done this).

Most of the experts on this board will probably tell you it's easy to
do this in Cocoon but of course they know how to do it. What they
mean
is it can be done with a few lines of code! There's a difference
between easy and short.

Technically, I believe the answer entails a pipeline that scours the
directory for the file names, converting these to XML; next step in the
pipeline scours each file and extracts JUST the street element; next
step does the searching. That's the highlevel approach. You'll
have
to spend a couple of hours learning what a pipeline is and matchers.

If you have thousands of files then for performance reasons you'd
probably want to batch (daily, hourly, whatever depending upon the
currency you need) the process of the first two steps above, and put
the results into a file that would look like this:

mydocs
 file name=foo1.xml street=elm/
 file name=foo2.xml street=maple/
 ...
/mydocs

then you would only have to search this file each time. 

This is just my thinking, from limited experience, but thought I'd put
my two cents in. Like most things in Cocoon, seems there are numerous
solutions to each problem.

(I would have posted this to get others' feedback but I'm in the midst
of moving my list subscription to another email address so it was
difficult to do that.)

David







 
--- Nina Juliadotter [EMAIL PROTECTED] wrote:
 Hi everyone,
 
 Is there an obvious and reasonable simple way to search a XML
 repository (= a bunch
 of XML documents) using POST parameters supplied to by the user?
 
 What I have is an HTML form where the user can enter some search
 criteria and submit
 this, and get back all xml documents matching this (the documents
all
 conform to a
 certain XML schema, so the elements in it are known). For example,
 there is an
 input type=text name=street where
the user can enter the street
 name, and get
 back all XML documents that have a street element with
the same
 value as the one
 supplied by the user.
 
 In a normal servlet/jdbc environment (relational database),
this is
 so straight
 forward, but how would I ideally go about doing this in Cocoon? I've
 glanced at
 Xindice and Cocoon's Lucene, but it all seems so complicated that
I'm
 starting to
 think I'm not looking in the right direction.
 
 Has anybody done something similar and can point me in the right
 direction?
 
 
 Thanks,
 Nina
 
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 







__
Do you Yahoo!?
Yahoo! Photos: High-quality 4x6 digital prints for 25¢
http://photos.yahoo.com/ph/print_splash

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




RE: Link: Project: InvitoCMS - Web based WYSIWYG CMS

2004-04-20 Thread Robert Soesemann
Oops, I didn't know a project submission email goes to the whole mailing list. 

As am not an active project member righjt now 
PLEASE DON'T REPLY TO THIS EMAIL. USE THE ADRESS [EMAIL PROTECTED] FOR FURTHER CONTACT 
to the InvitoCMS project. 

I forwarded your request to my collegues. They will answer your questions quickly.

Thanks for you interest.

Cheers 

Robert



-Original Message-
From: Derek Hohls [mailto:[EMAIL PROTECTED] 
Sent: Monday, April 19, 2004 15:57 PM
To: [EMAIL PROTECTED]; Robert Soesemann
Subject: Re: Link: Project: InvitoCMS - Web based WYSIWYG CMS


Robert

Competition for Lenya?  For those us whose German
is rusty to nonexistent, it would be useful to be able
to view this site in English - for example, I assume 
this is an OS project, but under what license?

Derek


 [EMAIL PROTECTED] 2004/04/19 12:20:54 PM 
http://www.invitocms.com/tiki-index.php 
 
Summary:
 
Intuitive browser-based content management system based on Cocoon featuring:
- extensible XML-based content model 
- customizable content-type dependant XSL design templates
- WYSIWYG editing mode
- Windows-like Site Explorer
- typical CMS approval process
- numerous content import /export formats (e.g. RTF, Print View)
- generation of navigation element (e.g overview pages, navigation tabs, article 
abstracts)
- keyword-based content cross-selling (See also pages)
- customizable design templates
.
 

PS: Is there a way to edit an entry on Live Sites later on?
 
Regards
 
Robert Sösemann


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



Re: for (...)

2004-04-20 Thread olivier demah
Jan Hoskens a écrit :

In your XSP you're not allowed to use   and other xml characters that
serve special purposes (you're still in xml while writing java!)
thus replace i  in for with i lt;   or set a CDATA section around it
so that xml will copy it literally.
 

oh ; yes i forgot that details ; thanks.

Kind Regards,
Jan
- Original Message - 
From: olivier demah [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, April 20, 2004 10:11 AM
Subject: XSP : for (...)

 

Hi,

When i submit a form which contains a select multiple ; i need to store
the selected datas in a table
so i try to do
?xml version=1.0 encoding=iso-8859-1?
xsp:page   xmlns:xsp= http://apache.org/xsp;
   xmlns:xsp-request= http://apache.org/xsp/request/2.0;
   xmlns:esql=http://apache.org/cocoon/SQL/v2;
   xmlns:cinclude=http://apache.org/cocoon/include/1.0;
root
cinclude:include src=cocoon:/admin_index.xml /
players
xsp:logic
String id_player= request.getParameter(id_player);
String[] id_club= request.getParameter(id_club);
int nbClub = id_club.length;
int i = 0;
for (i = 0; i  nbClub ; i++) {
   esql:connection
   esql:poolmy_pool/esql:pool
   esql:execute-query
   esql:queryINSERT INTO m_club_player (id_player,id_club)
VALUES (
   id_player = esql:parameter
type=stringxsp:exprid_player/xsp:expr/esql:parameter,
   id_club = esql:parameter
type=stringxsp:exprid_club[i]/xsp:expr/esql:parameter );
   /esql:query
   esql:error-results/
   esql:update-results
   esql:get-update-count/
   /esql:update-results
   /esql:execute-query
   /esql:connection
}
/xsp:logic
/players
/root
/xsp:page
i know i dont test if id_club.length  0 but anyway ; the previous code
just display :
org.apache.cocoon.ProcessingException: The content of elements must
consist of well-formed character data or markup.:
   

file:/home/fox_cocoon/build/webapp/vieira/admin/xsp/player.xsp:29:16:org.xml.sax.SAXParseException:
 

The content of elements must consist of well-formed character data or
markup.
and the line 29 is the for (i=0...
could not we do a for loop to execute multiple queries ?
do i have to merge to flow ? :-(
   



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


Re: Flow-Woody-Event-Woody... possible?

2004-04-20 Thread Marc Portier


Joerg Heinicke wrote:

On 20.04.2004 09:44, Steve Steinitz wrote:

We couldn't find that example but here is what we've done:

fd:submit id=remove action-command=remove 
   fd:labelRemove/fd:label
/fd:submit
and in our xsp
wt:widget id=remove/

and in the flow

if (remove.equals(form.submitId)) {
...
}
This condition was never true so I logged the value of
form.submitid -- it was 'undefined'.
Is there anything else we need to do?


I had the same problem yesterday too:
http://marc.theaimsgroup.com/?l=xml-cocoon-devm=108238973125352w=4
and fixed it by changing the order of the form widgets in the definition.
Furthermore my form.submitId was also null at the end, while 
form.getSubmitWidget().getId() returned the correct value.

Does this help?

they still would be faced with the fact that their event-handling tries 
to show another form (see the original message, your case was about 
validation, theirs is about event-handling that wants to call showForm)

I haven't tried it, but that's mainly cause I would never do that: IMHO 
it's not your form's event but the flow that should decide on next forms 
to show

I really don't know what the event-call on the continuations stack will 
do if you call showForm from inside the event-handling?
If someone does, I'm quite interested to hear about it.

regards,
-marc=
Joerg

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
--
Marc Portierhttp://outerthought.org/
Outerthought - Open Source, Java  XML Competence Support Center
Read my weblog athttp://blogs.cocoondev.org/mpo/
[EMAIL PROTECTED]  [EMAIL PROTECTED]
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


[i18n] Xalan replaces encoded characters with entities

2004-04-20 Thread Sjur Nørstebø Moshagen
Hello,

[I tried to Google, but could not find any references to the above; 
accept my apologies if this has been discussed before, and send me a 
pointer to that discussion]

I have the opposite problem of what Upayavira described a few days ago: 
all my XML documents are completely in UTF-8, but Cocoon outputs 
entities for many non-ascii characters. Although this does not create 
any badly formatted pages, it does increase the size of the output html 
file (most such utf-8 characters will take 2 bytes, whereas the 
entities regularly take 7 or more bytes), and seems both unneccessary 
and some extra work in an all-utf-8 context, both for the server and 
the client. As my site contains a lot of these characters, I would like 
to turn it off. But it doesn't seem to be possible:

After some searching I hunted down the following paragraph in the 
description for XalanJ 2.6.0 
(http://xml.apache.org/xalan-j/readme.html):

Other points of interest
inline: void.gif...
	 	For HTML output, Xalan-Java 2 outputs character entity references 
(copy; etc.) for the special characters designated in  Appendix A. 
DTDs of the XHTML 1.0: The Extensible HyperText Markup  Language. 
Xalan-Java 1.x, on the other hand, outputs literal characters for some 
of these special characters.
That is, it seems default behaviour, and I have found no Cocoon or 
other documentiation or tips to change it. Anyone can help me with 
this?

Sjur

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

Woody - XML binding - float datatype - problem found

2004-04-20 Thread Hubert Trzewik
I found a problem with binding data to woody form.

Example:
In this example binding works perfectly..

XML data for binding:
MyFactor55/MyFactor

Form definition:
wd:field id=myfactor
  wd:labelMy facor:/wd:label
  wd:datatype base=string/
/wd:field

But if we change datatype in definition to
wd:datatype base=float/
error shows up, that Cocoon expected float data and it recived string type..

Of course it's a string which should be parsed into float, but it's not.
Why? Is it my fault?


Please someone check it or give an advice (if it's my falut). Maybe it's a
case for Bugzilla.

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



Re: Woody - XML binding - float datatype - problem found

2004-04-20 Thread Marc Portier


Hubert Trzewik wrote:
I found a problem with binding data to woody form.

Example:
In this example binding works perfectly..
XML data for binding:
MyFactor55/MyFactor
Form definition:
wd:field id=myfactor
  wd:labelMy facor:/wd:label
  wd:datatype base=string/
/wd:field
But if we change datatype in definition to
wd:datatype base=float/
error shows up, that Cocoon expected float data and it recived string type..
Of course it's a string which should be parsed into float, but it's not.
Why? Is it my fault?
value-binding allows for specifying a string-to/from-datatype convertor:

wb:value id=myfactor path=MyFactor
  wd:convertor datatype=float /
/wb:value
this will require you to also declare the wd namespace

this convertor will be used to transform your datatype back to a string 
for the XML backend.

see:
- http://wiki.cocoondev.org/Wiki.jsp?page=WoodyBinding
- http://wiki.cocoondev.org/Wiki.jsp?page=WoodyDatatypeReference
HTH
-marc=
Please someone check it or give an advice (if it's my falut). Maybe it's a
case for Bugzilla.
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
--
Marc Portierhttp://outerthought.org/
Outerthought - Open Source, Java  XML Competence Support Center
Read my weblog athttp://blogs.cocoondev.org/mpo/
[EMAIL PROTECTED]  [EMAIL PROTECTED]
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Flowscript, Actions!?

2004-04-20 Thread beyaNet Consultancy
Hi,
ok, so I have been using actions thus far to perform things like login, and now discover the beauty and simplicity of flowscript. So why actions? Anyway, I want to convert an action I currently have to check a users login details to flowscript. So my question is, what do I need to do? My user class is of the getter and setter variety and in my sitemap I have the following code to read the user/password details into the action:

			map:match pattern=login>
map:act type=auth-login>
map:parameter name=handler value=beyarecords/>
map:parameter name=parameter_name value={request-param:user}/>
map:parameter name=parameter_password value={request-param:pass}/>
map:redirect-to uri=registerd_user_area/>
/map:act>
!-- authentication failed: -->
map:redirect-to uri=login.html/>
/map:match>


I now want to change this code so that it can read the values into a flowscript, which in turn queries a user object ( User user = User.getUser(userName, userPassword) ). If the user does not exist i want the user to be re-directed back to the login page, otherwise they are re-directed to my protected area:

			map:match pattern=registerd_user_area>
map:act type=auth-protect>
map:parameter name=handler value=beyarecords/> 
map:aggregate element=home>
map:part src=cocoon:/support/beya-menu/>
map:part src=cocoon:/support/contract-summary/>
map:part src=context://beyarecords/content/adv-xyz-01.xml/>
map:part src=cocoon:/support/banner/>
/map:aggregate>


map:transform type=xslt src=style/home-page.xsl/>
map:call resource=serialize/>
/map:act>
/map:match>


Of course I appreciate that those parts of my sitemap which used the map:act type=auth-protect would now need to be changed to reflect using a flowscript instead, something like:

map:call function=userLoggedIn/>??? In the above instance, how would I still utilise the map:aggregate???


Peter

cli:// offline-generation, how to avoid get-variables in the generated-filenames

2004-04-20 Thread Boris Althaus



hy all,

i'm working with the offline-generation of cocoon 
at the moment.
In my websites i have flash-movies which are 
initialized with get-variables.
The corresponding filenames are like 
my.swf_name=value.
Is there a way to avoid this by configuration, or 
is it nessesary to rename the files by ant.


Regards Boris




org.apache.avalon.framework.configuration.ConfigurationException: No languages defined!

2004-04-20 Thread beyaNet Consultancy
hi,
I have added the following lines of code to my sitemap, and am now getting the above mentioned error message:

map:flow-interpreters default=JavaScript/>

map:selector name=exception src=org.apache.cocoon.selection.XPathExceptionSelector>
exception name=invalid-continuation class=org.apache.cocoon.components.flow.InvalidContinuationException/>
exception class=java.lang.Throwable unroll=true/>
/map:selector>

map:flow language=javascript>
map:script src=flow/login.js/>
/map:flow>

map:match pattern=*.jx>
map:generate type=jx src=jx/{1}.jx/>
	map:serialize type=xhtml/>
/map:match>


map:match pattern=*.kont>
map:call continuation={1}/>
/map:match>

map:match pattern=invalidContinuation>
map:generate src=exceptions/invalidContinuation.xml/>
map:serialize type=xml/>
/map:match>


map:handle-errors>
map:select type=exception>
map:when test=invalid-continuation>
map:generate src=exceptions/invalidContinuation.html/>
map:serialize type=xhtml/>
/map:when>
/map:select>
/map:handle-errors>

What am I missing?

Peter

On 20 Apr 2004, at 10:45, beyaNet Consultancy wrote:

Hi,
ok, so I have been using actions thus far to perform things like login, and now discover the beauty and simplicity of flowscript. So why actions? Anyway, I want to convert an action I currently have to check a users login details to flowscript. So my question is, what do I need to do? My user class is of the getter and setter variety and in my sitemap I have the following code to read the user/password details into the action:

			map:match pattern=login>
map:act type=auth-login>
map:parameter name=handler value=beyarecords/>
map:parameter name=parameter_name value={request-param:user}/>
map:parameter name=parameter_password value={request-param:pass}/>
map:redirect-to uri=registerd_user_area/>
/map:act>
!-- authentication failed: -->
map:redirect-to uri=login.html/>
/map:match>


I now want to change this code so that it can read the values into a flowscript, which in turn queries a user object ( User user = User.getUser(userName, userPassword) ). If the user does not exist i want the user to be re-directed back to the login page, otherwise they are re-directed to my protected area:

			map:match pattern=registerd_user_area>
map:act type=auth-protect>
map:parameter name=handler value=beyarecords/> 
map:aggregate element=home>
map:part src=cocoon:/support/beya-menu/>
map:part src=cocoon:/support/contract-summary/>
map:part src=context://beyarecords/content/adv-xyz-01.xml/>
map:part src=cocoon:/support/banner/>
/map:aggregate>


map:transform type=xslt src=style/home-page.xsl/>
map:call resource=serialize/>
/map:act>
/map:match>


Of course I appreciate that those parts of my sitemap which used the map:act type=auth-protect would now need to be changed to reflect using a flowscript instead, something like:

map:call function=userLoggedIn/>??? In the above instance, how would I still utilise the map:aggregate???


Peter

Re: cli:// offline-generation, how to avoid get-variables in the generated-filenames

2004-04-20 Thread Upayavira
Boris Althaus wrote:

hy all,
 
i'm working with the offline-generation of cocoon at the moment.
In my websites i have flash-movies which are initialized with 
get-variables.
The corresponding filenames are like my.swf_name=value.
Is there a way to avoid this by configuration, or is it nessesary to 
rename the files by ant.
No, there isn't a way. Say you have a page index.html?name=foo and page 
index.html?name=bar, referring to both as index.html

So the best thing to do is get the request parameter into the filename, 
so foo/index.html and bar/index.html, in the example above.

What did you have in mind?

Upayavira



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


Re: org.apache.avalon.framework.configuration.ConfigurationException: No languages defined!

2004-04-20 Thread beyaNet Consultancy
Ok,
i have discovered that the following line caused my sitemap to bomb out:

map:flow-interpreters default=JavaScript/>

What does this line do, is it required, will commenting it out prevent flowscript from working properly


Peter
On 20 Apr 2004, at 11:37, beyaNet Consultancy wrote:

Hi,
just to add that I am using version 2.1.4 of cocoon.

Peter
On 20 Apr 2004, at 11:31, beyaNet Consultancy wrote:

hi,
I have added the following lines of code to my sitemap, and am now getting the above mentioned error message:

map:flow-interpreters default=JavaScript/>

map:selector name=exception src=org.apache.cocoon.selection.XPathExceptionSelector>
exception name=invalid-continuation class=org.apache.cocoon.components.flow.InvalidContinuationException/>
exception class=java.lang.Throwable unroll=true/>
/map:selector>

map:flow language=javascript>
map:script src=flow/login.js/>
/map:flow>

map:match pattern=*.jx>
map:generate type=jx src=jx/{1}.jx/>
	map:serialize type=xhtml/>
/map:match>


map:match pattern=*.kont>
map:call continuation={1}/>
/map:match>

map:match pattern=invalidContinuation>
map:generate src=exceptions/invalidContinuation.xml/>
map:serialize type=xml/>
/map:match>


map:handle-errors>
map:select type=exception>
map:when test=invalid-continuation>
map:generate src=exceptions/invalidContinuation.html/>
map:serialize type=xhtml/>
/map:when>
/map:select>
/map:handle-errors>

What am I missing?

Peter

On 20 Apr 2004, at 10:45, beyaNet Consultancy wrote:

Hi,
ok, so I have been using actions thus far to perform things like login, and now discover the beauty and simplicity of flowscript. So why actions? Anyway, I want to convert an action I currently have to check a users login details to flowscript. So my question is, what do I need to do? My user class is of the getter and setter variety and in my sitemap I have the following code to read the user/password details into the action:

			map:match pattern=login>
map:act type=auth-login>
map:parameter name=handler value=beyarecords/>
map:parameter name=parameter_name value={request-param:user}/>
map:parameter name=parameter_password value={request-param:pass}/>
map:redirect-to uri=registerd_user_area/>
/map:act>
!-- authentication failed: -->
map:redirect-to uri=login.html/>
/map:match>


I now want to change this code so that it can read the values into a flowscript, which in turn queries a user object ( User user = User.getUser(userName, userPassword) ). If the user does not exist i want the user to be re-directed back to the login page, otherwise they are re-directed to my protected area:

			map:match pattern=registerd_user_area>
map:act type=auth-protect>
map:parameter name=handler value=beyarecords/> 
map:aggregate element=home>
map:part src=cocoon:/support/beya-menu/>
map:part src=cocoon:/support/contract-summary/>
map:part src=context://beyarecords/content/adv-xyz-01.xml/>
map:part src=cocoon:/support/banner/>
/map:aggregate>


map:transform type=xslt src=style/home-page.xsl/>
map:call resource=serialize/>
/map:act>
/map:match>


Of course I appreciate that those parts of my sitemap which used the map:act type=auth-protect would now need to be changed to reflect using a flowscript instead, something like:

map:call function=userLoggedIn/>??? In the above instance, how would I still utilise the map:aggregate???


Peter

ressource reader bug with IE (linked to caching)

2004-04-20 Thread Joel Reungoat


Hello users,
I'm trying to access DOC or PDF files using the ressource reader
component as described in the sitemap below and get the following error
only under Microsoft IE :

Internet Explorer cannot download test.doc from localhost
Internet Explorer was not able to open this Internet site. The 
requested
site is either unavailable or cannot be found. Please try again later.


This message also only appears at the first attempt. It seems that
at first attempt, the file has been prepared in the cache. So, if I
refresh the page a second time from IE, I get and open correctly my
document under Word (or Acrobat if pdf).
When using Mozilla navigator, there is no problem at first attempt.
Also, if a first attempt is made from Mozilla, then the first attempt
from IE is working.
So it seems that Cocoon caching is implicated.
I made a test in the sitemap by forcing noncaching for the
pipeline. And then, I can not access at all to my document.
Does anybody have a solution for this problem ?
My cocoon version : 2.1.4
My IE version : 5.5 (probably problems also with 6.0)
IE configaration for caching page : automatic (other choice
produces same problem) 
Other links I found without answers :
http://www.mail-archive.com/[EMAIL PROTECTED]/msg07949.html
http://www.mail-archive.com/[EMAIL PROTECTED]/msg04959.html
Here is my sitemap :
?xml version=1.0 encoding=UTF-8?
map:sitemap
xmlns:map=http://apache.org/cocoon/sitemap/1.0
map:pipelines
 map:pipeline type=caching
!--
 With caching, the problem occurs only at the first read
--
!-- map:pipeline
type=noncachingWithout
caching, the problem occurs at each attempt --
map:match
pattern=**.doc
 map:read
src=""
mime-type=application/msword/
 /map:match
 map:match
pattern=**.pdf
map:read
src="" mime-type=application/pdf/
 /map:match
 /map:pipeline
/map:pipelines
/map:sitemap




R: woody and content aggregation

2004-04-20 Thread Trevisani Andrea




  It's true, your solution works correctly, but in my opinion is 
  not an approach generalized to the use of cocoon formsinsidea 
  webpage composedby various and variables parts 
  (fragments).As an example, if youwant to reuse the same pipeline 
  and the same flowscript function to manage your form inside different pages 
  (or inside different compositions of fragments), it's not the better 
  approach.
  For Example: a page with aform to 
  search data in database and withthe results organized in different 
  fragments (the choice of the number and type of fragments is based on 
  thevalue of some parameters in the form).
  For Example: the same form 
  inseveral pages aggregated in completelydifferent 
  way.
  
  In a previous mail Mark Lundquist 
  wrote:
  "When the user submits the form, if it 
  doesn't validate then showForm() will call cocoon.sendPageAndWait() 
  again. That invokes your display pipeline (the one with the 
  WoodyTemplateTransformer), but this invocation of the pipeline is no longer 
  upstream of your aggregating pipeline, its "standalone"... so, the external 
  request will be answered with the output of the display pipeline, not the 
  aggregating pipeline.In other words, you'll get just the form, not the 
  whole page."
  
  I'd like to finda generic solution to the 
  problem, do you agree? The main principle is 
  "Reuse".
  
  Thanks
  
  -Messaggio 
  originale-Da: [EMAIL PROTECTED] 
  [mailto:[EMAIL PROTECTED]Inviato: martedì 20 aprile 
  2004 9.45A: [EMAIL PROTECTED]Oggetto: Re: woody 
  and content aggregationHi, I also do the same and 
  it works correctly : Here is my 
  aggregate page ( = a called resource) == !-- 
  generate a page by merging all parts making up a page --   map:resource name="show-simple-form"map:act 
  type="locale" map:aggregate element="PAGE" label="aftergenerator"  map:part src="">"cocoon://internal-portal/top" 
  element="TOP"  strip-root="true" 
  / 
   
  map:part src="">"cocoon://internal-portal/left"  element="LEFT" 
  strip-root="false" /   
 map:part src="">"{../page}" 
  element="BODY"  strip-root="false" 
  / 
   
  map:part src="">"cocoon://internal-portal/bottom"  element="BOTTOM" 
  strip-root="false" /   
/map:aggregatemap:transform src="">"{../style}" label="afterstyle" 
  / 
   
   
  map:transform 
  type="translator" label="afteri18n , 
  search, print" 
map:parameter 
  name="locale" value="{locale}" / /map:transform 
  !-- PAY ATTENTION -- !-- This transformer is required to remove the comment tag at the end of the pipeline -- !-- We have to do that because, we import some Notes Content in the XML Stream as a comment -- 
  !-- and if we remove the comment to fast , we will lost the info -- !-- So, at the end of all the pipelines, we remove the comment tag -- 
  map:transform 
  src="">"context://stylesheets/system/mpe_clean_comment.xsl" label="content"/map:transform 
 map:serialize 
  label="links, content" /   
  !-- For Debug -- 
  !--   
   map:serialize type="xml"/   -- 
 /map:act 
/map:resource 
  = 
  An here is the woody call : 
   
  !-- Call Tellus Flow --
  map:match 
  pattern="new" map:call function="newTellUs" /  -- Call the 
  flowscript
  /map:match  
   
 !-- First Call to Tell us is the Tell us creation --map:match pattern="new-display-pipeline"
   map:call resource="show-simple-form"   
  map:parameter 
  name="page" value="cocoon:/display-form/name=entry"/   !-- call an internal pipe to 
  generate woody (see later)   
  map:parameter 
  name="style" value="context://stylesheets/mpe_tellus.xsl"/ /map:call
  
  /map:match 
!-- After the submit --map:match pattern="new-success-pipeline"
  map:call resource="show-simple-form"   
map:parameter 
  name="page" value="cocoon://internal-portal/tellus/success"/
   map:parameter name="style" value="context://stylesheets/mpe_simple.xsl"/ /map:call/map:match = Some 
  internal pipe :   map:pipeline 
  internal->"true" type="caching-point" !-- Retrieve and Generate the Form --
  map:match 
  pattern="display-form/name=*" map:act type="locale"   
   map:generate  
  src="">"context://woody/tellus/forms/entry_template.xml" /   
   map:transform 
  type="woody" label="afterwoody" /   
   !-- REALLY IMPORTANT : You have to translate the woody field, validation HERE else this is lost -- 
 map:transform type="translator" label="afteri18n , search, print"
 map:parameter name="locale" value="{locale}" 
  / 
  /map:transform 
 map:transform src="">"context://stylesheets/woody-main-styling.xsl" /   
   
  map:serialize 
  / 
/map:act 
 

Problems passing parameters to XSP

2004-04-20 Thread Carlos Dias



Hi,
I know that this is a very well documented subject, 
but I try it, and doesn't work.

My pipeline is:
map:match 
pattern="test-*-*"map:generate 
src="" 
strip-root="false"map:parameter 
name="user_id" 
value="{1}"/map:parameter 
name="app_id" 
value="{2}"//map:generatemap:serialize 
type="xml"//map:match

My xsp file is:
selectxsp:logicString 
app_id = util:get-sitemap-parameter 
name="app_id"/;String user_id = 
util:get-sitemap-parameter 
name="user_id"/;val1xsp:exprapp_id/xsp:expr/val1val2xsp:expruser_id/xsp:expr/val2/xsp:logic/select

The xsp can't pull the parameters. The result is an 
empty string. I already try to use the 
parameters.getParameter("paramname")
but the problem is the same. Can anybody tell me 
what's wrong here?!

Thanks,
Carlos Dias



Re: cli:// offline-generation, how to avoid get-variables in the generated-filenames

2004-04-20 Thread Boris Althaus



Hello Upayavira,

for html-file this behavior make sense because 
index.html?name=foo and index.html?name=bar have different content.
But my.swf?name=foo and my.swf?name=bar should be 
the same file. The strange thing is, that my.swf?name=foo becomes 
my.swf_name=foo. Probably because the ? is not allowed in 
filenames.

And i do need the get-params, because they are 
interpreted by the clientsite flash-plugin.

Is it possible to configure the link-serializer? It 
would be great to change the behavior. 

Boris

  - Original Message - 
  From: 
  Upayavira 
  To: [EMAIL PROTECTED] 
  Sent: Tuesday, April 20, 2004 12:47 
  PM
  Subject: Re: cli:// offline-generation, 
  how to avoid get-variables in the generated-filenames
  Boris Althaus wrote: hy all,  
  i'm working with the offline-generation of cocoon at the moment. In my 
  websites i have flash-movies which are initialized with  
  get-variables. The corresponding filenames are like 
  my.swf_name=value. Is there a way to avoid this by configuration, or 
  is it nessesary to  rename the files by ant.No, there isn't a 
  way. Say you have a page index.html?name=foo and page index.html?name=bar, 
  referring to both as index.htmlSo the best thing to do is get the 
  request parameter into the filename, so foo/index.html and bar/index.html, 
  in the example above.What did you have in 
  mind?Upayavira-To 
  unsubscribe, e-mail: [EMAIL PROTECTED]For 
  additional commands, e-mail: [EMAIL PROTECTED]


Writing generated content to file with cocoon

2004-04-20 Thread robby . pelssers
Hi all,

I would like to write some generated content (generated by xsp-page) to a
textfile (plain tekst but preferrably xml).  What is the easiest way to do
this in cocoon ??


Kind regards,
Robby

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



Re: Writing generated content to file with cocoon

2004-04-20 Thread Jan Hoskens
Take a look at the SourceWritingTransformer:

http://cocoon.apache.org/2.1/userdocs/transformers/sourcewriting-transformer.html

Kind Regards,
Jan

- Original Message - 
From: [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, April 20, 2004 1:49 PM
Subject: Writing generated content to file with cocoon


 Hi all,

 I would like to write some generated content (generated by xsp-page) to a
 textfile (plain tekst but preferrably xml).  What is the easiest way to do
 this in cocoon ??


 Kind regards,
 Robby

 -
 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: Problems passing parameters to XSP

2004-04-20 Thread Jan Hoskens



I tend to use this instead of 
util:.../:

String s = 
parameters.getParameter("my_sitemap_parameter", "default_value");

This does work for me. 
I wonder why you're using the "cocoon:/" protocol, 
because the docs say:
cocoon:/ - get a 
pipeline from the current sitemap 

I don't think you want a pipeline in your generator 
there, but just a page relative to your sitemap, so omit the 
protocol.

Kind Regards,
Jan


- Original Message - 

  From: 
  Carlos Dias 
  To: [EMAIL PROTECTED] 
  Sent: Tuesday, April 20, 2004 1:55 
  PM
  Subject: Problems passing parameters to 
  XSP
  
  Hi,
  I know that this is a very well documented 
  subject, but I try it, and doesn't work.
  
  My pipeline is:
  map:match 
  pattern="test-*-*"map:generate 
  src="" 
  strip-root="false"map:parameter 
  name="user_id" 
  value="{1}"/map:parameter 
  name="app_id" 
  value="{2}"//map:generatemap:serialize 
  type="xml"//map:match
  
  My xsp file is:
  selectxsp:logicString 
  app_id = util:get-sitemap-parameter 
  name="app_id"/;String user_id = 
  util:get-sitemap-parameter 
  name="user_id"/;val1xsp:exprapp_id/xsp:expr/val1val2xsp:expruser_id/xsp:expr/val2/xsp:logic/select
  
  The xsp can't pull the parameters. The result is 
  an empty string. I already try to use the 
  parameters.getParameter("paramname")
  but the problem is the same. Can anybody tell me 
  what's wrong here?!
  
  Thanks,
  Carlos Dias
  


Reference to undeclared namespace prefix: 'xmldb'.

2004-04-20 Thread Nina Juliadotter
Hi everyone,

I've finally managed to get Cocoon and Xindice to talk to eachother :) but I get
this evil error:

The XML page cannot be displayed
Cannot view XML input using XSL style sheet. Please correct the error and then click
the Refresh button, or try again later.



Reference to undeclared namespace prefix: 'xmldb'. Error processing resource
'http://localhost:8080/cocoon/nina1/remote/restaurant[name='Bravissimo']'. Line 2,
Position 69

xmldb:results query=/restaurant[name='Bravissimo'] resources=1xmldb:result
docid=Bravissimorestaurant src:col=/db/restaurants src:key=Bravissimo
xmlns:src=http://xml.apache.org/xindice/Query;
^

So the query is successful, it finds what it should, but then it somehow gets
confused by the namespace xmldb? Is this an IE bug (or feature...)? Has anyone seen
this before?

For your reference, I'm running Tomcat 5.0.19, Cocoon 2.1.4, Xindice 1.1b4 as a
standalone on Tomcat, Windows XP and IE 6.0.


Cheers,
Nina



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



AW: Portal Engine in JBOSS?

2004-04-20 Thread Hauke Ernst
Thanxs, after updating the collections.jar it worked!


 -Ursprüngliche Nachricht-
 Von: Janek Bogucki [mailto:[EMAIL PROTECTED]
 Gesendet: Donnerstag, 15. April 2004 16:27
 An: [EMAIL PROTECTED]
 Betreff: Re: Portal Engine in JBOSS?
 
 On Thu, 2004-04-15 at 13:14, Hauke Ernst wrote:
  Hello,
 
  I am trying to deploy an application based on cocoon portal engine in
  jboss-4.0.0DR3. What works is the general cocoon stuff, except my portal
  and the portal engine demo. All I see is a blank html page (after
  logging in) and an exception in the console:
  14:11:58,297 ERROR [Engine] StandardWrapperValve[Cocoon]:
  Servlet.service() for
  servlet Cocoon threw exception
  java.lang.NoSuchFieldError: EMPTY_ORDERED_ITERATOR
  at
  org.apache.commons.collections.map.AbstractLinkedMap.createEntrySetIt
  erator(AbstractLinkedMap.java:418)
 
 The wrong version of the collections jar is being used most likely.
 
 -Janek
 
 -
 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]



Global parameters for custom generator

2004-04-20 Thread Christian Rosenberger
Hello!

I have developed my custom generator and now i want to pass a parameter to
all generators of this type on the sitemap.

My idea would be to define a generator this way:

map:generators default=file
   map:generator name=mygen src=de.myapp.MyGenerator 
  parameter name=configfile value=/opt/test/test.cfg/
   /map:generator
/map:generators

Can I do it this way? How can I access the value of my parameter in my java
class? I don't want to use the map:parameter tag, because I would have to
definie the tag in each map:generate element. Would not be a nice solution
in my point of view.

Thanks for your help in advance!

Regards,
Christian

-- 
NEU : GMX Internet.FreeDSL
Ab sofort DSL-Tarif ohne Grundgebühr: http://www.gmx.net/dsl


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



XSP and cocoon cache

2004-04-20 Thread Olivier Billard
Hi Cocooners !

What is the cache used by Cocoon when rendering a pipeline ? and a 
pipeline error ?

When a runtime error occurs in an XSP, the rendered cocoon error page 
still displays when calling this page another time, but with a case that 
doesn't cause any error... I'm sure the error doesn't really reproduce, 
because no more error is logged.

And when I restart the server, all is fine until a new error. Not pretty 
cool for dev isn't it ?

Please help !
Thanks in advance !
--
Olivier Billard
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: ressource reader bug with IE (linked to caching)

2004-04-20 Thread Marcin Okraszewski
Hi,
Are you trying to access a file through SSL? I found similar problems 
with IE in SSL mode.

Regards,
Marcin Okraszewski


Hello users,

I'm trying to access DOC or PDF files using the ressource reader 
component as described in the sitemap below and get the following error 
only under Microsoft IE :


Internet Explorer cannot download test.doc from localhost
Internet Explorer was not able to open this Internet site. The 
requested
site is either unavailable or cannot be found. Please try again later.



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


XSP and logicsheets namespaces inclusions

2004-04-20 Thread Olivier Billard
Hi again,

I have an XSP that includes some logicsheets. Some of these logicsheets 
also includes a logicsheet (xsp-request for example).

But some times (10% of the time) after a restart of the server, a 
compilation error occurs, caused by the xsp-request logicsheet not 
beeing translated, and xsp-request:... elements appearing in the java 
source of the XSP.
Most of the time, the XSP compiles without any problem.

What could be the problem ?
Is it bad to use a logicsheet in another ?
Is there a special order in declaring logicsheets namespaces ?
Thanks,

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


Problem: Enabling uploads

2004-04-20 Thread Tuomo L
Hi,

We're having some serious problems with Cocoon upload mechanism. Nothing
ends up in the upload-dir. The form enctype is set to multipart/form-data,
enable-uploads=true and autosave-uploads=true in web.xml.

What could be the problem?

Running Cocoon 2.1.4 on Tomcat 4.1.24.

-Tuomo

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



Re: XSP and cocoon cache

2004-04-20 Thread Jan Hoskens
Are you using subsitemaps? Then check that you're having this attribute on
your mount:

map:mount check-reload=yes ../

If not, check cocoon.xconf for

sitemap check-reload=yes ../

I think that should do it. (well I'm not having troubles with XSP pages that
don't recompile;)

Kind Regards,
Jan

- Original Message - 
From: Olivier Billard [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, April 20, 2004 3:43 PM
Subject: XSP and cocoon cache


 Hi Cocooners !

 What is the cache used by Cocoon when rendering a pipeline ? and a
 pipeline error ?

 When a runtime error occurs in an XSP, the rendered cocoon error page
 still displays when calling this page another time, but with a case that
 doesn't cause any error... I'm sure the error doesn't really reproduce,
 because no more error is logged.

 And when I restart the server, all is fine until a new error. Not pretty
 cool for dev isn't it ?

 Please help !
 Thanks in advance !

 --
 Olivier Billard


 -
 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: Problem: Enabling uploads

2004-04-20 Thread Steve Schwarz
Hi Tuomo
IIRC the file will only exist for the duration of the pipeline invoked by 
the form action. So you need to process it within that pipeline as cocoon 
deletes it right afterwards.
HTH,
Steve

Hi,

We're having some serious problems with Cocoon upload mechanism. Nothing
ends up in the upload-dir. The form enctype is set to multipart/form-data,
enable-uploads=true and autosave-uploads=true in web.xml.
What could be the problem?

Running Cocoon 2.1.4 on Tomcat 4.1.24.
_
Get rid of annoying pop-up ads with the new MSN Toolbar – FREE! 
http://toolbar.msn.com/go/onm00200414ave/direct/01/

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


RE: SAXParseException: Content is not allowed in prolog.

2004-04-20 Thread Carmona Perez, David

Thanks all of you for your tips.

I don't know the cause, but as the output is correctly generated, finally I've opted 
to create a log filter to filter out all the messages with its lengthy call stack (it 
is time consuming and generates really very big log files).

-Mensaje original-
De: Conal Tuohy [mailto:[EMAIL PROTECTED]
Enviado el: martes, 20 de abril de 2004 0:39
Para: [EMAIL PROTECTED]
Asunto: RE: SAXParseException: Content is not allowed in prolog.



David, it sounds like your mystylesheet.xsl has some content in the prolog. Are you 
sure there's nothing wrong there? It's easy to accidentally insert some white space at 
the start of the file or something.

 -Original Message-
 From: Carmona Perez, David [mailto:[EMAIL PROTECTED]
 Sent: Tuesday, 20 April 2004 2:36 a.m.
 To: Cocoon (E-mail)
 Subject: RV: SAXParseException: Content is not allowed in prolog.






 Hi,


 If I save the result of the xinclude processing to a file and

 do the following:


 map:read src=xincludedfile.xml/
 !--Till here XML received is well formed--
 map:transform type=saxon src=mystylesheet.xsl/
 map:generate type=html/


 then everything goes ok.


 This seems a bug of the XInclude transformer.


 Has this happened to anyone else?

-
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: cocoon under eclipse

2004-04-20 Thread Olivier Billard
Flavio,

Personnaly, I don't start jetty in Eclipse, but use the
cocoon servlet-debug command and plug my Eclipse on the (default) 
debug port of jetty and it works well.

For tomcat, I added a debug clause in a special catalina.bat to plug 
Eclipse in there. And it also works good.

I don't see any advantage to start jetty from Eclipse.

Hope this helps.

--
Olivier


Flavio Palumbo wrote:

Hi Olivier,

thank you for the replay, but I overtook that phase ; in fact I found on
the mail archive a mail of yours with links to Wiki pages LoadInEclipse
and DebuggingCocoon; so I rebuilt my project following that documents
; unfortunately the built went fine, but when I tried to start jetty from
within eclipse, I always get an exception java.lang.NoClassDefFoundError:
Loader
Exception in thread main.
I configured jetty as an application following these notes, reported at
the bottom of the LoadInEclipse document :
- make sure ./tools/loader is on your eclipse classpath (it isn't by default)

- create an eclipse run configuration for Jetty Cocoon: 
  - On configurations 'Main' tab use 'Loader' as the main class. 
  - On the Arguments tab set: 
- Program arguments: tools\jetty\conf\main.xml 
- VM arguments: -Djava.endorsed.dirs=./lib/endorsed 
-Dwebapp=./build/webapp 
-Dorg.xml.sax.parser=org.apache.xerces.parsers.SAXParser
-Djetty.port= -Djetty.admin.port=8889
-Dhome=.
-Dloader.jar.repositories=./tools/jetty/lib,./lib/endorsed
-Dloader.main.class=org.mortbay.jetty.Server

Can you please help me ?

Thanks a lot

Flavio Palumbo


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


[portal] Opening portal page from CachingURICoplet's flow

2004-04-20 Thread Alex Romayev
I have implemeneted registration form as a CForm
inside a CachingURICoplet.  At the end of registration
(on confirm) I need to do the following in my
flowscript:

1. Write results to the database
2. Log the user with the new username/passoword to
portal
3. Redirect to the main portal page (maintab = 0)

Is it possible to do this from flow?  Using sendPage()
for #3 would cause the page to be displayed inside my
coplet, which is not what I want.

Any ideas?

Thanks,
-Alex

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



Re: R: woody and content aggregation

2004-04-20 Thread laurent_rorive

That's exactly what I do and it work
correctly !!!

the only thing is that I have in my
woody_template.xml a special _javascript_ that change the document.forms[0].action
and replace it with the correct URI

script
  // Force the generic
form to us the continue statement
  var form= document.forms[0];
  form.action = ""
+ .continue;
  /script

and further more , you can have multiple
form on the same page without any problem 








Trevisani Andrea [EMAIL PROTECTED]
20/04/2004 13:12
Please respond to users

To:
   '[EMAIL PROTECTED]'
[EMAIL PROTECTED]
cc:
   
Subject:
   R: woody and content aggregation


It's true, your solution works correctly,
but in my opinion is not an approach generalized to the use of cocoon forms
inside a web page composed by various and variables parts (fragments).
As an example, if you want to reuse the same pipeline and the same flowscript
function to manage your form inside different pages (or inside different
compositions of fragments), it's not the better approach.
For Example: a page with a form to search
data in database and with the results organized in different fragments
(the choice of the number and type of fragments is based on the value of
some parameters in the form).
For Example: the same form in several pages
aggregated in completely different way.

In a previous mail Mark Lundquist wrote:
When the user submits the form, if
it doesn't validate then showForm() will call cocoon.sendPageAndWait()
again. That invokes your display pipeline (the one with the WoodyTemplateTransformer),
but this invocation of the pipeline is no longer upstream of your aggregating
pipeline, its standalone... so, the external request will be
answered with the output of the display pipeline, not the aggregating pipeline.
In other words, you'll get just the form, not the whole page.

I'd like to find a generic solution to the
problem, do you agree? The main principle is Reuse.

Thanks

-Messaggio originale-
Da: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Inviato: martedì 20 aprile 2004 9.45
A: [EMAIL PROTECTED]
Oggetto: Re: woody and content aggregation


Hi, 

I also do the same and it works correctly : 

Here is my aggregate page ( = a called resource) 
== 
!-- generate
a
page
by
merging
all
parts
making
up
a
page
--

  map:resource
name=show-simple-form

   map:act
type=locale

map:aggregate
element=PAGE
label=aftergenerator

 map:part
src="">cocoon://internal-portal/top
element=TOP

 strip-root=true
/

 map:part
src="">cocoon://internal-portal/left

 element=LEFT
strip-root=false
/

 map:part
src="">{../page}
element=BODY

 strip-root=false
/

 map:part
src="">cocoon://internal-portal/bottom

 element=BOTTOM
strip-root=false
/

/map:aggregate

   
map:transform
src="">{../style}
label=afterstyle
/

 
 map:transform
type=translator
label=afteri18n
, search, print 

  map:parameter
name=locale
value={locale}
/

/map:transform

!-- PAY
ATTENTION
--

!-- This
transformer
is
required
to
remove
the
comment
tag
at
the
end
of
the
pipeline
--

!-- We
have
to
do
that
because,
we
import
some
Notes
Content
in
the
XML
Stream
as
a
comment
--

!-- and
if
we
remove
the
comment
to
fast
,
we
will
lost
the
info
--

!-- So,
at
the
end
of
all
the
pipelines,
we
remove
the
comment
tag
--

map:transform

src="">context://stylesheets/system/mpe_clean_comment.xsl

label=content/map:transform

   
map:serialize
label=links,
content /

  
!-- For
Debug
--

!--   

map:serialize
type=xml/

   --

   /map:act

  /map:resource

= 

An here is the woody call : 

 
!-- Call
Tellus
Flow
--

   map:match
pattern=new

map:call
function=newTellUs
/  
   -- Call the flowscript

   /map:match
   
   
   !--
First
Call
to
Tell
us
is
the
Tell
us
creation
--

   map:match
pattern=new-display-pipeline

map:call
resource=show-simple-form

  map:parameter
name=page
value=cocoon:/display-form/name=entry/
  !-- call an internal pipe to generate woody (see later)

  map:parameter
name=style
value=context://stylesheets/mpe_tellus.xsl/

/map:call
   

   /map:match

   
!--
After
the
submit
--

   map:match
pattern=new-success-pipeline

   map:call
resource=show-simple-form

  
 map:parameter
name=page
value=cocoon://internal-portal/tellus/success/

  
 map:parameter
name=style
value=context://stylesheets/mpe_simple.xsl/

/map:call

   /map:match

= 
Some internal pipe : 

 
 map:pipeline
internal->true
type=caching-point


!--
Retrieve
and
Generate
the
Form
--

   map:match
pattern=display-form/name=*

map:act
type=locale

map:generate
 src="">context://woody/tellus/forms/entry_template.xml
/

map:transform
type=woody
label=afterwoody
/

!--
REALLY
IMPORTANT
:
You
have
to
translate
the

Re: XSP and cocoon cache

2004-04-20 Thread Olivier Billard
Hi Jan,

Thanks for you answer.
Answers below :
Jan Hoskens wrote:

Are you using subsitemaps?
Yes

Then check that you're having this attribute on
your mount:
map:mount check-reload=yes ../
all is ok

If not, check cocoon.xconf for

sitemap check-reload=yes ../
doesn't this feature tell cocoon to recompile the sitemap if it changes 
? In this case, recompilation of XSP is not impacted, isn't it ?



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


Re: ressource reader bug with IE (linked to caching)

2004-04-20 Thread laurent_rorive

Hi,

I encounter exactly the same problem,

I try to create my own reader but it
fails .

what I done is that I create a separate
servlet that specially read files from the file system and
stream them to the HttpResponse .

It seems that the reader does not really
us the real Http Response ? (Is there someone who can confirm it
?)

It work fine ! 

Pay attention !! For ie , the called
url must end with the file extension  e.g if you want to return
a text == url = "">

in your web.xml , map all the
/servletfilereader/* to your servlet and use blabla.txt as parameter

Hope it could help

Laurent






Joel Reungoat [EMAIL PROTECTED]
20/04/2004 13:04
Please respond to users

To:
   [EMAIL PROTECTED]
cc:
   
Subject:
   ressource reader bug with IE (linked
to caching)


Hello users,

I'm trying to access DOC or PDF files using the ressource reader component
as described in the sitemap below and get the following error only under
Microsoft IE :

Internet Explorer cannot download test.doc from localhost
Internet Explorer was not able to open this Internet site. The 
requested
site is either unavailable or cannot be found. Please try again later.



This message also only appears at the first attempt. It
seems that at first attempt, the file has been prepared in the cache. So,
if I refresh the page a second time from IE, I get and open correctly
my document under Word (or Acrobat if pdf).

When using Mozilla navigator, there is no problem at first attempt.
Also, if a first attempt is made from Mozilla, then the first attempt from
IE is working.
So it seems that Cocoon caching is implicated.
I made a test in the sitemap by forcing noncaching for the
pipeline. And then, I can not access at all to my document.

Does anybody have a solution for this problem ?

My cocoon version : 2.1.4
My IE version : 5.5 (probably problems also with 6.0)
IE configaration for caching page : automatic (other choice
produces same problem) 
Other links I found without answers : http://www.mail-archive.com/[EMAIL PROTECTED]/msg07949.html
http://www.mail-archive.com/[EMAIL PROTECTED]/msg04959.html

Here is my sitemap :
?xml version=1.0 encoding=UTF-8?
map:sitemap xmlns:map=http://apache.org/cocoon/sitemap/1.0
map:pipelines
 map:pipeline type=caching   
 !--  With caching, the problem occurs only at the first
read --
!-- map:pipeline type=noncaching  Without
caching, the problem occurs at each attempt --
map:match pattern=**.doc
map:read src="" mime-type=application/msword/
   /map:match
   map:match pattern=**.pdf
map:read src="" mime-type=application/pdf/
   /map:match
 /map:pipeline
/map:pipelines
/map:sitemap


need help with xsp:formval

2004-04-20 Thread Vlad Ali
Hi all!

i'm newbie in cocoon/

Explain to me  pls where i can write xsp-formval:... logicsheet's tags?
I have not found clear explanation this question on cocoonwiki and google


vmch thx

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



memory oddnes

2004-04-20 Thread Joose Vettenranta
cocoon: 2.1.3
ibm jre 1.4.1
option: -Xmx1536m
cocoon.xconf:
  store-janitor logger=core.store.janitor
 parameter name=freememory value=1500/
 parameter name=heapsize value=146000/
 parameter name=cleanupthreadinterval value=10/
 parameter name=adaptivethreadinterval value=true/
 parameter name=threadpriority value=5/
 parameter name=percent_to_free value=10/
 parameter name=invokegc value=false/
  /store-janitor
status-generator says:

memory
total: 59.37 MB
 free: 1527.88 KB
Have I understood something wrong, or should that say total: something 
like 1200MB?

What I want that there is enough memory for application to run and also 
able to use cache as much as possilble.

excalibur.store.impl.MRUMemoryStore (hash = 0x154b6135)
cached: [show]
	 	size: 27 items in cache (0 are empty)

org.apache.cocoon.components.store.impl.DefaultStore (hash = 0x26046135)
cached:
 size: 63 items in cache (63 are empty)
- Joose

--
Always remember that you are unique, just like everyone else!
* http://iki.fi/joose/ * [EMAIL PROTECTED] * +358 44 561 0270 *
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


org.apache.avalon.framework.CascadingRuntimeException: Continuation is not defined

2004-04-20 Thread beyaNet Consultancy
Hi,
Why am I getting the above error message? 
I have defined one .js file called login.js which has one function in it called login():

function login(){

importClass(Packages.test.User); 
var msg = Success;
var obj = new User();


obj.getUser(cocoon.request.get(password)); 


while (true){

cocoon.sendPageAndWait(login.jx, {  : msg} );
if (obj) {
if (obj == null){
error = The username and password combination you entered does not exist. Please try again.;
}else{
break;
}
}
}


cocoon.sendPage(success.jx, { : msg} );	  


}
What I am try to achieve here is:

1. Instantiate a user object
2. call the method getUser and pass it 2 parameters
3. while (true), while the username and password do not exist redirect the user back to the login page


My form is defined as (login.jx):

?xml version=1.0?>
html xmlns:jx=http://apache.org/cocoon/templates/jx/1.0>
head>
title>beyaRecords - Login/title>
/head>
body>
h2>${msg}/h2>
form method=post action=${cocoon.continuation.id}.kont>
input type=text name=username/>
input type=text name=password/>
input type=submit/>
/form>
/body>
/html>


The full stack trace is :


Original Exception: ReferenceError: Continuation is not defined. (resource://org/apache/cocoon/components/flow/javascript/fom/fom_system.js; line 1)
at org.mozilla.javascript.NativeGlobal.constructError(NativeGlobal.java:597)
at org.mozilla.javascript.NativeGlobal.constructError(NativeGlobal.java:557)
at org.mozilla.javascript.ScriptRuntime.name(ScriptRuntime.java:1076)
at org.mozilla.javascript.Interpreter.interpret(Interpreter.java:2265)
at org.mozilla.javascript.InterpretedScript.call(InterpretedScript.java:62)
at org.mozilla.javascript.InterpretedScript.exec(InterpretedScript.java:55)
at org.apache.cocoon.components.flow.javascript.fom.FOM_JavaScriptInterpreter.setupContext(FOM_JavaScriptInterpreter.java:612)
at org.apache.cocoon.components.flow.javascript.fom.FOM_JavaScriptInterpreter.callFunction(FOM_JavaScriptInterpreter.java:690)
at org.apache.cocoon.components.treeprocessor.sitemap.CallFunctionNode.invoke(CallFunctionNode.java:160)
at org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:84)
at org.apache.cocoon.components.treeprocessor.sitemap.PreparableMatchNode.invoke(PreparableMatchNode.java:165)
at org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:107)
at org.apache.cocoon.components.treeprocessor.sitemap.PipelineNode.invoke(PipelineNode.java:162)
at org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:107)
at org.apache.cocoon.components.treeprocessor.sitemap.PipelinesNode.invoke(PipelinesNode.java:136)
at org.apache.cocoon.components.treeprocessor.TreeProcessor.process(TreeProcessor.java:371)
at org.apache.cocoon.components.treeprocessor.TreeProcessor.process(TreeProcessor.java:312)
at org.apache.cocoon.components.treeprocessor.sitemap.MountNode.invoke(MountNode.java:133)
at org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:84)
at org.apache.cocoon.components.treeprocessor.sitemap.PreparableMatchNode.invoke(PreparableMatchNode.java:165)
at org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:107)
at org.apache.cocoon.components.treeprocessor.sitemap.PipelineNode.invoke(PipelineNode.java:162)
at org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:107)
at org.apache.cocoon.components.treeprocessor.sitemap.PipelinesNode.invoke(PipelinesNode.java:136)
at org.apache.cocoon.components.treeprocessor.TreeProcessor.process(TreeProcessor.java:371)
at org.apache.cocoon.components.treeprocessor.TreeProcessor.process(TreeProcessor.java:312)
at org.apache.cocoon.Cocoon.process(Cocoon.java:656)
at org.apache.cocoon.servlet.CocoonServlet.service(CocoonServlet.java:1112)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:284)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:204)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:257)
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:151)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:564)
at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:245)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:199)
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:151)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:564)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:195)
at 

Re:Woody-XMLbinding-floatdatatype-problemfound

2004-04-20 Thread Hubert Trzewik
Marc, your solution looked pretty well, but in fact it does not work,
there is probably bug.

A message from erro message screen is:
java.lang.RuntimeException: Incorrect value type for myfactor (expected
class java.lang.Float, got class java.math.BigDecimal.

As you can see string from XML is converted but into decimal type -
don't know why..

ok.. now I found I can use decimal instead of float..
so, anyway, Marc, I found your advice usefull, thank you :)



 Hubert Trzewik wrote:
 I found a problem with binding data to woody form.

 Example:
 In this example binding works perfectly..

 XML data for binding:
 MyFactor55/MyFactor

 Form definition:
 wd:field id=myfactor
   wd:labelMy facor:/wd:label
   wd:datatype base=string/
 /wd:field

 But if we change datatype in definition to
 wd:datatype base=float/
 error shows up, that Cocoon expected float data and it recived string
 type..

 Of course it's a string which should be parsed into float, but it's not.
 Why? Is it my fault?


 value-binding allows for specifying a string-to/from-datatype convertor:

 wb:value id=myfactor path=MyFactor
wd:convertor datatype=float /
 /wb:value

 this will require you to also declare the wd namespace

 this convertor will be used to transform your datatype back to a string
 for the XML backend.

 see:
 - http://wiki.cocoondev.org/Wiki.jsp?page=WoodyBinding
 - http://wiki.cocoondev.org/Wiki.jsp?page=WoodyDatatypeReference

 HTH
 -marc=


 Please someone check it or give an advice (if it's my falut). Maybe it's
 a
 case for Bugzilla.

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


 --
 Marc Portierhttp://outerthought.org/
 Outerthought - Open Source, Java  XML Competence Support Center
 Read my weblog athttp://blogs.cocoondev.org/mpo/
 [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: XSP and cocoon cache

2004-04-20 Thread Jan Hoskens
Hmm, you're right, I was a bit off on that one.
But you don't need to shut down your server, just clean your working dir. If
you're using Tomcat, you can find your compiled XSP pages under the work
dir:

C:\app\Jakarta-Tomcat_4.1.29\work\Standalone\localhost\_\cocoon-files\org\ap
ache\cocoon\www\file_\

There should be your sitedir with some classes in it.

Or just clean it all the way under Standalone.

Kind Regards,
Jan

- Original Message - 
From: Olivier Billard [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, April 20, 2004 4:01 PM
Subject: Re: XSP and cocoon cache


 Hi Jan,

 Thanks for you answer.
 Answers below :

 Jan Hoskens wrote:

  Are you using subsitemaps?
 Yes

  Then check that you're having this attribute on
  your mount:
 
  map:mount check-reload=yes ../
 all is ok

 
  If not, check cocoon.xconf for
 
  sitemap check-reload=yes ../
 doesn't this feature tell cocoon to recompile the sitemap if it changes
 ? In this case, recompilation of XSP is not impacted, isn't it ?



 -
 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: Problems passing parameters to XSP

2004-04-20 Thread Carlos Dias



Thanks for the answer.
I read what you said about the "cocoon:/" protocol, 
I call the xsp directly and it works fine.
The point is that I had implemented a generic 
pipeline for xsp files, that's why I used the protocol.
The generic pipeline for xsp files is:
map:match 
pattern="*.jsp"map:generate 
src="" type="jsp" 
mime-type="text/html"/map:serialize/
/map:match

Can anybody tell me the changes that needs to 
support parameters?

Carlos Dias

  - Original Message - 
  From: 
  Jan Hoskens 
  
  To: [EMAIL PROTECTED] ; Carlos Dias 
  Sent: Tuesday, April 20, 2004 1:20 
  PM
  Subject: Re: Problems passing parameters 
  to XSP
  
  I tend to use this instead of 
  util:.../:
  
  String s = 
  parameters.getParameter("my_sitemap_parameter", "default_value");
  
  This does work for me. 
  I wonder why you're using the "cocoon:/" 
  protocol, because the docs say:
  cocoon:/ - get a 
  pipeline from the current sitemap 
  
  I don't think you want a pipeline in your 
  generator there, but just a page relative to your sitemap, so omit the 
  protocol.
  
  Kind Regards,
  Jan
  
  
  - Original Message - 
  
From: 
Carlos Dias 

To: [EMAIL PROTECTED] 
Sent: Tuesday, April 20, 2004 1:55 
PM
Subject: Problems passing parameters to 
XSP

Hi,
I know that this is a very well documented 
subject, but I try it, and doesn't work.

My pipeline is:
map:match 
pattern="test-*-*"map:generate 
src="" 
strip-root="false"map:parameter 
name="user_id" 
value="{1}"/map:parameter 
name="app_id" 
value="{2}"//map:generatemap:serialize 
type="xml"//map:match

My xsp file is:
selectxsp:logicString 
app_id = util:get-sitemap-parameter 
name="app_id"/;String user_id = 
util:get-sitemap-parameter 
name="user_id"/;val1xsp:exprapp_id/xsp:expr/val1val2xsp:expruser_id/xsp:expr/val2/xsp:logic/select

The xsp can't pull the parameters. The result 
is an empty string. I already try to use the 
parameters.getParameter("paramname")
but the problem is the same. Can anybody tell 
me what's wrong here?!

Thanks,
Carlos Dias



Re: ProblemspassingparameterstoXSP

2004-04-20 Thread Hubert Trzewik
Hi,

XSP:EXPR should be outside of XSP:LOGIC block..

try:

select
  xsp:logic
   String app_id = util:get-sitemap-parameter name=app_id/;
   String user_id = util:get-sitemap-parameter name=user_id/;
  /xsp:logic
END OF XSP:LOGIC BLOCK MOVED HERE

   val1xsp:exprapp_id/xsp:expr/val1
   val2xsp:expruser_id/xsp:expr/val2
/select

 Hi,
 I know that this is a very well documented subject, but I try it, and
 doesn't work.

 My pipeline is:
map:match pattern=test-*-*
 map:generate src=cocoon:/select_bookmark_list.xsp
 strip-root=false
  map:parameter name=user_id value={1}/
  map:parameter name=app_id value={2}/
 /map:generate
 map:serialize type=xml/
/map:match

 My xsp file is:
  select
   xsp:logic
String app_id = util:get-sitemap-parameter name=app_id/;
String user_id = util:get-sitemap-parameter name=user_id/;
val1xsp:exprapp_id/xsp:expr/val1
val2xsp:expruser_id/xsp:expr/val2
   /xsp:logic
  /select

 The xsp can't pull the parameters. The result is an empty string. I
 already try to use the parameters.getParameter(paramname)
 but the problem is the same. Can anybody tell me what's wrong here?!

 Thanks,
 Carlos Dias



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



Re: Re: Woody - XML binding - float datatype - problem found

2004-04-20 Thread Bruno Dumon
On Tue, 2004-04-20 at 17:38, Hubert Trzewik wrote:
 Marc, your solution looked pretty well, but in fact it does not work,
 there is probably bug.
 
 A message from erro message screen is:
 java.lang.RuntimeException: Incorrect value type for myfactor (expected
 class java.lang.Float, got class java.math.BigDecimal.
 
 As you can see string from XML is converted but into decimal type -
 don't know why..

there was indeed a bug, it's been fixed a while ago and will be part of
the next release (only in Forms, not in Woody).

 
 ok.. now I found I can use decimal instead of float..
 so, anyway, Marc, I found your advice usefull, thank you :)

-- 
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: Problem: Enabling uploads

2004-04-20 Thread Steve Schwarz
Tuomo
I believe the behavior changed in 2.1 so that that is no longer true:
http://wiki.cocoondev.org/Wiki.jsp?page=FileUploadsWithCocoon2.1
Steve
Hi,

But if autosave-uploads=true, the the file should be saved in the
upload-dir permanently, right?
-Tuomo

On Tue, 20 Apr 2004, Steve Schwarz wrote:

 Hi Tuomo
 IIRC the file will only exist for the duration of the pipeline invoked 
by
 the form action. So you need to process it within that pipeline as 
cocoon
 deletes it right afterwards.
 HTH,
 Steve

 Hi,
 
 We're having some serious problems with Cocoon upload mechanism. 
Nothing
 ends up in the upload-dir. The form enctype is set to 
multipart/form-data,
 enable-uploads=true and autosave-uploads=true in web.xml.
 
 What could be the problem?
 
 Running Cocoon 2.1.4 on Tomcat 4.1.24.
_
From must-see cities to the best beaches, plan a getaway with the Spring 
Travel Guide! http://special.msn.com/local/springtravel.armx

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


Flowscript problems with cocoon version 2.1.4

2004-04-20 Thread beyaNet Consultancy
Hi,
I getting an error while trying to setup my first flowscript code. The error I am getting is:

org.apache.avalon.framework.CascadingRuntimeException: Continuation is not defined

Could anyone out there please send me a copy of their sitemap, so as I can see how to properly setup up flowscript within my sitemap. Also I am trying to create a flowscript function which instantiates a User object and passes in 2 parameters, a username and a password. If the user does not exist, the user is redirected back to the login page otherwise they are sent to the secure part of my sitemap. The login function is as follows:

var user = null;

!-- Do I need to instantiate the object like this ?? >
importClass(Packages.test.User); //Note: my package test is situated as: web-inf/classes/test, User being the name of the class in the package test.
var User = new User();


function login(){
while (user == null) {
sendPageAndWait(login.jx);
user = User.getUser(cocoon.request.get(password));

if (user != null) {
break;
}
}

cocoon.sendPage(registerd_user_area); //Can I redirect a user to an area of my sitemap from flowscript like this??
}

I have attached my sitemap as well. Any help with this will be greatly appreciated.

Peter



sitemap.xmap
Description: Binary data
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Re: ProblemspassingparameterstoXSP

2004-04-20 Thread Carlos Dias
Hubert,
Sorry, but that's wrong... you can call xsp:expr inside of a xsp:logic
block.
You can see this kind of things in all cocoon documentation

CDias
- Original Message -
From: Hubert Trzewik [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, April 20, 2004 4:53 PM
Subject: Re: Problems passing parameters to XSP


 Hi,

 XSP:EXPR should be outside of XSP:LOGIC block..

 try:

 select
   xsp:logic
String app_id = util:get-sitemap-parameter name=app_id/;
String user_id = util:get-sitemap-parameter name=user_id/;
   /xsp:logic
 END OF XSP:LOGIC BLOCK MOVED HERE

val1xsp:exprapp_id/xsp:expr/val1
val2xsp:expruser_id/xsp:expr/val2
 /select

  Hi,
  I know that this is a very well documented subject, but I try it, and
  doesn't work.
 
  My pipeline is:
 map:match pattern=test-*-*
  map:generate src=cocoon:/select_bookmark_list.xsp
  strip-root=false
   map:parameter name=user_id value={1}/
   map:parameter name=app_id value={2}/
  /map:generate
  map:serialize type=xml/
 /map:match
 
  My xsp file is:
   select
xsp:logic
 String app_id = util:get-sitemap-parameter name=app_id/;
 String user_id = util:get-sitemap-parameter name=user_id/;
 val1xsp:exprapp_id/xsp:expr/val1
 val2xsp:expruser_id/xsp:expr/val2
/xsp:logic
   /select
 
  The xsp can't pull the parameters. The result is an empty string. I
  already try to use the parameters.getParameter(paramname)
  but the problem is the same. Can anybody tell me what's wrong here?!
 
  Thanks,
  Carlos Dias
 


 -
 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: Global parameters for custom generator

2004-04-20 Thread Roth, Scott
You can declare your Generator as Configurable [1], and pass the config file
to the component in the component definition.

You can then do whatever you want with the configuration information in the
configure() method.

See the LinkStatusGenerator for an example.

[1]
http://avalon.apache.org/framework/api/org/apache/avalon/framework/configura
tion/Configurable.html

 -Original Message-
 From: Christian Rosenberger [mailto:[EMAIL PROTECTED] 
 Sent: Tuesday, April 20, 2004 9:25 AM
 To: [EMAIL PROTECTED]
 Subject: Global parameters for custom generator
 
 
 Hello!
 
 I have developed my custom generator and now i want to pass a 
 parameter to
 all generators of this type on the sitemap.
 
 My idea would be to define a generator this way:
 
 map:generators default=file
map:generator name=mygen src=de.myapp.MyGenerator
  
   parameter name=configfile value=/opt/test/test.cfg/
/map:generator
 /map:generators
 
 Can I do it this way? How can I access the value of my 
 parameter in my java
 class? I don't want to use the map:parameter tag, because I 
 would have to
 definie the tag in each map:generate element. Would not be 
 a nice solution
 in my point of view.
 
 Thanks for your help in advance!
 
 Regards,
 Christian
 
 -- 
 NEU : GMX Internet.FreeDSL
 Ab sofort DSL-Tarif ohne Grundgebühr: http://www.gmx.net/dsl
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 


--
Notice:  This e-mail message, together with any attachments, contains information of 
Merck  Co., Inc. (One Merck Drive, Whitehouse Station, New Jersey, USA 08889), and/or 
its affiliates (which may be known outside the United States as Merck Frosst, Merck 
Sharp  Dohme or MSD and in Japan, as Banyu) that may be confidential, proprietary 
copyrighted and/or legally privileged. It is intended solely for the use of the 
individual or entity named on this message.  If you are not the intended recipient, 
and have received this message in error, please notify us immediately by reply e-mail 
and then delete it from your system.
--

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



Flowscript to Uploadfile

2004-04-20 Thread olivier demah
Hi,
i try to upload some images and i use = 
http://wiki.cocoondev.org/Wiki.jsp?page=FileUploadsWithFlow

it's working on some js but failed on one :

this one works :

var role = 'org.apache.cocoon.components.upload.FileUploadManager';

function upload_shop_photo() {
   var uploader = cocoon.getComponent(role);
   var part_shop = cocoon.request.get(shop_photo);
   try {
   
uploader.setUploadFolder(/home/fox_cocoon/build/webapp/vieira/images/shop);
   uploader.upload (part_shop);
   cocoon.sendPage(success.html);
   } catch (Exception) {
   cocoon.sendPage(failure.html);
   }
}

this one does not :
var role = 'org.apache.cocoon.components.upload.FileUploadManager';
function upload_player_photo() {
   var uploader = cocoon.getComponent(role);
   var part = cocoon.request.get(player_photo);
   try {
   
uploader.setUploadFolder(/home/fox_cocoon/build/webapp/vieira/images);
   uploader.upload (part);
   cocoon.sendPage(success.html);
   } catch (Exception) {
   cocoon.sendPage(failure.html);
   }
}



my sitemap with the javascript and pipeline :
   map:match pattern=do-*-*.html
   map:generate src=xsp/{2}.xsp type=serverpages
   map:parameter name=action value={1}/
   /map:generate
map:select type=request-parameter
map:parameter name=parameter-name value=upload/
   map:when test=news
 map:call function=upload_news_photo/
   /map:when
   map:when test=shop
 map:call function=upload_shop_photo/
   /map:when
   map:when test=gallery
 map:call function=upload_gallery_photo/
   /map:when
   map:when test=player
 map:call function=upload_player_photo/
   /map:when
   /map:select
   map:transform type=cinclude/
   map:transform src=xsl/admin.xslt/
   map:serialize type=html/
   /map:match
 /map:pipeline
/map:pipelines
map:flow language=javascript
   map:script src=js/upload_gallery.js /
   map:script src=js/upload_photo.js /
   map:script src=js/upload_player.js /
   map:script src=js/upload_shop.js /
/map:flow
the diff between upload_player and upload_shop is the name of the 
function of course and the var part where the name differ.

the following error occurs :
file:/home/fox_cocoon/build/webapp/vieira/admin/js/upload_player.js, 
line 8: Can't find method 
org.apache.cocoon.components.upload.FileUploadManagerImpl.upload(string).

i already met this problem before and just change the var part = 
cocoon.request.get(player_photo); to something like var part_shop ; 
but here nothing goes better.

any ideas are welcome.

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


Re: ProblemspassingparameterstoXSP

2004-04-20 Thread Hubert Trzewik
I just copied your code into my XSP page for testing, and it works..
You sure, you have all the xsp:page things correct?

?xml version=1.0 encoding=UTF-16?

xsp:page
  language=java
  xmlns:xsp=http://apache.org/xsp;
  xmlns:util=http://apache.org/xsp/util/2.0;


CustomContent
  xsp:logic
String app_id = util:get-sitemap-parameter name=app_id/;
String user_id = util:get-sitemap-parameter name=user_id/;
val1xsp:exprapp_id/xsp:expr/val1
val2xsp:expruser_id/xsp:expr/val2
  /xsp:logic
/CustomContent

/xsp:page

--
Are you sure, you have default generator type set to serverpages,
because in your example attribute type is missing..

Maybe you will try without cocoon:/ as a source of XSP at first..

My sitemap fragment:

map:match pattern=internal/test/*-*
  map:generate type=serverpages src=serverpages/test.xsp
map:parameter name=user_id value={1}/
map:parameter name=app_id value={2}/
  /map:generate
  map:serialize type=xml/
/map:match


 Hubert,
 Sorry, but that's wrong... you can call xsp:expr inside of a xsp:logic
 block.
 You can see this kind of things in all cocoon documentation
You were right.. it works with xsp:expr inside xsp:logic block..


 CDias
 - Original Message -
 From: Hubert Trzewik [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Tuesday, April 20, 2004 4:53 PM
 Subject: Re: Problems passing parameters to XSP


 Hi,

 XSP:EXPR should be outside of XSP:LOGIC block..

 try:

 select
   xsp:logic
String app_id = util:get-sitemap-parameter name=app_id/;
String user_id = util:get-sitemap-parameter name=user_id/;
   /xsp:logic
 END OF XSP:LOGIC BLOCK MOVED HERE

val1xsp:exprapp_id/xsp:expr/val1
val2xsp:expruser_id/xsp:expr/val2
 /select

  Hi,
  I know that this is a very well documented subject, but I try it, and
  doesn't work.
 
  My pipeline is:
 map:match pattern=test-*-*
  map:generate src=cocoon:/select_bookmark_list.xsp
  strip-root=false
   map:parameter name=user_id value={1}/
   map:parameter name=app_id value={2}/
  /map:generate
  map:serialize type=xml/
 /map:match
 
  My xsp file is:
   select
xsp:logic
 String app_id = util:get-sitemap-parameter name=app_id/;
 String user_id = util:get-sitemap-parameter name=user_id/;
 val1xsp:exprapp_id/xsp:expr/val1
 val2xsp:expruser_id/xsp:expr/val2
/xsp:logic
   /select
 
  The xsp can't pull the parameters. The result is an empty string. I
  already try to use the parameters.getParameter(paramname)
  but the problem is the same. Can anybody tell me what's wrong here?!
 
  Thanks,
  Carlos Dias
 


 -
 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: Flowscript to Uploadfile

2004-04-20 Thread Jeroen Reijn
Hi,

maybe i'm thinking in the wrong direction, but the error messege says that it's 
getting a String.
Is your form type correct(multipart) ? 

Just my 2 cents.

Jeroen

-Original Message-
From: olivier demah [mailto:[EMAIL PROTECTED]
Posted At: Tuesday, April 20, 2004 6:23 PM
Posted To: Cocoon User List
Conversation: Flowscript to Uploadfile
Subject: Flowscript to Uploadfile


Hi,
i try to upload some images and i use = 
http://wiki.cocoondev.org/Wiki.jsp?page=FileUploadsWithFlow

it's working on some js but failed on one :


this one works :

var role = 'org.apache.cocoon.components.upload.FileUploadManager';

function upload_shop_photo() {
var uploader = cocoon.getComponent(role);
var part_shop = cocoon.request.get(shop_photo);
try {

uploader.setUploadFolder(/home/fox_cocoon/build/webapp/vieira/images/shop);
uploader.upload (part_shop);
cocoon.sendPage(success.html);
} catch (Exception) {
cocoon.sendPage(failure.html);
}
}

this one does not :
var role = 'org.apache.cocoon.components.upload.FileUploadManager';

function upload_player_photo() {
var uploader = cocoon.getComponent(role);
var part = cocoon.request.get(player_photo);
try {

uploader.setUploadFolder(/home/fox_cocoon/build/webapp/vieira/images);
uploader.upload (part);
cocoon.sendPage(success.html);
} catch (Exception) {
cocoon.sendPage(failure.html);
}
}



my sitemap with the javascript and pipeline :
map:match pattern=do-*-*.html
map:generate src=xsp/{2}.xsp type=serverpages
map:parameter name=action value={1}/
/map:generate

 map:select type=request-parameter
 map:parameter name=parameter-name value=upload/
map:when test=news
  map:call function=upload_news_photo/
/map:when
map:when test=shop
  map:call function=upload_shop_photo/
/map:when
map:when test=gallery
  map:call function=upload_gallery_photo/
/map:when
map:when test=player
  map:call function=upload_player_photo/
/map:when
/map:select

map:transform type=cinclude/
map:transform src=xsl/admin.xslt/
map:serialize type=html/
/map:match

  /map:pipeline
/map:pipelines

map:flow language=javascript
map:script src=js/upload_gallery.js /
map:script src=js/upload_photo.js /
map:script src=js/upload_player.js /
map:script src=js/upload_shop.js /
/map:flow


the diff between upload_player and upload_shop is the name of the 
function of course and the var part where the name differ.

the following error occurs :
file:/home/fox_cocoon/build/webapp/vieira/admin/js/upload_player.js, 
line 8: Can't find method 
org.apache.cocoon.components.upload.FileUploadManagerImpl.upload(string).

i already met this problem before and just change the var part = 
cocoon.request.get(player_photo); to something like var part_shop ; 
but here nothing goes better.


any ideas are welcome.


-
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: ProblemspassingparameterstoXSP

2004-04-20 Thread Carlos Dias
I already try it without the cocoon:/ protocol and works OK.
The problem is that my generic pipeline for xsp doesn't support the passing
of parameters.
In a previews email (with the same subject) I post my generic pipeline
if you could give a look at that I will appreciate!

CDias

- Original Message -
From: Hubert Trzewik [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, April 20, 2004 6:06 PM
Subject: Re: Problems passing parameters to XSP


 I just copied your code into my XSP page for testing, and it works..
 You sure, you have all the xsp:page things correct?

 ?xml version=1.0 encoding=UTF-16?

 xsp:page
   language=java
   xmlns:xsp=http://apache.org/xsp;
   xmlns:util=http://apache.org/xsp/util/2.0;
 

 CustomContent
   xsp:logic
 String app_id = util:get-sitemap-parameter name=app_id/;
 String user_id = util:get-sitemap-parameter name=user_id/;
 val1xsp:exprapp_id/xsp:expr/val1
val2xsp:expruser_id/xsp:expr/val2
   /xsp:logic
 /CustomContent

 /xsp:page

 --
 Are you sure, you have default generator type set to serverpages,
 because in your example attribute type is missing..

 Maybe you will try without cocoon:/ as a source of XSP at first..

 My sitemap fragment:

 map:match pattern=internal/test/*-*
   map:generate type=serverpages src=serverpages/test.xsp
 map:parameter name=user_id value={1}/
 map:parameter name=app_id value={2}/
   /map:generate
   map:serialize type=xml/
 /map:match


  Hubert,
  Sorry, but that's wrong... you can call xsp:expr inside of a
xsp:logic
  block.
  You can see this kind of things in all cocoon documentation
 You were right.. it works with xsp:expr inside xsp:logic block..

 
  CDias
  - Original Message -
  From: Hubert Trzewik [EMAIL PROTECTED]
  To: [EMAIL PROTECTED]
  Sent: Tuesday, April 20, 2004 4:53 PM
  Subject: Re: Problems passing parameters to XSP
 
 
  Hi,
 
  XSP:EXPR should be outside of XSP:LOGIC block..
 
  try:
 
  select
xsp:logic
 String app_id = util:get-sitemap-parameter name=app_id/;
 String user_id = util:get-sitemap-parameter name=user_id/;
/xsp:logic
  END OF XSP:LOGIC BLOCK MOVED HERE
 
 val1xsp:exprapp_id/xsp:expr/val1
 val2xsp:expruser_id/xsp:expr/val2
  /select
 
   Hi,
   I know that this is a very well documented subject, but I try it, and
   doesn't work.
  
   My pipeline is:
  map:match pattern=test-*-*
   map:generate src=cocoon:/select_bookmark_list.xsp
   strip-root=false
map:parameter name=user_id value={1}/
map:parameter name=app_id value={2}/
   /map:generate
   map:serialize type=xml/
  /map:match
  
   My xsp file is:
select
 xsp:logic
  String app_id = util:get-sitemap-parameter name=app_id/;
  String user_id = util:get-sitemap-parameter name=user_id/;
  val1xsp:exprapp_id/xsp:expr/val1
  val2xsp:expruser_id/xsp:expr/val2
 /xsp:logic
/select
  
   The xsp can't pull the parameters. The result is an empty string. I
   already try to use the parameters.getParameter(paramname)
   but the problem is the same. Can anybody tell me what's wrong here?!
  
   Thanks,
   Carlos Dias
  
 
 
  -
  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: Flowscript problems with cocoon version 2.1.4

2004-04-20 Thread Christopher Oliver
Most likely you have another version of Rhino in your classpath.

beyaNet Consultancy wrote:

Hi,
I getting an error while trying to setup my first flowscript code. The 
error I am getting is:

*org.apache.avalon.framework.CascadingRuntimeException: Continuation 
is not defined

*Could anyone out there please send me a copy of their sitemap, so as 
I can see how to properly setup up flowscript within my sitemap. Also 
I am trying to create a flowscript function which instantiates a User 
object and passes in 2 parameters, a username and a password. If the 
user does not exist, the user is redirected back to the login page 
otherwise they are sent to the secure part of my sitemap. The login 
function is as follows:

var user = null;

!-- Do I need to instantiate the object like this ?? 
importClass(Packages.test.User); //Note: my package test is situated 
as: web-inf/classes/test, User being the name of the class in the 
package test.
var User = new User();

function login(){
while (user == null) {
sendPageAndWait(login.jx);
user = 
User.getUser(cocoon.request.get(username),cocoon.request.get(password)); 

if (user != null) {
break;
}
}
cocoon.sendPage(registerd_user_area); //Can I redirect a user to an 
area of my sitemap from flowscript like this??
}

I have attached my sitemap as well. Any help with this will be greatly 
appreciated.

Peter



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


Global parameters for custom generator

2004-04-20 Thread Christian Rosenberger
Hello!

I have developed my custom generator and now i want to pass a parameter to
all generators of this type on the sitemap.

My idea would be to define a generator this way:

map:generators default=file
   map:generator name=mygen src=de.myapp.MyGenerator 
  parameter name=configfile value=/opt/test/test.cfg/
   /map:generator
/map:generators

Can I do it this way? How can I access the value of my parameter in my java
class? I don't want to use the map:parameter tag, because I would have to
definie the tag in each map:generate element. Would not be a nice solution
in my point of view.

Thanks for your help in advance!

Regards,
Christian

-- 
NEU : GMX Internet.FreeDSL
Ab sofort DSL-Tarif ohne Grundgebühr: http://www.gmx.net/dsl


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



Link Hosting:JSP Zone Web Hosting

2004-04-20 Thread JSPZone Hosting



Jsp  Java servlet hosting - supports Cocoon 
2.1.3  2.1.4, Tomcat4  Tomcat5

http://www.jspzone.net/

Contact: [EMAIL PROTECTED]


Thank You

John Howell


Re: Flowscript problems with cocoon version 2.1.4

2004-04-20 Thread beyaNet Consultancy
Christopher,
the version of Rhino I have installed in my web-inf/lib folder is :  
rhino1.5r4-continuations-20030906.jar. Is this the correct version for  
cocoon version 2.1.4? If not, where can I get the correct .jar from?

Peter
On 20 Apr 2004, at 18:08, Christopher Oliver wrote:
Most likely you have another version of Rhino in your classpath.

beyaNet Consultancy wrote:

Hi,
I getting an error while trying to setup my first flowscript code.  
The error I am getting is:

*org.apache.avalon.framework.CascadingRuntimeException:  
Continuation is not defined

*Could anyone out there please send me a copy of their sitemap, so as  
I can see how to properly setup up flowscript within my sitemap. Also  
I am trying to create a flowscript function which instantiates a User  
object and passes in 2 parameters, a username and a password. If the  
user does not exist, the user is redirected back to the login page  
otherwise they are sent to the secure part of my sitemap. The login  
function is as follows:

var user = null;

!-- Do I need to instantiate the object like this ?? 
importClass(Packages.test.User); //Note: my package test is situated  
as: web-inf/classes/test, User being the name of the class in the  
package test.
var User = new User();

function login(){
while (user == null) {
sendPageAndWait(login.jx);
user =  
User.getUser(cocoon.request.get(username),cocoon.request.get(passwo 
rd));

if (user != null) {
break;
}
}
cocoon.sendPage(registerd_user_area); //Can I redirect a user to an  
area of my sitemap from flowscript like this??
}

I have attached my sitemap as well. Any help with this will be  
greatly appreciated.

Peter

-- 
--

-
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: need help with xsp:formval

2004-04-20 Thread Christian Haul
Vlad Ali wrote:
Hi all!

i'm newbie in cocoon/

Explain to me  pls where i can write xsp-formval:... logicsheet's tags?
I have not found clear explanation this question on cocoonwiki and google
You can write then anywhere on your XSP. However, IMO you should 
consider to use the SimpleFormTransformer instead or even better,
using Cocon Forms aka Woody.

	Chris.

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


Re: Woody/Cocoon forms questions

2004-04-20 Thread Sebastian
Dnia Mon, 19 Apr 2004 22:41:50 +0200, Marc Portier [EMAIL PROTECTED] 
napisa:

see the aggregate-sample with the 'switch' button
(of course that is a somewhat giving you the idea that you _should_ have 
multiple templates for one form, but you should at least notice that 
both templates mention ALL the widgets from the form-definition file)
Ok. I've looked at C2.1.5. Lot of new stuff. It looks interesting.
Saddly I'm not web developer anymore and don't have so much time
to spend on it as I used to have. I just want to be align.
Everything looks fine. I managed to get my beutiful NIP validator.
And... I'm a little bit disapointed. Why? Because fail
message on aggregatefield isn't working correctly. My model looks
like:
	fd:aggregatefield id=nip required=false
fd:labelNIP:/fd:label
	  fd:datatype base=string
	  fd:validation
	   fd:nip
	fd:failmessageInvalid NIP number./fd:failmessage
	   /fd:nip
	  /fd:validation	
  /fd:datatype
  fd:split pattern=([0-9]{3})-([0-9]{2,3})-([0-9]{2})-([0-9]{2,3})
fd:map group=1 field=part1/
fd:map group=2 field=part2/
fd:map group=3 field=part3/
fd:map group=4 field=part4/
fd:failmessageNot a valid 10-digit NIP number./fd:failmessage
  /fd:split
  fd:combine expression='Concat(part1, -, part2, -, part3, 
-,part4)'/
  fd:widgets
fd:field id=part1
	fd:labelNIP:/fd:label
  fd:datatype base=integer/
/fd:field
fd:field id=part2
	fd:label-/fd:label
  fd:datatype base=integer/
/fd:field
fd:field id=part3
	fd:label-/fd:label
  fd:datatype base=integer/
/fd:field
fd:field id=part4
	fd:label-/fd:label
  fd:datatype base=integer/
/fd:field
  /fd:widgets
/fd:aggregatefield

and template:

fi:group
fi:styling layout=row/
fi:items
 ft:aggregate-widget id=nip
  ft:widget id=part1/
  ft:widget id=part2/
  ft:widget id=part3/
  ft:widget id=part4/
 /ft:aggregate-widget
/fi:items   
 /fi:group
Now, when I try to enter incorrect NIP it is validated and form
won't be submited. That's correct. Saddly information that
NIP is incorrect is not presented by '!'. Well if I'll provide
letter insted of digit I will get '!' for incorrect field but I don't
have '!' for whole aggregation. So if digits are correct form
won't be submited and user won't get feedback why it happens.
Is it possible to make it visible or is it a bug in cforms?
I think it is, I do hope you now also understand the 'danger' in this 
usage.
Hmm. Okey I agree. I just have an idea. Of course it is not possible
with current implementation but it could be the way for multiforms.
Consider that we have additional value stored in continuation
session which will hold information about current view. Then we can
add information to form template about views. I mean additional info
for widget on which page it should be visible. Now, depending on
current value of our variable stored in session cforms block
can validate/trigger getting submited values/do other stuff only for
widgets availiable for current view. Succesfuly validated form
allow cforms to change value of variable stored in session and
change current view. Leaving current continuation point would be possible
only when user will go through all forms. In sucha solution we
have both advantages from multiforms and continuation. Main idea was
taken from XForms. I like almost everything about cforms but I think
there were some good ideas also in XForms.
Kindly regards,
Sebastian Gil
--
Thought by thought we see our own mistakes.
mailto: [EMAIL PROTECTED]

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


sitemap problem

2004-04-20 Thread Vlad Ali
hi

i have error from cocoon:
org.apache.avalon.framework.configuration.ConfigurationException: No languages defined!

in my sitemap i write :

map:flow-interpreters default=javascript/

map:flow language=javascript
  map:script src=flow/form_test.js/
/map:flow

and in cocoon.xconf i have 

component-instance 
class=org.apache.cocoon.components.flow.javascript.fom.FOM_JavaScriptInterpreter 
name=javascript
  load-on-
startupresource://org/apache/cocoon/components/flow/javascript/fom/fom_system.js/load-
on-startup
  reload-scriptstrue/reload-scripts
  check-time4000/check-time
  !--  debuggerenabled/debugger --  !-- JavaScript Debugger support --
/component-instance


why i getting error?


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



RE: Global parameters for custom generator

2004-04-20 Thread Christian Rosenberger
Sorry for double posting. Don't know, why it happens!

Thanks for the help!

Regards,
Christian

-Original Message-
From: Christian Rosenberger [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, April 20, 2004 3:22 PM
To: [EMAIL PROTECTED]
Subject: Global parameters for custom generator


Hello!

I have developed my custom generator and now i want to pass a parameter
to all generators of this type on the sitemap.

My idea would be to define a generator this way:

map:generators default=file
   map:generator name=mygen src=de.myapp.MyGenerator 
  parameter name=configfile value=/opt/test/test.cfg/
   /map:generator
/map:generators

Can I do it this way? How can I access the value of my parameter in my
java class? I don't want to use the map:parameter tag, because I would
have to definie the tag in each map:generate element. Would not be a
nice solution in my point of view.

Thanks for your help in advance!

Regards,
Christian

-- 
NEU : GMX Internet.FreeDSL
Ab sofort DSL-Tarif ohne Grundgebühr: http://www.gmx.net/dsl


-
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: Flowscript problems with cocoon version 2.1.4

2004-04-20 Thread beyaNet Consultancy
is anybody having problems with flowscript on version 2.1.4 of cocoon? If not, could you send me a copy of your js.jar and rhino1.5r4-continuations-20030906.jar as I continue to get the following error message:

x-tad-biggerReferenceError: Continuation is not defined. (resource://org/apache/cocoon/components/flow/javascript/fom/fom_system.js; line 1)

Alternatively if anyone else has had the same problem and managed to resolve it, could you please inform me as to the solution to this problem. I really need to get this issue finished today.

Peter/x-tad-bigger
On 20 Apr 2004, at 18:28, beyaNet Consultancy wrote:

Christopher,
the version of Rhino I have installed in my web-inf/lib folder is : rhino1.5r4-continuations-20030906.jar. Is this the correct version for cocoon version 2.1.4? If not, where can I get the correct .jar from?

Peter
On 20 Apr 2004, at 18:08, Christopher Oliver wrote:

Most likely you have another version of Rhino in your classpath.

beyaNet Consultancy wrote:

Hi,
I getting an error while trying to setup my first flowscript code. The error I am getting is:

*org.apache.avalon.framework.CascadingRuntimeException: Continuation is not defined

*Could anyone out there please send me a copy of their sitemap, so as I can see how to properly setup up flowscript within my sitemap. Also I am trying to create a flowscript function which instantiates a User object and passes in 2 parameters, a username and a password. If the user does not exist, the user is redirected back to the login page otherwise they are sent to the secure part of my sitemap. The login function is as follows:

var user = null;

!-- Do I need to instantiate the object like this ?? >
importClass(Packages.test.User); //Note: my package test is situated as: web-inf/classes/test, User being the name of the class in the package test.
var User = new User();


function login(){
while (user == null) {
sendPageAndWait(login.jx);
user = User.getUser(cocoon.request.get(username),cocoon.request.get(password));

if (user != null) {
break;
}
}

cocoon.sendPage(registerd_user_area); //Can I redirect a user to an area of my sitemap from flowscript like this??
}

I have attached my sitemap as well. Any help with this will be greatly appreciated.

Peter



-
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: Flowscript problems with cocoon version 2.1.4

2004-04-20 Thread Michael Wechner
beyaNet Consultancy wrote:

is anybody having problems with flowscript on version 2.1.4 of cocoon?


not really, but we had some confusing exceptions because we used
some global variables within a certain flowscript. The flowscript which 
had the global variables continued to run fine, but all other 
flowscripts didn't work anymore after running the one with the global 
variables.

Michi


If not, could you send me a copy of your js.jar and 
rhino1.5r4-continuations-20030906.jar as I continue to get the 
following error message:

ReferenceError: Continuation is not defined. 
(resource://org/apache/cocoon/components/flow/javascript/fom/fom_system.js; 
line 1)

Alternatively if anyone else has had the same problem and managed to 
resolve it, could you please inform me as to the solution to this 
problem. I really need to get this issue finished today.

Peter
On 20 Apr 2004, at 18:28, beyaNet Consultancy wrote:
Christopher,
the version of Rhino I have installed in my web-inf/lib folder is
: rhino1.5r4-continuations-20030906.jar. Is this the correct
version for cocoon version 2.1.4? If not, where can I get the
correct .jar from?
Peter
On 20 Apr 2004, at 18:08, Christopher Oliver wrote:
Most likely you have another version of Rhino in your classpath.

beyaNet Consultancy wrote:

Hi,
I getting an error while trying to setup my first
flowscript code. The error I am getting is:
*org.apache.avalon.framework.CascadingRuntimeException:
Continuation is not defined
*Could anyone out there please send me a copy of their
sitemap, so as I can see how to properly setup up
flowscript within my sitemap. Also I am trying to create a
flowscript function which instantiates a User object and
passes in 2 parameters, a username and a password. If the
user does not exist, the user is redirected back to the
login page otherwise they are sent to the secure part of
my sitemap. The login function is as follows:
var user = null;

!-- Do I need to instantiate the object like this ?? 
importClass(Packages.test.User); //Note: my package test
is situated as: web-inf/classes/test, User being the name
of the class in the package test.
var User = new User();
function login(){
while (user == null) {
sendPageAndWait(login.jx);
user =

User.getUser(cocoon.request.get(username),cocoon.request.get(password));
if (user != null) {
break;
}
}
cocoon.sendPage(registerd_user_area); //Can I redirect a
user to an area of my sitemap from flowscript like this??
}
I have attached my sitemap as well. Any help with this
will be greatly appreciated.
Peter



-

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]


--
Michael Wechner
Wyona Inc.  -   Open Source Content Management   -   Apache Lenya
http://www.wyona.com  http://cocoon.apache.org/lenya/
[EMAIL PROTECTED][EMAIL PROTECTED]
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: Woody/Cocoon forms questions

2004-04-20 Thread Marc Portier


Sebastian wrote:

Dnia Mon, 19 Apr 2004 22:41:50 +0200, Marc Portier 
[EMAIL PROTECTED] napisa:
 ^^^ did I? gosh :-$

snip /

Ok. I've looked at C2.1.5. Lot of new stuff. It looks interesting.
Saddly I'm not web developer anymore and don't have so much time
to spend on it as I used to have. I just want to be align.
Everything looks fine. I managed to get my beutiful NIP validator.
And... I'm a little bit disapointed. Why? Because fail
message on aggregatefield isn't working correctly. My model looks
like:
snip what=the elaborate sample snippet /

Now, when I try to enter incorrect NIP it is validated and form
won't be submited. That's correct. Saddly information that
NIP is incorrect is not presented by '!'. Well if I'll provide
letter insted of digit I will get '!' for incorrect field but I don't
have '!' for whole aggregation. So if digits are correct form
won't be submited and user won't get feedback why it happens.
Is it possible to make it visible or is it a bug in cforms?
Since this error is on the aggregate-widget and that one is not actually 
on the template, there is no position where the (!) should be next to.

Therefor you need to explitely position it with a separate 
ft:validation-error /

see also here: 
http://marc.theaimsgroup.com/?l=xml-cocoon-devm=108176649831199w=2
and here:
http://marc.theaimsgroup.com/?l=xml-cocoon-devm=107486651220426w=2

and let's thank Vadim :-)

I think it is, I do hope you now also understand the 'danger' in this 
usage.


Hmm. Okey I agree. I just have an idea. Of course it is not possible
with current implementation but it could be the way for multiforms.
Consider that we have additional value stored in continuation
session which will hold information about current view. Then we can
add information to form template about views. I mean additional info
for widget on which page it should be visible. Now, depending on
current value of our variable stored in session cforms block
can validate/trigger getting submited values/do other stuff only for
widgets availiable for current view. Succesfuly validated form
allow cforms to change value of variable stored in session and
change current view. Leaving current continuation point would be possible
only when user will go through all forms. In sucha solution we
have both advantages from multiforms and continuation. Main idea was
taken from XForms. I like almost everything about cforms but I think
there were some good ideas also in XForms.
I'm quite sure that is the case...

I have to say the above explanation is quite dense, and it fails at 
making me see where this 'view' is different to the current 'form'

Isn't this really about just have a look at it differently, and mold 
your thoughts around what cforms offers?

In any case, maybe you could elaborate with some snippets of flowscript 
and form def files to hint at what you are implying...

regards,
-marc=
--
Marc Portierhttp://outerthought.org/
Outerthought - Open Source, Java  XML Competence Support Center
Read my weblog athttp://blogs.cocoondev.org/mpo/
[EMAIL PROTECTED]  [EMAIL PROTECTED]
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: Flowscript to Uploadfile

2004-04-20 Thread Geoff Howard
Jeroen Reijn wrote:

Hi,

maybe i'm thinking in the wrong direction, but the error messege says that it's getting a String.
Is your form type correct(multipart) ? 

Just my 2 cents.
That (String) can also happen if uploads are not turned on in web.xml - in case 
these are different webapps, or on different servers.

Geoff


-Original Message-
From: olivier demah [mailto:[EMAIL PROTECTED]
Posted At: Tuesday, April 20, 2004 6:23 PM
Posted To: Cocoon User List
Conversation: Flowscript to Uploadfile
Subject: Flowscript to Uploadfile
Hi,
i try to upload some images and i use = 
http://wiki.cocoondev.org/Wiki.jsp?page=FileUploadsWithFlow

it's working on some js but failed on one :

this one works :

var role = 'org.apache.cocoon.components.upload.FileUploadManager';

function upload_shop_photo() {
var uploader = cocoon.getComponent(role);
var part_shop = cocoon.request.get(shop_photo);
try {

uploader.setUploadFolder(/home/fox_cocoon/build/webapp/vieira/images/shop);
uploader.upload (part_shop);
cocoon.sendPage(success.html);
} catch (Exception) {
cocoon.sendPage(failure.html);
}
}

this one does not :
var role = 'org.apache.cocoon.components.upload.FileUploadManager';
function upload_player_photo() {
var uploader = cocoon.getComponent(role);
var part = cocoon.request.get(player_photo);
try {

uploader.setUploadFolder(/home/fox_cocoon/build/webapp/vieira/images);
uploader.upload (part);
cocoon.sendPage(success.html);
} catch (Exception) {
cocoon.sendPage(failure.html);
}
}



my sitemap with the javascript and pipeline :
map:match pattern=do-*-*.html
map:generate src=xsp/{2}.xsp type=serverpages
map:parameter name=action value={1}/
/map:generate
 map:select type=request-parameter
 map:parameter name=parameter-name value=upload/
map:when test=news
  map:call function=upload_news_photo/
/map:when
map:when test=shop
  map:call function=upload_shop_photo/
/map:when
map:when test=gallery
  map:call function=upload_gallery_photo/
/map:when
map:when test=player
  map:call function=upload_player_photo/
/map:when
/map:select
map:transform type=cinclude/
map:transform src=xsl/admin.xslt/
map:serialize type=html/
/map:match
  /map:pipeline
/map:pipelines
map:flow language=javascript
map:script src=js/upload_gallery.js /
map:script src=js/upload_photo.js /
map:script src=js/upload_player.js /
map:script src=js/upload_shop.js /
/map:flow
the diff between upload_player and upload_shop is the name of the 
function of course and the var part where the name differ.

the following error occurs :
file:/home/fox_cocoon/build/webapp/vieira/admin/js/upload_player.js, 
line 8: Can't find method 
org.apache.cocoon.components.upload.FileUploadManagerImpl.upload(string).

i already met this problem before and just change the var part = 
cocoon.request.get(player_photo); to something like var part_shop ; 
but here nothing goes better.

any ideas are welcome.



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


Re: Problem: Enabling uploads

2004-04-20 Thread Geoff Howard
Steve Schwarz wrote:

Tuomo
I believe the behavior changed in 2.1 so that that is no longer true:
http://wiki.cocoondev.org/Wiki.jsp?page=FileUploadsWithCocoon2.1
Steve
Exactly - and the general security weakness of the old system (unlimited uploads 
to any url handled by any cocoon server with uploads enabled) was deemed to be 
serious enough to warrant such an incompatible change.

Geoff

But if autosave-uploads=true, the the file should be saved in the
upload-dir permanently, right?
-Tuomo

On Tue, 20 Apr 2004, Steve Schwarz wrote:

 Hi Tuomo
 IIRC the file will only exist for the duration of the pipeline 
invoked by
 the form action. So you need to process it within that pipeline as 
cocoon
 deletes it right afterwards.
 HTH,
 Steve

 Hi,
 
 We're having some serious problems with Cocoon upload mechanism. 
Nothing
 ends up in the upload-dir. The form enctype is set to 
multipart/form-data,
 enable-uploads=true and autosave-uploads=true in web.xml.
 
 What could be the problem?
 
 Running Cocoon 2.1.4 on Tomcat 4.1.24.


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


How to pass a XML file to another WebService application?

2004-04-20 Thread Sean Xue



Hi, All, 

I am relatively new to cocoon. Please provide some 
guidelines, thanks.

We have a WebService applicationthat 
canprocess and return XML files. 

My question is how to ask cocoon to pass a XML file 
to that WebService
and receive the returned XML message. 

Assuming the WebService is listening at http://WebServerHost:8880.

I would like the cocoon sitemap to be something 
likes this:

map:match 
pattern="processRequest"
 map:generate 
type="request"
 
map:parameter name="generate-attributes" value="true"/
 
/map:generate
 map:transform 
scr="convert_request_to_WebService_XML.xsl" type="xslt"/
 !-- 
--
 !-- Here, I would like to 
pass the XML file at this stage to http://WebServiceHost:8880 
--
 !-- and receive the returned 
XML file to continue on --
 !-- 
--
 map:transform 
scr="generate_HTML_from_XML.xsl" type="xslt"/
 map:serialize 
type="html"/
/map:match

Thanks for any advice. 

Sean

 


[I18n Transformer] Message Locations

2004-04-20 Thread Alex Romayev
Hi,

It seems that I18nTransformer is now looking for
messages in the relative to the current sitemap
directory.  Is it possible to have a single base
location for all messages?

Thanks,
-Alex

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



Re: [I18n Transformer] Message Locations

2004-04-20 Thread Antonio Gallardo
Alex Romayev dijo:
 Hi,

 It seems that I18nTransformer is now looking for
 messages in the relative to the current sitemap
 directory.  Is it possible to have a single base
 location for all messages?

Yep. In sitemap.xmap you can set it using context:

map:transformer name=i18n 
  catalogues default=woody
  catalogue id=woody name=WoodyMessages
  location=context://translations/
  catalogue id=mensajes name=mensajes
  location=context://translations/
/catalogues
cache-at-startupfalse/cache-at-startup
/map:transformer

Best Regards,

Antonio Gallardo

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



Hibernate vs. reload-scripts

2004-04-20 Thread Mark Lundquist
I used to enjoy the automatic recompilation of my Java classes with 
cocoon/flow-interpreters/component-instance/reload-scripts...

...until I started using Hibernate w/ Cocoon.  Hibernate needs to see 
all your persistent classes in the classpath, so now my WEB-INF/lib/ 
has links to my class files, and I guess that is why automatic 
recompilation doesn't work anymore.

Am I right?

Can anything be done to have my cake and eat it too?

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


Re: Hibernate vs. reload-scripts

2004-04-20 Thread Mark Lundquist
On Apr 20, 2004, at 4:12 PM, I wrote:

I used to enjoy the automatic recompilation of my Java classes with 
cocoon/flow-interpreters/component-instance/reload-scripts...

...until I started using Hibernate w/ Cocoon.  Hibernate needs to see 
all your persistent classes in the classpath, so now my WEB-INF/lib/ 
has links to my class files, and I guess that is why automatic 
recompilation doesn't work anymore.
I meant to say, WEB-INF/classes/
:-/
~ml

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


Re: [I18n Transformer] Message Locations

2004-04-20 Thread Alex Romayev
I am mounting my application outside of cocoon
directory structure, so if I remember correctly, I
will not be able to use context:// protocol, is there
another way?

Thanks,
-Alex

--- Antonio Gallardo [EMAIL PROTECTED] wrote:
 Alex Romayev dijo:
  Hi,
 
  It seems that I18nTransformer is now looking for
  messages in the relative to the current sitemap
  directory.  Is it possible to have a single base
  location for all messages?
 
 Yep. In sitemap.xmap you can set it using context:
 
 map:transformer name=i18n 
   catalogues default=woody
   catalogue id=woody name=WoodyMessages
   location=context://translations/
   catalogue id=mensajes name=mensajes
   location=context://translations/
 /catalogues
 cache-at-startupfalse/cache-at-startup
 /map:transformer
 
 Best Regards,
 
 Antonio Gallardo
 

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



redirect problem with flowscript : No pipeline matched request: safe_user_area

2004-04-20 Thread beyaNet Consultancy
Hi,
i have a flowscript funtion which does the following:

var user = null;
importClass(Packages.test.User);
var newUser = new User();
var msg = ;

function login() {

while (user == null) {


cocoon.sendPageAndWait(login.jx, {msg:msg});
try {
user = newUser.getUser(cocoon.request.get(username), cocoon.request.get(password) );
break;
}catch(e){
msg = The username password combination you entered does not exist. Please retry.;
}
}


cocoon.sendPage(safe_user_area);
}

So, when a user has been accepted at login redirect them to safe_user_area. I have tried cocoon.redirect(uri) but keep getting an error which says that the redirect function does not exist, when it does! When am I being told that a map pattern which exists, doesn't

			map:match pattern=safe_user_area>
map:aggregate element=home>
map:part src=cocoon:/support/beya-menu/>
map:part src=cocoon:/support/contract-summary/>
map:part src=context://beyarecords/content/adv-xyz-01.xml/>
map:part src=cocoon:/support/banner/>
/map:aggregate>


map:transform type=xslt src=style/home-page.xsl/>
map:call resource=serialize/>

Peter

Using CLI as a conversion tool

2004-04-20 Thread Antonio Gallardo
Hi:

I never user the CLI outside forrest. My question is:

Is posible to use CLI as a conversion tool for applications from
ISO-8859-1 to UTF-8?

There are some xslt, xsp, xml, xmap and xconf files. Some of them are in
ISO-8859-1.

The result need to be in the same directory structure but in UTF-8.

Try to explain more:

1-Recently I sent a test that worked fine:

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

On that mail, we found is posible to render a XML file to UTF-8. In that
way, Cocoon is able to make the work.

The only problem I see is if we can read from a dir to make the work done.
As an auto conversion tool.

Best Regards,

Antonio Gallardo

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



Re: [I18n Transformer] Message Locations

2004-04-20 Thread David Crossley
Alex Romayev wrote:
 I am mounting my application outside of cocoon
 directory structure, so if I remember correctly, I
 will not be able to use context:// protocol, is there
 another way?

Have you tried the file:// protocol ...
http://cocoon.apache.org/2.1/userdocs/concepts/sitemap.html#File%3A+URLs

--David



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




Re: [I18n Transformer] Message Locations

2004-04-20 Thread David Crossley
Alex Romayev wrote:
 I am mounting my application outside of cocoon
 directory structure, so if I remember correctly, I
 will not be able to use context:// protocol, is there
 another way?

Have you tried the file:// protocol ...
http://cocoon.apache.org/2.1/userdocs/concepts/sitemap.html#File%3A+URLs

--David



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



Re: [I18n Transformer] Message Locations

2004-04-20 Thread Alex Romayev
My application is being deployed in different
environments, so I can't rely on the file path.  What
I really need is application context, but I'm afraid
there is no such protocol.  I think I'll just have to
wrap it with a pipeline, so that I would use cocoon://
instead.

Thanks everyone,
-Alex

--- David Crossley [EMAIL PROTECTED] wrote:
 Alex Romayev wrote:
  I am mounting my application outside of cocoon
  directory structure, so if I remember correctly, I
  will not be able to use context:// protocol, is
 there
  another way?
 
 Have you tried the file:// protocol ...

http://cocoon.apache.org/2.1/userdocs/concepts/sitemap.html#File%3A+URLs
 
 --David
 
 
 

-
 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: Using CLI as a conversion tool

2004-04-20 Thread Upayavira
Antonio Gallardo wrote:

Hi:

I never user the CLI outside forrest. My question is:

Is posible to use CLI as a conversion tool for applications from
ISO-8859-1 to UTF-8?
There are some xslt, xsp, xml, xmap and xconf files. Some of them are in
ISO-8859-1.
The result need to be in the same directory structure but in UTF-8.

Try to explain more:

1-Recently I sent a test that worked fine:

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

On that mail, we found is posible to render a XML file to UTF-8. In that
way, Cocoon is able to make the work.
The only problem I see is if we can read from a dir to make the work done.
As an auto conversion tool.
 

You create another page using the DirectoryGenerator and an XMLT that 
simply links to all of the XML files that you want to convert, and then 
you point the CLI to that page and tell it to follow links. It will then 
generate all of the files you want.

Regards, Upayavora



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


Best Practices for Debugging XML?

2004-04-20 Thread David Swearingen
Newbie question: what's the best way to view raw xml when debugging pipelines for web development? I think my question comes down to these two points:

1) Should serializers be switched to type="xml" so that I can see raw xml results in a browser?

2) If so, or, in general, are there some good techniques to allow me to debug without having to change some portion of the sitemap each time, i.e., a way to configure the sitemap so that when I request foo.xml instead of foo.html, I see the raw xml instead? 

David

RE: Best Practices for Debugging XML?

2004-04-20 Thread David Leangen

David (I like your name!)

Try using views.

http://cocoon.apache.org/2.1/userdocs/concepts/views.html


Regards,
David



-Original Message-
From: David Swearingen [mailto:[EMAIL PROTECTED]
Sent: April 21, 2004 11:21
To: [EMAIL PROTECTED]
Subject: Best Practices for Debugging XML?


Newbie question: what's the best way to view raw xml when debugging
pipelines for web development?  I think my question comes down to these two
points:

1) Should serializers be switched to type=xml so that I can see raw xml
results in a browser?

2) If so, or, in general, are there some good techniques to allow me to
debug without having to change some portion of the sitemap each time, i.e.,
a way to configure the sitemap so that when I request foo.xml instead of
foo.html, I see the raw xml instead?

David


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



RE: Best Practices for Debugging XML?

2004-04-20 Thread Neil Bacon
Use a view - see http://cocoon.apache.org/2.1/userdocs/concepts/views.html

Usage: myURL?cocoon-view=content



-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]
Behalf Of David Swearingen
Sent: Wednesday, 21 April 2004 12:21 PM
To: [EMAIL PROTECTED]
Subject: Best Practices for Debugging XML?


Newbie question: what's the best way to view raw xml when debugging
pipelines for web development?  I think my question comes down to these two
points:

1) Should serializers be switched to type=xml so that I can see raw xml
results in a browser?

2) If so, or, in general, are there some good techniques to allow me to
debug without having to change some portion of the sitemap each time, i.e.,
a way to configure the sitemap so that when I request foo.xml instead of
foo.html, I see the raw xml instead?

David


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



Re: Flowscript problems with cocoon version 2.1.4

2004-04-20 Thread Christopher Oliver
What is your environment like? That is the correct jar. What I'm saying 
is that there is probably another Rhino jar somewhere in your class path.

One way to find out is this:

print(Packages.org.mozilla.javascript.Context.getCurrentContext().getClass().getClassLoader().getResource(org/mozilla/javascript/Scriptable.class));

That should print out the location of the rhino jar file being used by 
the class loader.

HTH,

Chris

beyaNet Consultancy wrote:

Christopher,
the version of Rhino I have installed in my web-inf/lib folder is :  
rhino1.5r4-continuations-20030906.jar. Is this the correct version 
for  cocoon version 2.1.4? If not, where can I get the correct .jar from?

Peter
On 20 Apr 2004, at 18:08, Christopher Oliver wrote:
Most likely you have another version of Rhino in your classpath.

beyaNet Consultancy wrote:

Hi,
I getting an error while trying to setup my first flowscript code.  
The error I am getting is:

*org.apache.avalon.framework.CascadingRuntimeException:  
Continuation is not defined

*Could anyone out there please send me a copy of their sitemap, so 
as  I can see how to properly setup up flowscript within my sitemap. 
Also  I am trying to create a flowscript function which instantiates 
a User  object and passes in 2 parameters, a username and a 
password. If the  user does not exist, the user is redirected back 
to the login page  otherwise they are sent to the secure part of my 
sitemap. The login  function is as follows:

var user = null;

!-- Do I need to instantiate the object like this ?? 
importClass(Packages.test.User); //Note: my package test is 
situated  as: web-inf/classes/test, User being the name of the class 
in the  package test.
var User = new User();

function login(){
while (user == null) {
sendPageAndWait(login.jx);
user =  
User.getUser(cocoon.request.get(username),cocoon.request.get(passwo 
rd));

if (user != null) {
break;
}
}
cocoon.sendPage(registerd_user_area); //Can I redirect a user to 
an  area of my sitemap from flowscript like this??
}

I have attached my sitemap as well. Any help with this will be  
greatly appreciated.

Peter

-- 
--

-
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: Hibernate vs. reload-scripts

2004-04-20 Thread Christopher Oliver
What error do you get? AFAIK it should work. Why exactly does hibernate 
need to see all your persistent classes in the classpath?

Mark Lundquist wrote:

I used to enjoy the automatic recompilation of my Java classes with 
cocoon/flow-interpreters/component-instance/reload-scripts...

...until I started using Hibernate w/ Cocoon.  Hibernate needs to see 
all your persistent classes in the classpath, so now my WEB-INF/lib/ 
has links to my class files, and I guess that is why automatic 
recompilation doesn't work anymore.

Am I right?

Can anything be done to have my cake and eat it too?

thanks,
mark
-
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]


xmldb namespace in xindice results file

2004-04-20 Thread Nina Juliadotter
Hi everyone,

I've come across a strange problem that I'm not sure how to get around, or if it's
just me doing something wrong.

Short description:
When I use cocoon to query the xindice database and display the results, the result
file generated has an undeclared namespace xmldb. This has the effect that I can't
do anything with the result, as cocoon will tell me that The prefix xmldb for
element xmldb:results is not bound. How do you get around this???

Long description:
When I query xindice with a sitemap like this:

map:pipeline
map:match pattern=styleremote/**
  map:generate src=xmldb:xindice://localhost:8080/db/restaurants/#{1}/
  map:transform type=xslt src=xsl/result.xsl/
  map:serialize type=html/
/map:match
  /map:pipeline

and the url is

http://localhost:8080/cocoon/nina1/styleremote/restaurant[name='La Scala']

then the map:generate src=xmldb:xindice://localhost:8080/db/restaurants/#{1}/
bit generates the following:

?xml version=1.0 encoding=ISO-8859-1?
xmldb:results query=/restaurant[name='La Scala'] resources=1
xmldb:result docid=LaScala
restaurant src:col=/db/restaurants src:key=LaScala
xmlns:src=http://xml.apache.org/xindice/Query;
  nameLa Scala/name
cousineTypeItalian/cousineType
address
streetNumber23/streetNumber
streetNameNorton street/streetName
suburbLeichhardt/suburb
/address
phoneNumber(02) 9765 4321/phoneNumber
menuURLhttp://www.lascala.com.au/menu/menuURL
bookingURLhttp://www.lascala.com.au/booking/bookingURL
priceRange
minPrice10/minPrice
maxPrice40/maxPrice
/priceRange
/restaurant
/xmldb:result
/xmldb:results

My style sheet is just a print everyting out:

?xml version=1.0 ?
xsl:stylesheet xmlns:xsl=http://www.w3.org/1999/XSL/Transform; version=1.0
xsl:output method=html indent=yes/
xsl:template match=/
  html
  table
trtdxsl:apply-templates //td/tr
  /table
  /html
/xsl:template
/xsl:stylesheet

Cocoon gives me the error:

org.apache.cocoon.ProcessingException: Failed to execute pipeline.:
file:/C:/Tomcat/webapps/cocoon/nina1/LaScala.xml:2:67:org.xml.sax.SAXParseException:
The prefix xmldb for element xmldb:results is not bound.

Obviously this could be solved by adding a declaration of xmldb namespace in both
the generated file and the stylesheet. But this is not realistic as I need to work
with the generated result on the fly, and anyway, I shoudln't have to.

Any ideas?

Thanks,
Nina



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



[Help]How to get uploaded file name using different form-encoding?

2004-04-20 Thread roy huang
Hi,all:
This's a strange question stuff me up.I set form-encoding to utf-8 in web.xml for 
display and submit.I can use this code to get the correct string in Chinese,the form 
encoding is utf-8:
userName = new String(request.getParameter(nameField).getBytes(ISO-8859-1));
But in the same time I use an activex control to upload file,the control is to 
generate an html form and submit ,it's form encoding is ISO-8859-1,here comes the 
problem.
code:
 Part part = (Part) request.get(this.fileField);
 String tmp = part.getFileName();
 String fileName = new String(tmp.getBytes(ISO-8859-1));
the Chinese fileName becomes something like ???.pdf.
I try to solve it:
1.If I change form-encoding back to default,the fileName is ok,but my other 
application using utf-8 encoding is wrong
2.I use SetCharacterEncodingAction like:
   map:act type=formencoding
map:parameter name=form-encoding value=ISO-8859-1 /
   /map:act
   ... upload thing
   but it doesn't work ,though I print the request.getCharacterEncoding() and see 
ISO-8859-1,I believe the fileupload is still using the default form-encoding utf-8.

How can I solve this problem?

Roy Huang

Re: Flow-Woody-Event-Woody... possible?

2004-04-20 Thread Steve Steinitz
Hello Joerg

On Tuesday, 20 April 2004 at 9:52am, Joerg Heinicke wrote:

On 20.04.2004 09:44, Steve Steinitz wrote:
 We couldn't find that example but here is what we've done:
 
 fd:submit id=remove action-command=remove 
fd:labelRemove/fd:label
 /fd:submit
 
 and in our xsp
 
 wt:widget id=remove/
 
 and in the flow
 
 if (remove.equals(form.submitId)) 
 {
 ...
 }
 
 This condition was never true so I logged the value of
 form.submitid -- it was 'undefined'.
 
 Is there anything else we need to do?

I had the same problem yesterday too:
http://marc.theaimsgroup.com/?l=xml-cocoon-devm=108238973125352w=4
and fixed it by changing the order of the form widgets in the definition.

Furthermore my form.submitId was also null at the end, while 
form.getSubmitWidget().getId() returned the correct value.

Does this help?

Yes, thank you.  In our flowscript we use a woody2.js Form so we
can use 'form.form' to get the java form within and so can write

if (remove.equals(form.form.getSubmitWidget().getId())) 

and all is good.

Note that so far we have been blissfully unaware of any symptoms
from the problem Marc alluded to: I really don't know what the
event-call on the continuations stack will do if you call showForm
from inside the event-handling but we are on alert.

Thanks again,

Steve




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