Re: How can i define my pipeline to open .doc , .pdf

2002-12-18 Thread Olivier GUCKERT
Hello

Sreenivasan N. a écrit :
 
 Hi all
 
 I have got some word documents, pdf documents, excel documents which are
 there in doc, pdf, xls folders i would like to define a pipeline which can
 open the document in cocoon. Does map:read slove the problem? What mime
 type i should define for it example application/msword 
 
 Thanks in advance
 Regards
 Sreenivasan.

just try :

map:match pattern=ressources-*.doc
map:read mime-type=application/msword src=Ressources/{1}.doc/
/map:match
map:match pattern=ressources-*.xls
map:read mime-type=application/vnd.ms-excel
src=Ressources/{1}.xls/
/map:match

Regards

Olivier Guckert

-
Please check that your question  has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

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




!!! NEED HELP for Passing request parameters - and making use of them in the XSL

2002-12-18 Thread cavallino_mail.zeelandnet.nl
I want to do that too but then with XPath. I want to transform my Xpath 
results into HTML.

In IExplore I go to an URL which contains xpath parameters. Then when I don't 
put in a transform or anything like that I just get a page in XML with the 
results of my query. In that case XPath has added a couple attributes to the 
result like the locations and the filenames of the results. I need that 
information for my stylesheet. 
Now I need to transform that automatically into HTML. But I have no idea how 
to do that. I tried just using a transform but if I do that it shows the 
stylesheet without the XML page I had without the transformation. So the 
result table I made in the stylesheet is shown but there's no data in it.
I can't just pass the XPath parameters that only contains my query and I need 
the results to. Or can I do that some way?

Can anyone help because I need to solve this very badly, thanx

Sebastiaan

= Original Message From Lenya L. Khachaturov 
[EMAIL PROTECTED] =
Hello,

It seems like everybody knows how to do this, at least the docs mention
this so briefly, that it must be dead simple. Anyway, I didn't get it :-)
Please help me on this:

map:match pattern=archives/**
...
map:transform src=my.xsl type=xslt
  map:parameter name=param value={1}
/map:transform
...
/map:match

Now, when I point the browser to http://mysite/archives/december,
the parameter named param with the december value should be passed to
the stylesheet. In the stylesheet I have: xsl:param name=param /
As far as I understood, xsl:value-of select=param should print
december - right? Well, it doesn't. What am I doing wrong?

--
Lenya Khachaturov
mailto:[EMAIL PROTECTED]

-
Please check that your question  has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

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



-
Please check that your question  has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

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




DataBase Action and date format

2002-12-18 Thread Marco Taiuti
Hi!
how can I set a date format like this dd/mm/ with Database Action? 
thanks in advance.
iker.



-
Please check that your question  has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

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




Re: cvs2.1 xmlform sample broken?

2002-12-18 Thread Nicola Ken Barozzi


Ivelin Ivanov wrote:

Thanks for the notification Thor.

Nicola, what is the deal?


What is the problem?


- Original Message - 
From: Thor Heinrichs-Wolpert [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, December 17, 2002 10:03 PM
Subject: cvs2.1 xmlform sample broken?


I see some files moved in CVS by nicolaken such as
src/java/org/apache/cocoon/samples/xmlform
 UsageFeedbackAction.java
 UserBean.java
 WizardAction.java

but the sitemaps and examples don't seem to have been modified.

Is something up?


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


-
Please check that your question  has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

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




Does disable-output-escaping work?

2002-12-18 Thread Lenya L. Khachaturov
Hello,

I've got several Cocoon installations, one of them has a weird bug -
seems like disable-output-escaping is not working. The code is the same
everywhere. 
In more detail:
XML contains
content
![CDATA[ some html code ]]
/content

XSL contains
xsl:value-of select=content disable-output-escaping=yes/

Working installations are: Cocoon 2.0.3, Tomcat 3.3.1, JDK 1.3.0_01 and
Cocoon 2.0.3, Tomcat 3.3.1, JDK 1.4.0_01
Buggy installation is: Cocoon 2.0.3, Resin 2.1.6, JDK 1.4.0_01

Is it a bug of Cocoon? How can I workaround this?

-- 
Lenya Khachaturov
mailto:[EMAIL PROTECTED]

-
Please check that your question  has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

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




RE: FORMS

2002-12-18 Thread Josema Alonso
Sure. I have tried different ways but using it directly from the Action with
a helper class seems to be the easiest solution by now.

I'm too busy this week, please give me a few days and I'll prepare and send
something to Wiki for example.

Btw, I read your message about loading content into a Node a few days ago.
You recommended using a Container. Since I didn't know about them I'm using
DOM Nodes  directly and it's working just fine. Would it be a better
approach to use the container?

Best.


-Mensaje original-
De: Ivelin Ivanov [mailto:[EMAIL PROTECTED]]
Enviado el: miércoles, 18 de diciembre de 2002 5:01
Para: [EMAIL PROTECTED]
Asunto: Re: FORMS



Josema,

Many people requested an example of XMLForm with Xindice.
Can you submit some source code or even better a HOW-TO doc?

Thank you,

Ivelin



- Original Message -
From: Josema Alonso [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, December 17, 2002 9:59 AM
Subject: Re: FORMS


FORMSHello,
Yes, you must download 2.1 from CVS and build it. Information on how to get
it and build it step by step is available at:
http://xml.apache.org/cocoon/installing/index.html

Then you could test the XMLForm samples. I've been succesfully using them
for a few months backed by a Xindice respository.

Best.

ps: please, not HTML next time, thanks.


- Original Message -
From: Carlos González
To: [EMAIL PROTECTED]
Sent: Tuesday, December 17, 2002 3:34 PM
Subject: FORMS


Hi All,
I am very interested in something that would let me fill some forms, and
bind these form data to xml.
I am evaluating products like Altova's Authentic Web Edition (very
expensive, 30k USD per 50 concurrent users), but the functionality, except
the client behavior that allows to edit the whole xml before sending it to
the server, is near from what I'm looking for.
I have seen Cocoon Forms, and it seems that is what I need.
Could you give me some suggestions, hints, ..., whatever.
Also, Cocoon forms page says that Cocoon 2.1 must be downloaded in order to
test the example at url http://localhost:8080/cocoon/samples/xmlform/, but I
am unable to get this version neither in the download page nor in the cvs.
Where could I find this package?. Is it present in other releases, or only
in 2.1?
Thank you very much in advance.
Carlos.


Carlos Gonzalez-Cadenas
Software Architect
e-xtendnow



-
Please check that your question  has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

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



-
Please check that your question  has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

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


-
Please check that your question  has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

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




Re: Passing request parameters - and making use of them in the XS L

2002-12-18 Thread Lenya L. Khachaturov
On Wed, Dec 18, 2002 at 03:25:04PM +0800, Kirchhoff, Lars wrote:
 hi 
 
 you have to reference the param with a $. In your case 
 
  xsl:value-of select=$param
 
Thanks everyone for responding so quickly, that was really simple :-)

-- 
Lenya Khachaturov
mailto:[EMAIL PROTECTED]

-
Please check that your question  has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

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




Using input modules

2002-12-18 Thread Vermeulen, Francis
Hi,

can anyone tell me how to make a sitemap recognize the use of an input
module? I followed the documentation about using modules literally, but the
sitemap generator does not seem to recognize the syntax. Here is the
fragment of my sitemap:

map:resources
map:resource name=controller

map:generate type=serverpages
src=docs/templates/controller.xsp
map:parameter name=event value=action /
/map:generate
map:transform type=cinclude/
map:transform src=stylesheets/{attribute:style}.xsl /
map:serialize type=html /

/map:resource 
 /map:resources

The idea is to use a request attribute (style) - set before the pipeline
is processed - to define the stylesheet to be used. However, the generated
sitemap Java code still handles the {attribute:style} as a regular
substitution by calling substitute(list, {attribute:style}) while I
would have expected a call to the corresponding input module.

It's also not clear from the doc when the sitemap expects an input module,
e.g. when is attribute recognized as an input module and when as an output
module?

Thanks,
Francis


Ing. FRA Vermeulen
Senior J2EE Architect
ECM Solutions - Eindhoven
mobiel: +31 (0) 6 222 03 856
e-mail: [EMAIL PROTECTED]




-
Please check that your question  has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

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




connect to the ejb

2002-12-18 Thread Hong Gia Dinh
Title: connect to the ejb 





Hi all


i am trying to run a Cocoon application in JBoss 3.04. I deployed my application : sample.war in the Tomcat/webapps directory

and run , it runs well alone.
now i want to connect to ejb beans deployed in the JBoss/server/default/deploy : beans.jar
in my xsp's i tried to connect to these beans but it doesn't work!!


because Cocooon itself is a servlet so i write code like a servlet connecting to beans!
it did not work! now i am wondering if i have to declare these beans in sitemap or web.xml or cocoon.xconf? and how??? 


can somebody show me?
Thanks
GD





Re: Using input modules

2002-12-18 Thread Christian Haul
On 18.Dec.2002 -- 10:00 AM, Vermeulen, Francis wrote:
 can anyone tell me how to make a sitemap recognize the use of an input
 module? I followed the documentation about using modules literally, but the
 sitemap generator does not seem to recognize the syntax. Here is the
 fragment of my sitemap:

Unfortunately, you don't tell us which version you are
using. InputModules are available only in 2.0.4 and 2.1.

 map:resources
   map:resource name=controller
 
   map:generate type=serverpages
 src=docs/templates/controller.xsp
   map:parameter name=event value=action /
   /map:generate
   map:transform type=cinclude/
   map:transform src=stylesheets/{attribute:style}.xsl /

Please check that your cocoon.xconf provides a module names
attribute. Some have been renamed, request attributes are now
available through request-attr. If the docs say different, could you
send a patch, please?

   map:serialize type=html /
   
   /map:resource 
  /map:resources
 
 The idea is to use a request attribute (style) - set before the pipeline
 is processed - to define the stylesheet to be used. However, the generated
 sitemap Java code still handles the {attribute:style} as a regular
 substitution by calling substitute(list, {attribute:style}) while I
 would have expected a call to the corresponding input module.

This is handled inside the substitute method.

 It's also not clear from the doc when the sitemap expects an input module,
 e.g. when is attribute recognized as an input module and when as an output
 module?

The sitemap only handles InputModules. OutputModules are used
currently in some actions and transformers.

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

-
Please check that your question  has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

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




RE: Using input modules

2002-12-18 Thread Vermeulen, Francis
Hi Christian,

thanks for your response. I'm currently using the 2.0.3 version, which
probably explains why it doesn't work. the version of
AbstractSitemap.substitute in 2.0.3 does not take care of the : operator.
I'll retry this with a later version as you suggest.

Regards,
Francis

-Original Message-
From: Christian Haul [mailto:[EMAIL PROTECTED]]
Sent: woensdag 18 december 2002 10:18
To: [EMAIL PROTECTED]
Subject: Re: Using input modules


On 18.Dec.2002 -- 10:00 AM, Vermeulen, Francis wrote:
 can anyone tell me how to make a sitemap recognize the use of an input
 module? I followed the documentation about using modules literally, but
the
 sitemap generator does not seem to recognize the syntax. Here is the
 fragment of my sitemap:

Unfortunately, you don't tell us which version you are
using. InputModules are available only in 2.0.4 and 2.1.

 map:resources
   map:resource name=controller
 
   map:generate type=serverpages
 src=docs/templates/controller.xsp
   map:parameter name=event value=action /
   /map:generate
   map:transform type=cinclude/
   map:transform src=stylesheets/{attribute:style}.xsl /

Please check that your cocoon.xconf provides a module names
attribute. Some have been renamed, request attributes are now
available through request-attr. If the docs say different, could you
send a patch, please?

   map:serialize type=html /
   
   /map:resource 
  /map:resources
 
 The idea is to use a request attribute (style) - set before the pipeline
 is processed - to define the stylesheet to be used. However, the generated
 sitemap Java code still handles the {attribute:style} as a regular
 substitution by calling substitute(list, {attribute:style}) while I
 would have expected a call to the corresponding input module.

This is handled inside the substitute method.

 It's also not clear from the doc when the sitemap expects an input module,
 e.g. when is attribute recognized as an input module and when as an
output
 module?

The sitemap only handles InputModules. OutputModules are used
currently in some actions and transformers.

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

-
Please check that your question  has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

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


-
Please check that your question  has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

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




Re: value-substitution in Cocoon

2002-12-18 Thread Anna Afonchenko
Sorry for returning to this issue again, but I can't find an answer.
Can I use value substitutoin inside the input module?
Referring the example that yoou gave me, I don't want to get the substring
of the whole URI, if I have match:
map:match pattern=*/*.html

I want to refer to the first wildcard inside the request: module, something
like:
map:parameter name=param value={request:substring({1},0,1)}
e.g. I want to apply XPath expression only on part of the URI using value
substitution.
This is probably very stupid question, but I can't find an answer.
Can somebody please explain me this or redirect me to some URL with
explanations?
(I read the http://xml.apache.org/cocoon/userdocs/concepts/modules.html, but
it just explains the concept of modules, it doesn't have the example that I
need).

Thank you very much for help.

Anna

- Original Message -
From: Konstantin Piroumian [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, December 17, 2002 2:13 PM
Subject: Re: value-substitution in Cocoon


Hi!
(Please do not use HTML mails in the mailing list.)

I see two ways to solve this task:
  1. Use an action that will get the original parameter and generate another
one, which you'll pass to the transformer.
  2. Use a the Request input module, e.g.  map:parameter name=param
value={request:substring(requestURI, 0, 1)}/ - this sample will give you
the first letter (see /samples/module/sitemap.xmap and XPath reference to
learn how to get the last character).

It sounds a little strange what you are trying to do though...

Regards,
  Konstantin

- Original Message -
From: Anna Afonchenko
To: cocoon-users
Sent: Tuesday, December 17, 2002 14:55
Subject: value-substitution in Cocoon


I have the following question:
I know that in Cocoon I can use value substitution inside a pipeline, e.g.
if I have a pipeline
map:pipeline
  map:match pattern=*/*.html
map:generate src={2}.html/
map:transform src=some.xsl
  map:parameter name=param value={1}/
/map:transform
  /map:match
/map:pipeline

and if I write the URI http://localhost:8080/cocoon/param1/some.html

then in the pipeline the stylesheet some.xsl will receive a parameter with
name param and value param1. So this is my question:
Can I somehow parse/evaluate this parameter {1} inside the sitemap (not
inside the xsl).
E.g., can I somehow, having {1}=param1 extract the last character (1 in
this case) and send to the xsl only it, or, having parameter {1}=1, send
{1}+1, i.e. 2 to the stylesheet?

I need this because I want to build pipeline that will get some parameter n,
and after it is executed I want to call the same pipeline with parameter
n+1.
Is this possible in sitemap?

Thank you very much for help.

Anna


-
Please check that your question  has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

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


-
Please check that your question  has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

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




xi:fallback element in cocoon's Xinclude transformer

2002-12-18 Thread Yury Mikhienko
Hi all!

Can anyone answer  the follofing question:
Why cocoon's Xinclude transformer does not still emplement xi:fallback element? 
(See recomendations in http://www.w3.org/TR/xinclude/)
The implementation of this feature requires a simple modification in Xinclude 
transformer code.
(I tried to hack the Xinclude transformer for add xi:fallback and it works :) )

-- 
 
Best regards,
Yury Mikhienko.
IT engineer, ZAO Mobicom-Kavkaz

-
Please check that your question  has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

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




Re: xi:fallback element in cocoon's Xinclude transformer

2002-12-18 Thread Konstantin Piroumian
Hi!

From: Yury Mikhienko [EMAIL PROTECTED]

 Hi all!

 Can anyone answer  the follofing question:
 Why cocoon's Xinclude transformer does not still emplement xi:fallback
element?
 (See recomendations in http://www.w3.org/TR/xinclude/)
 The implementation of this feature requires a simple modification in
Xinclude transformer code.
 (I tried to hack the Xinclude transformer for add xi:fallback and it works
:) )

Feel free to post a patch to Bugzilla, so developers could review it and
apply.

Konstantin


 --

 Best regards,
 Yury Mikhienko.
 IT engineer, ZAO Mobicom-Kavkaz

 -
 Please check that your question  has not already been answered in the
 FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

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




-
Please check that your question  has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

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




Cocoon Release 2.04 install for Dummies - Windows 2000

2002-12-18 Thread Franck Lumpe
I found it was not so easy to setup C2 for absolute Java Beginners (that's
me!),  because you have to look at all install docs (Java + Tomcat + Cocoon)
and check what is valid for you.

So I released a new page on the Wiki.

= How to setup Cocoon Release 2.0.4 + Tomcat 4.1.17 + Java SDK 1.3.1 on a
Windows 2000 PC.

http://outerthought.net/wiki/Wiki.jsp?page=CocoonDistSetupWin2000

An absolute no brainer how-to instal Cocoon 2.0.4 on a Windows 2000 system
without Java and Tomcat previously installed.

Hope this helps,

Franck Lumpe
Iberplus Internet, S.L.
www.iberplus.es
E-Business Consulting


-
Please check that your question  has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

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




build Cocoon2.1 CVS [ERROR]

2002-12-18 Thread Cocoon User

i try to build cocoon 2.1 CVS [2002.12.18 snapshot]

environment:
win XP
jakarta-tomcat-4.1.17
j2sdk1.4.1_01


i put the .war file into webapp  folder an start tomcat

when i ask cocoon [http://.:8080/cocoon]

i recieve the follow error

(copy - paste)

from error.log:

ERROR   (2002-12-18) 11:53.44:153   [access]
(/cocoon/documents/index.html) Thread-9/CocoonServlet: Problem with Cocoon
servlet
org.apache.cocoon.ProcessingException: Failed to execute pipeline.:
org.apache.cocoon.CascadingIOException:
org.apache.xml.utils.WrappedRuntimeException: The output format must have
a '{http://xml.apache.org/xslt}content-handler' property!:
org.apache.xml.utils.WrappedRuntimeException: The output format must have
a '{http://xml.apache.org/xslt}content-handler' property!
at
org.apache.cocoon.components.pipeline.AbstractProcessingPipeline.processXMLPipeline(AbstractProcessingPipeline.java:519)
at
org.apache.cocoon.components.pipeline.impl.AbstractCachingProcessingPipeline.processXMLPipeline(AbstractCachingProcessingPipeline.java:192)
at
org.apache.cocoon.components.pipeline.AbstractProcessingPipeline.process(AbstractProcessingPipeline.java:484)
at
org.apache.cocoon.components.treeprocessor.sitemap.SerializeNode.invoke(SerializeNode.java:149)
at
org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:84)
at
org.apache.cocoon.components.treeprocessor.sitemap.PreparableMatchNode.invoke(PreparableMatchNode.java:164)


any idea?


i remember the days i try to build cocoon2rc1
i have to comment some lines in sitemap.xmap and recombile to have a
working .war


stavros kounis


-
Please check that your question  has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

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




Re: value-substitution in Cocoon

2002-12-18 Thread Anna Afonchenko
Hi Konstantin.
Thank you for answering.
It would be very nice to have combination of input modules in sitemap
substition values. Waiting for this to be implemented in one of the further
versions of Cocoon (hopefully).
For now I will just use substring-before and substring-after to get the
desired result.
One last question:
What is the sample (samples/module) that you are talking about?
There is no module directory under samples directory (at least in my
distribution,
that I downloaded just this week).
Also, if I just print http://localhost:8080/cocoon/samples/modules (or
module)
I get an error of resource not found.
So where is this sample? I would really like to look at it.

Thank you for your help.

Anna


- Original Message -
From: Konstantin Piroumian [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Sent: Wednesday, December 18, 2002 11:52 AM
Subject: Re: value-substitution in Cocoon


Hi Anna and Team!

CC-ing this message to Cocoon Dev list, cause it raises a more general
requirement for possibility to combine input modules with other input
modules in sitemap substitution values (see below for a use-case).

From: Anna Afonchenko [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, December 18, 2002 12:23
Subject: Re: value-substitution in Cocoon


 Sorry for returning to this issue again, but I can't find an answer.
 Can I use value substitutoin inside the input module?
 Referring the example that yoou gave me, I don't want to get the substring
 of the whole URI, if I have match:
 map:match pattern=*/*.html

I see.


 I want to refer to the first wildcard inside the request: module,
something
 like:
 map:parameter name=param value={request:substring({1},0,1)}
 e.g. I want to apply XPath expression only on part of the URI using value
 substitution.

Quite natural desire. Unfortunately, this is not supported (I hope yet), but
it would be very useful.

 This is probably very stupid question, but I can't find an answer.

Don't bother so much about stupid questions, if it were really stupid then
I'd simply ignore it ;)

 Can somebody please explain me this or redirect me to some URL with
 explanations?
 (I read the http://xml.apache.org/cocoon/userdocs/concepts/modules.html,
but
 it just explains the concept of modules, it doesn't have the example that
I
 need).

Yes, that's true. The documentation for Input module is very short, but I
hope that the sample (/samples/modules) demonstrates most of the
possibilities.

Konstantin


 Thank you very much for help.

 Anna

 - Original Message -
 From: Konstantin Piroumian [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Tuesday, December 17, 2002 2:13 PM
 Subject: Re: value-substitution in Cocoon


 Hi!
 (Please do not use HTML mails in the mailing list.)

 I see two ways to solve this task:
   1. Use an action that will get the original parameter and generate
another
 one, which you'll pass to the transformer.
   2. Use a the Request input module, e.g.  map:parameter name=param
 value={request:substring(requestURI, 0, 1)}/ - this sample will give
you
 the first letter (see /samples/module/sitemap.xmap and XPath reference to
 learn how to get the last character).

 It sounds a little strange what you are trying to do though...

 Regards,
   Konstantin

 - Original Message -
 From: Anna Afonchenko
 To: cocoon-users
 Sent: Tuesday, December 17, 2002 14:55
 Subject: value-substitution in Cocoon


 I have the following question:
 I know that in Cocoon I can use value substitution inside a pipeline, e.g.
 if I have a pipeline
 map:pipeline
   map:match pattern=*/*.html
 map:generate src={2}.html/
 map:transform src=some.xsl
   map:parameter name=param value={1}/
 /map:transform
   /map:match
 /map:pipeline

 and if I write the URI http://localhost:8080/cocoon/param1/some.html

 then in the pipeline the stylesheet some.xsl will receive a parameter with
 name param and value param1. So this is my question:
 Can I somehow parse/evaluate this parameter {1} inside the sitemap (not
 inside the xsl).
 E.g., can I somehow, having {1}=param1 extract the last character (1
in
 this case) and send to the xsl only it, or, having parameter {1}=1, send
 {1}+1, i.e. 2 to the stylesheet?

 I need this because I want to build pipeline that will get some parameter
n,
 and after it is executed I want to call the same pipeline with parameter
 n+1.
 Is this possible in sitemap?

 Thank you very much for help.

 Anna


 -
 Please check that your question  has not already been answered in the
 FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

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


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

problem in writing Actions

2002-12-18 Thread Anna Afonchenko



Hi all.
I am exploring the action 
possibilities in Cocoon now, and I wanted to test some actions.
I took sample action class 
RandomAction.java (from book "Cocoon:Building XML Applications" by 
Langham Ziegeler), changed the package name to ub, and copied this 
file into ub directory under cocoon directory. Then I declared it in a sitemap 
by adding
map:action name="random" 
src=""/

When I try to use it (even if I just 
call http://localhost:8080/cocoon/and 
not the pattern match for this action), I get an error from Cocoon:

type 
fatal
message 
Error in sitemap configuration : ub.RandomAction
description 
org.apache.avalon.framework.configuration.ConfigurationException: Error in 
sitemap configuration : ub.RandomAction
sender 
org.apache.cocoon.servlet.CocoonServlet
source 
Cocoon servlet
request-uri
/cocoon/
I tried to move the RandomAction.java 
to the cocoon directory, it doesn't help.
What should I do and where should I put 
my own Action class in order to use it in the sitemap?
Thank you very much for 
help.
Anna


AW: problem in writing Actions

2002-12-18 Thread Sternath Elmar



Hi 
Anna,

the .java file 
has to be compiled into a class file. Cocoon then accesses the class file to 
execute the desired functionality. For compilation, you need an appropriate 
tool, for instance ant. I would recommend to get familiar with ant. Ant provides 
functionality to compile .java files into .class files, pack them into .jar 
libraries and deploy them into the target directory of 
cocoon.

Regards,
Elmar
-Ursprngliche Nachricht-Von: 
Anna Afonchenko [mailto:[EMAIL PROTECTED]]Gesendet: Mittwoch, 18. 
Dezember 2002 11:22An: cocoon-usersBetreff: problem in 
writing Actions

  Hi all.
  I am exploring the action 
  possibilities in Cocoon now, and I wanted to test some actions.
  I took sample action class 
  RandomAction.java (from book "Cocoon:Building XML Applications" by 
  Langham Ziegeler), changed the package name to ub, and copied this 
  file into ub directory under cocoon directory. Then I declared it in a sitemap 
  by adding
  map:action name="random" 
  src=""/
  
  When I try to use it (even if I 
  just call http://localhost:8080/cocoon/and 
  not the pattern match for this action), I get an error from 
  Cocoon:
  
  type 
  fatal
  message 
  Error in sitemap configuration : ub.RandomAction
  description 
  org.apache.avalon.framework.configuration.ConfigurationException: Error in 
  sitemap configuration : ub.RandomAction
  sender 
  org.apache.cocoon.servlet.CocoonServlet
  source 
  Cocoon servlet
  request-uri
  /cocoon/
  I tried to move the RandomAction.java 
  to the cocoon directory, it doesn't help.
  What should I do and where should I 
  put my own Action class in order to use it in the sitemap?
  Thank you very much for 
  help.
  Anna


Re: value-substitution in Cocoon

2002-12-18 Thread Konstantin Piroumian
From: Anna Afonchenko [EMAIL PROTECTED]

 Hi Konstantin.
 Thank you for answering.
 It would be very nice to have combination of input modules in sitemap
 substition values. Waiting for this to be implemented in one of the
further
 versions of Cocoon (hopefully).
 For now I will just use substring-before and substring-after to get the
 desired result.

Btw, you were saying that you need to pass 'value + 1'. Try to use XPath
syntax for that, though, I'm not sure that JXPath handles arithmetic
operations.

 One last question:
 What is the sample (samples/module) that you are talking about?
 There is no module directory under samples directory (at least in my
 distribution,
 that I downloaded just this week).
 Also, if I just print http://localhost:8080/cocoon/samples/modules (or
 module)
 I get an error of resource not found.
 So where is this sample? I would really like to look at it.

It's currently available only in Cocoon 2.1, which in turn is available only
from CVS.
I'll try to move it to C 2.0.5 too when release date is decided.

Konstantin


 Thank you for your help.

 Anna


 - Original Message -
 From: Konstantin Piroumian [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Cc: [EMAIL PROTECTED]
 Sent: Wednesday, December 18, 2002 11:52 AM
 Subject: Re: value-substitution in Cocoon


 Hi Anna and Team!

 CC-ing this message to Cocoon Dev list, cause it raises a more general
 requirement for possibility to combine input modules with other input
 modules in sitemap substitution values (see below for a use-case).

 From: Anna Afonchenko [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Wednesday, December 18, 2002 12:23
 Subject: Re: value-substitution in Cocoon


  Sorry for returning to this issue again, but I can't find an answer.
  Can I use value substitutoin inside the input module?
  Referring the example that yoou gave me, I don't want to get the
substring
  of the whole URI, if I have match:
  map:match pattern=*/*.html

 I see.

 
  I want to refer to the first wildcard inside the request: module,
 something
  like:
  map:parameter name=param value={request:substring({1},0,1)}
  e.g. I want to apply XPath expression only on part of the URI using
value
  substitution.

 Quite natural desire. Unfortunately, this is not supported (I hope yet),
but
 it would be very useful.

  This is probably very stupid question, but I can't find an answer.

 Don't bother so much about stupid questions, if it were really stupid then
 I'd simply ignore it ;)

  Can somebody please explain me this or redirect me to some URL with
  explanations?
  (I read the http://xml.apache.org/cocoon/userdocs/concepts/modules.html,
 but
  it just explains the concept of modules, it doesn't have the example
that
 I
  need).

 Yes, that's true. The documentation for Input module is very short, but I
 hope that the sample (/samples/modules) demonstrates most of the
 possibilities.

 Konstantin

 
  Thank you very much for help.
 
  Anna
 
  - Original Message -
  From: Konstantin Piroumian [EMAIL PROTECTED]
  To: [EMAIL PROTECTED]
  Sent: Tuesday, December 17, 2002 2:13 PM
  Subject: Re: value-substitution in Cocoon
 
 
  Hi!
  (Please do not use HTML mails in the mailing list.)
 
  I see two ways to solve this task:
1. Use an action that will get the original parameter and generate
 another
  one, which you'll pass to the transformer.
2. Use a the Request input module, e.g.  map:parameter name=param
  value={request:substring(requestURI, 0, 1)}/ - this sample will give
 you
  the first letter (see /samples/module/sitemap.xmap and XPath reference
to
  learn how to get the last character).
 
  It sounds a little strange what you are trying to do though...
 
  Regards,
Konstantin
 
  - Original Message -
  From: Anna Afonchenko
  To: cocoon-users
  Sent: Tuesday, December 17, 2002 14:55
  Subject: value-substitution in Cocoon
 
 
  I have the following question:
  I know that in Cocoon I can use value substitution inside a pipeline,
e.g.
  if I have a pipeline
  map:pipeline
map:match pattern=*/*.html
  map:generate src={2}.html/
  map:transform src=some.xsl
map:parameter name=param value={1}/
  /map:transform
/map:match
  /map:pipeline
 
  and if I write the URI http://localhost:8080/cocoon/param1/some.html
 
  then in the pipeline the stylesheet some.xsl will receive a parameter
with
  name param and value param1. So this is my question:
  Can I somehow parse/evaluate this parameter {1} inside the sitemap (not
  inside the xsl).
  E.g., can I somehow, having {1}=param1 extract the last character (1
 in
  this case) and send to the xsl only it, or, having parameter {1}=1, send
  {1}+1, i.e. 2 to the stylesheet?
 
  I need this because I want to build pipeline that will get some
parameter
 n,
  and after it is executed I want to call the same pipeline with parameter
  n+1.
  Is this possible in sitemap?
 
  Thank you very much for help.
 
  Anna
 
 
  

Fwd: Example

2002-12-18 Thread Yves Vindevogel
This is an example how to pass parameters from a link (request parameters) to 
an XSL and use it there as parameter
It should use a valid XPATH

This is for Lenya 


Pipeline:

map:match pattern=products.html
map:generate src=products.xml/
map:transform src=tables.xsl
map:parameter
name=use-request-parameters value=true/
/map:transform
map:serialize type=html/
/map:match

In attach the two files you need.  There are some issues with how you pass the 
Xpath, but use this as a starter 

Usage:
http://yourserver/products.html?xpath=ProductID=16
http://yourserver/products.html?xpath=SupplierID=4
-- 
Kind regards,
Yves Vindevogel

Implements
Kortrijkstraat 2 bus 1  --  9700 Oudenaarde  --  Belgium
Phone/Fax: +32 (55) 45.74.73  --  Mobile: +32 (478) 80.82.91
Mail: [EMAIL PROTECTED]  --  www.implements.be

Quote: The winner never says participating is more important than winning.


products.xml
Description: Binary data


tables.xsl
Description: Binary data
-
Please check that your question  has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

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


Re: Writing output of pipeline to a file

2002-12-18 Thread Ludovic de Beaurepaire



Hi Anna,

When you useredirect:write 
file="testWrite.xml", your XML datas are redirected, so you have to generate 
other XML datas for your serializer. In your case in error, no XML datas are 
passed after the transformation.

So, in your case, you have to transform AND save 
your XML datas. i think the best solution is saving these datas in file in an 
Action, and use this file for transformation.

Ludovic

  - Original Message - 
  From: 
  Anna Afonchenko 
  
  To: [EMAIL PROTECTED] 
  Sent: Wednesday, December 18, 2002 8:44 
  AM
  Subject: Re: Writing output of pipeline 
  to a file
  
  Thank you all for answering me, but 
  I still can't manage to do it.
  Here is my pipeline:
  map:match 
  pattern="test.html"
   map:generate 
  src=""/
   
  map:transform src=""/
   
  map:serialize type="xml"/
  map:match
  
  Here is my 
  writeToFile.xsl:
  ?xml version="1.0" 
  encoding="UTF-8"?
  xsl:stylesheet 
  version="1.0"xmlns:xsl="http://www.w3.org/1999/XSL/Transform"xmlns:fo=http://www.w3.org/1999/XSL/Formatxmlns:redirect="org.apache.xalan.xslt.extensions.Redirect"extension-element-prefixes="redirect"
  xsl:output 
  method="xml"/
  xsl:template match="/"
  xsl:copy-of select="*"/
  redirect:open 
  file="testWrite.xml"/redirect:write 
  file="testWrite.xml"xsl:copy-of 
  select="*"//redirect:write
  redirect:close file="testWrite.xml"/
  /xsl:template
  /xsl:stylesheet
  
  When I am running this, I get the following error 
  message from the Cocoon:
  
  type 
  fatal
  message 
  Exception in HTMLGenerator.generate()
  description 
  org.apache.cocoon.ProcessingException: Exception in 
  HTMLGenerator.generate(): java.lang.NullPointerException
  sender 
  org.apache.cocoon.servlet.CocoonServlet
  source 
  Cocoon servlet
  request-uri
  If I remove all the redirect: lines, then I get the 
  serialized input file, so the input is OK, obviously,
  I have some problems with this redirect:
  Can anybody please tell me what's wrong?
  Thank you very much for help.
  Anna
  
  
- Original Message - 
From: 
Ludovic de Beaurepaire 
To: [EMAIL PROTECTED] 
Sent: Tuesday, December 17, 2002 4:36 
PM
Subject: Re: Writing output of pipeline 
to a file

First, i had just to save it (not to send the 
result file to the client). I did it in a stylesheet like this 
:

?xml version="1.0" 
encoding="ISO-8859-1"?xsl:stylesheet version="1.0" 
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"xmlns:redirect="org.apache.xalan.xslt.extensions.Redirect"extension-element-prefixes="redirect"
xsl:output method="xml" 
encoding="ISO-8859-1"/xsl:template 
match="/"redirect:write 
file="{$path}"xsl:copy-of 
select="*"//redirect:write
TEXTEoutput for the 
client/TEXTE
/xsl:template 
/xsl:stylesheet
But there was problems with some configuration, 
so finally i did it in my Action who had to generate the XML.

If you have to duplicate your XML stream, one 
for saving, another for the client, i thinkyou have to do this in an 
action. It generates the XML file and this one is next 
transformed/serialized.


map:match 
pattern="some.html"
 map:act 
type="YourAction" map:generate 
src=""/ 
 
map:transform src=""/
 
map:serialize type="html"/
/map:match

Ludovic

  - Original Message - 
  From: 
  Anna 
  Afonchenko 
  To: [EMAIL PROTECTED] 
  Sent: Tuesday, December 17, 2002 3:09 
  PM
  Subject: Re: Writing output of 
  pipeline to a file
  
  Hi Ludovic. Thank you for 
  answering.
  Can you say what do you do to 
  save this XML file?
  I mean, if I have the following 
  pipeline:
  map:match 
  pattern="some.html"
   
  map:generate src=""/
   
  map:transform src=""/
   
  map:serialize type="xml"/
  /map:match
  this pipeline produces an xml 
  file. What should I use in order to save this file as 
  "some.xml".
  
  Sorry for asking almost exactly 
  the same, I just didn't understood from you answer what should I 
  do.
  Thank you very much for 
  help.
  
  Anna
  
- Original Message - 
From: 
Ludovic de Beaurepaire 
To: [EMAIL PROTECTED] 
Sent: Tuesday, December 17, 2002 
4:03 PM
Subject: Re: Writing output of 
pipeline to a file

Hi Anna,

I had this problem and didn't find a 
solution for caching the output of the pipeline to perform an 
OutputAction as saving in a file. Finally i chose to save the XML, and 
to perfom the transformation/serialization when a request need the 
transformed file. It supposes that the transformers are not 
modified.

Another solution should be using the 
CommandLine classes to 

Re: problem in writing Actions

2002-12-18 Thread Anna Afonchenko



Hi Sternath.
Thanks for the answer.
So, if I get it right, I need to 
compile the java file and put the resulting class file into the 
cocoon
directory? I don't need to put the 
class into some subdirectory of cocoon?
And can you tell me where can I get 
this Ant?

Thanks for help.
Anna

  - Original Message - 
  From: 
  Sternath Elmar 
  To: '[EMAIL PROTECTED]' 
  
  Sent: Wednesday, December 18, 2002 12:34 
  PM
  Subject: AW: problem in writing 
  Actions
  
  Hi 
  Anna,
  
  the .java file 
  has to be compiled into a class file. Cocoon then accesses the class file to 
  execute the desired functionality. For compilation, you need an appropriate 
  tool, for instance ant. I would recommend to get familiar with ant. Ant 
  provides functionality to compile .java files into .class files, pack them 
  into .jar libraries and deploy them into the target directory of 
  cocoon.
  
  Regards,
  Elmar
  -Ursprüngliche Nachricht-Von: 
  Anna Afonchenko [mailto:[EMAIL PROTECTED]]Gesendet: Mittwoch, 18. 
  Dezember 2002 11:22An: cocoon-usersBetreff: problem in 
  writing Actions
  
Hi all.
I am exploring the action 
possibilities in Cocoon now, and I wanted to test some actions.
I took sample action class 
RandomAction.java (from book "Cocoon:Building XML Applications" by 
Langham Ziegeler), changed the package name to ub, and copied 
this file into ub directory under cocoon directory. Then I declared it in a 
sitemap by adding
map:action name="random" 
src=""/

When I try to use it (even if I 
just call http://localhost:8080/cocoon/and 
not the pattern match for this action), I get an error from 
Cocoon:

type 
fatal
message Error in sitemap configuration : 
ub.RandomAction
description 
org.apache.avalon.framework.configuration.ConfigurationException: Error 
in sitemap configuration : ub.RandomAction
sender org.apache.cocoon.servlet.CocoonServlet
source Cocoon servlet
request-uri
/cocoon/
I tried to move the 
RandomAction.java to the cocoon directory, it doesn't help.
What should I do and where should I 
put my own Action class in order to use it in the sitemap?
Thank you very much for 
help.
Anna


AW: problem in writing Actions

2002-12-18 Thread Sternath Elmar



Hi,

in my 
project, I produced a jar file containing all class files and put it into 
webapps/cocoon/WEB-INF/lib. The path of the class files in the jar 
mustmatch your definition in the sitemap. For ant, take a look at: http://jakarta.apache.org/ant/

Regards,
Elmar

-Ursprüngliche 
Nachricht-Von: Anna Afonchenko 
[mailto:[EMAIL PROTECTED]]Gesendet: Mittwoch, 18. Dezember 2002 
11:43An: [EMAIL PROTECTED]Betreff: Re: problem 
in writing Actions

  Hi Sternath.
  Thanks for the answer.
  So, if I get it right, I need to 
  compile the java file and put the resulting class file into the 
  cocoon
  directory? I don't need to put the 
  class into some subdirectory of cocoon?
  And can you tell me where can I get 
  this Ant?
  
  Thanks for help.
  Anna
  
- Original Message - 
From: 
Sternath Elmar 
To: '[EMAIL PROTECTED]' 

Sent: Wednesday, December 18, 2002 
12:34 PM
Subject: AW: problem in writing 
Actions

Hi 
Anna,

the .java 
file has to be compiled into a class file. Cocoon then accesses the class 
file to execute the desired functionality. For compilation, you need an 
appropriate tool, for instance ant. I would recommend to get familiar with 
ant. Ant provides functionality to compile .java files into .class files, 
pack them into .jar libraries and deploy them into the target directory of 
cocoon.

Regards,
Elmar
-Ursprüngliche 
Nachricht-Von: Anna Afonchenko 
[mailto:[EMAIL PROTECTED]]Gesendet: Mittwoch, 18. Dezember 2002 
11:22An: cocoon-usersBetreff: problem in writing 
Actions

  Hi all.
  I am exploring the action 
  possibilities in Cocoon now, and I wanted to test some 
  actions.
  I took sample action class 
  RandomAction.java (from book "Cocoon:Building XML Applications" by 
  Langham Ziegeler), changed the package name to ub, and copied 
  this file into ub directory under cocoon directory. Then I declared it in 
  a sitemap by adding
  map:action name="random" 
  src=""/
  
  When I try to use it (even if I 
  just call http://localhost:8080/cocoon/and 
  not the pattern match for this action), I get an error from 
  Cocoon:
  
  type fatal
  message Error in sitemap configuration : 
  ub.RandomAction
  description 
  org.apache.avalon.framework.configuration.ConfigurationException: Error 
  in sitemap configuration : ub.RandomAction
  sender 
org.apache.cocoon.servlet.CocoonServlet
  source Cocoon servlet
  request-uri
  /cocoon/
  I tried to move the 
  RandomAction.java to the cocoon directory, it doesn't help.
  What should I do and where should 
  I put my own Action class in order to use it in the sitemap?
  Thank you very much for 
  help.
  Anna


Re: Writing output of pipeline to a file

2002-12-18 Thread Anna Afonchenko



Thank you Ludovic.
Just to ensure that I got you 
right:
You say that I need to write an 
action that will get the content of the file, will write it, and then in the 
same pipeline there will be generator that will just read the file that was 
written and will serialize the output to the browser?
But I need to write the 
fileafter itwas transformed by the xsl. How this is possible in 
sitemap?
I just don't understand the logic of 
what I need to do in order to both write to the file and output file to the 
browser.
Sorry I'm bothering you, but can you 
just explain me in little more detail what I need to do?

Thank you very very 
much.
Anna

  - Original Message - 
  From: 
  Ludovic de Beaurepaire 
  
  To: [EMAIL PROTECTED] 
  
  Sent: Wednesday, December 18, 2002 12:44 
  PM
  Subject: Re: Writing output of pipeline 
  to a file
  
  Hi Anna,
  
  When you useredirect:write 
  file="testWrite.xml", your XML datas are redirected, so you have to 
  generate other XML datas for your serializer. In your case in error, no XML 
  datas are passed after the transformation.
  
  So, in your case, you have to transform AND save 
  your XML datas. i think the best solution is saving these datas in file in an 
  Action, and use this file for transformation.
  
  Ludovic
  
- Original Message - 
From: 
Anna 
Afonchenko 
To: [EMAIL PROTECTED] 

Sent: Wednesday, December 18, 2002 8:44 
AM
Subject: Re: Writing output of pipeline 
to a file

Thank you all for answering me, 
but I still can't manage to do it.
Here is my pipeline:
map:match 
pattern="test.html"
 
map:generate src=""/
 
map:transform src=""/
 
map:serialize type="xml"/
map:match

Here is my 
writeToFile.xsl:
?xml version="1.0" 
encoding="UTF-8"?
xsl:stylesheet 
version="1.0"xmlns:xsl="http://www.w3.org/1999/XSL/Transform"xmlns:fo=http://www.w3.org/1999/XSL/Formatxmlns:redirect="org.apache.xalan.xslt.extensions.Redirect"extension-element-prefixes="redirect"
xsl:output 
method="xml"/
xsl:template match="/"
xsl:copy-of select="*"/
redirect:open 
file="testWrite.xml"/redirect:write 
file="testWrite.xml"xsl:copy-of 
select="*"//redirect:write
redirect:close file="testWrite.xml"/
/xsl:template
/xsl:stylesheet

When I am running this, I get the following error 
message from the Cocoon:

type 
fatal
message Exception in 
HTMLGenerator.generate()
description 
org.apache.cocoon.ProcessingException: Exception in 
HTMLGenerator.generate(): java.lang.NullPointerException
sender org.apache.cocoon.servlet.CocoonServlet
source Cocoon servlet
request-uri
If I remove all the redirect: lines, then I get the 
serialized input file, so the input is OK, obviously,
I have some problems with this redirect:
Can anybody please tell me what's wrong?
Thank you very much for help.
Anna


  - Original Message - 
  From: 
  Ludovic de Beaurepaire 
  
  To: [EMAIL PROTECTED] 
  
  Sent: Tuesday, December 17, 2002 4:36 
  PM
  Subject: Re: Writing output of 
  pipeline to a file
  
  First, i had just to save it (not to send the 
  result file to the client). I did it in a stylesheet like this 
  :
  
  ?xml version="1.0" 
  encoding="ISO-8859-1"?xsl:stylesheet version="1.0" 
  xmlns:xsl="http://www.w3.org/1999/XSL/Transform"xmlns:redirect="org.apache.xalan.xslt.extensions.Redirect"extension-element-prefixes="redirect"
  xsl:output method="xml" 
  encoding="ISO-8859-1"/xsl:template 
  match="/"redirect:write 
  file="{$path}"xsl:copy-of 
  select="*"//redirect:write
  TEXTEoutput for the 
  client/TEXTE
  /xsl:template 
  /xsl:stylesheet
  But there was problems with some 
  configuration, so finally i did it in my Action who had to generate the 
  XML.
  
  If you have to duplicate your XML stream, one 
  for saving, another for the client, i thinkyou have to do this in an 
  action. It generates the XML file and this one is next 
  transformed/serialized.
  
  
  map:match 
  pattern="some.html"
   map:act 
  type="YourAction" map:generate 
  src=""/ 
   
  map:transform src=""/
   
  map:serialize type="html"/
  /map:match
  
  Ludovic
  
- Original Message - 
From: 
Anna 
Afonchenko 
To: [EMAIL PROTECTED] 

Sent: Tuesday, December 17, 2002 
3:09 PM
Subject: Re: Writing output of 
pipeline to a file

Hi Ludovic. Thank you for 
answering.
Can you say what do you do to 
save this XML file?
I mean, if I have the 
following pipeline:
map:match 

XMLForm Wizard alternative?

2002-12-18 Thread Robert Sösemann
Hy,

in our project (CMS) we want to easily generate input fields in a
wizard-like interface. It is later used by authors to put different types of
articles into a database.

As different types of articles have other information needs, we want to
provide the user with form field that represent that needs of the specific
article. So we need a mechanism to generate steps of our wizard (namely page
with form fields) from centralized information (great would be the db)

As this XMLWizard mechanism is only available from a cocoon beta, we are not
allowed to use it. Can you imagine an alternative way to solve this?

Thanks in advance,
Robert


-
Please check that your question  has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

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




XSP/ESQL - separation of concerns?

2002-12-18 Thread Robert Sösemann
Hello,

in my current project I am using xsp and esql logicsheet for db retrivieval
and tag generation only.
Although I know that this is good for developing (no extra compilation) I am
not very happy with it.

What I don't like is:
---
- many SQL statement (complex tag structure) mixed cionfusingly with the
actual document elements
- the low readability of the code, also hard to debug...
- no cocoon-like separtion of concerns (mix SQL-logic with tags)
- the feeling that it is not the most performant way of doing this

What I would like better (but don't excately know how):
---
- put all SQL that is needed for generating on specific page into another
thing (beans?) that has no tags
- make my xsp shorter, more readable
- have the good balance of performance, easy debugging, extensibility and
the typical cocoon separation of concerns

Here is a short but typical code snippet:
---
ROOT
esql:connection
esql:poolmysql_pool/esql:pool

esql:execute-query
esql:query
*COMPLEX QUERY, SOMETIMES 5 esql:query PER XSP *
/esql:query

esql:results
esql:row-results
ARTICLE
xsp:attribute name=IDesql:get-int
column=5//xsp:attribute
xsp:attribute name=MAINesql:get-string
column=7//xsp:attribute
xsp:attribute name=SUBesql:get-string
column=8//xsp:attribute
xsp:attribute name=PDFPRINTesql:get-int
column=9//xsp:attribute

!-- Attribute evtl. NULL bei Direktanzeige --
xsp:logic
if(!esql:is-null column=3/) {
HEADEResql:get-string
column=1//HEADER
}

/xsp:logic

esql:get-xml column=2/

DATEesql:get-string column=11//DATE
AUTHOResql:get-string column=12//AUTHOR
/ARTICLE
/esql:row-results
/esql:results
esql:no-results/esql:no-results
esql:error-results/esql:error-results
/esql:execute-query
/esql:connection
/ROOT

/xsp:page


Should I better use own generators or beans? What are your experiences?

Robert



-
Please check that your question  has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

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




render a coplet with a border

2002-12-18 Thread Gerald Kahrer
Hi !

I am using the portal-fw ( cocoon development version 2.1 from cvs ).

How can i tell the PortalGenerator to render the coplets with a border?

In the customization dialog you can only control color, column with and
column count of the coplets.

Is there a possibility to take more influence on the rendering of the
coplets ?

thx
Gerald

-- 
+++ GMX - Mail, Messaging  more  http://www.gmx.net +++
NEU: Mit GMX ins Internet. Rund um die Uhr für 1 ct/ Min. surfen!


-
Please check that your question  has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

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




Re: Writing output of pipeline to a file

2002-12-18 Thread Ludovic de Beaurepaire



Sorry Anna, i didn't understand it.

I thought you had to generate data and next save 
and transfom them, but you have datas in a file and want to transform them and 
next save and send them to your browser.

A solution could be to write a transformer (in XSL 
with redirection or in Java), localized after your transformer in the pipeline. 
This onedoes not transform XML datas, but copy (not redirect) them in a 
file.

Ludovic

  - Original Message - 
  From: 
  Anna Afonchenko 
  
  To: [EMAIL PROTECTED] 
  Sent: Wednesday, December 18, 2002 11:57 
  AM
  Subject: Re: Writing output of pipeline 
  to a file
  
  Thank you Ludovic.
  Just to ensure that I got you 
  right:
  You say that I need to write an 
  action that will get the content of the file, will write it, and then in the 
  same pipeline there will be generator that will just read the file that was 
  written and will serialize the output to the browser?
  But I need to write the 
  fileafter itwas transformed by the xsl. How this is possible in 
  sitemap?
  I just don't understand the logic 
  of what I need to do in order to both write to the file and output file to the 
  browser.
  Sorry I'm bothering you, but can 
  you just explain me in little more detail what I need to do?
  
  Thank you very very 
  much.
  Anna
  
- Original Message - 
From: 
Ludovic de Beaurepaire 
To: [EMAIL PROTECTED] 
Sent: Wednesday, December 18, 2002 
12:44 PM
Subject: Re: Writing output of pipeline 
to a file

Hi Anna,

When you useredirect:write 
file="testWrite.xml", your XML datas are redirected, so you have to 
generate other XML datas for your serializer. In your case in error, no XML 
datas are passed after the transformation.

So, in your case, you have to transform AND 
save your XML datas. i think the best solution is saving these datas in file 
in an Action, and use this file for transformation.

Ludovic

  - Original Message - 
  From: 
  Anna 
  Afonchenko 
  To: [EMAIL PROTECTED] 
  Sent: Wednesday, December 18, 2002 
  8:44 AM
  Subject: Re: Writing output of 
  pipeline to a file
  
  Thank you all for answering me, 
  but I still can't manage to do it.
  Here is my 
  pipeline:
  map:match 
  pattern="test.html"
   
  map:generate src=""/
   
  map:transform src=""/
   
  map:serialize type="xml"/
  map:match
  
  Here is my 
  writeToFile.xsl:
  ?xml version="1.0" 
  encoding="UTF-8"?
  xsl:stylesheet 
  version="1.0"xmlns:xsl="http://www.w3.org/1999/XSL/Transform"xmlns:fo=http://www.w3.org/1999/XSL/Formatxmlns:redirect="org.apache.xalan.xslt.extensions.Redirect"extension-element-prefixes="redirect"
  xsl:output 
  method="xml"/
  xsl:template match="/"
  xsl:copy-of select="*"/
  redirect:open 
  file="testWrite.xml"/redirect:write 
  file="testWrite.xml"xsl:copy-of 
  select="*"//redirect:write
  redirect:close file="testWrite.xml"/
  /xsl:template
  /xsl:stylesheet
  
  When I am running this, I get the following error 
  message from the Cocoon:
  
  type fatal
  message Exception in 
  HTMLGenerator.generate()
  description 
  org.apache.cocoon.ProcessingException: Exception in 
  HTMLGenerator.generate(): java.lang.NullPointerException
  sender 
  org.apache.cocoon.servlet.CocoonServlet
  source Cocoon servlet
  request-uri
  If I remove all the redirect: lines, then I get the 
  serialized input file, so the input is OK, obviously,
  I have some problems with this redirect:
  Can anybody please tell me what's wrong?
  Thank you very much for help.
  Anna
  
  
- Original Message - 
From: 
Ludovic de Beaurepaire 
To: [EMAIL PROTECTED] 
Sent: Tuesday, December 17, 2002 
4:36 PM
Subject: Re: Writing output of 
pipeline to a file

First, i had just to save it (not to send 
the result file to the client). I did it in a stylesheet like this 
:

?xml version="1.0" 
encoding="ISO-8859-1"?xsl:stylesheet version="1.0" 
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"xmlns:redirect="org.apache.xalan.xslt.extensions.Redirect"extension-element-prefixes="redirect"
xsl:output method="xml" 
encoding="ISO-8859-1"/xsl:template 
match="/"redirect:write 
file="{$path}"xsl:copy-of 
select="*"//redirect:write
TEXTEoutput for the 
client/TEXTE
/xsl:template 
/xsl:stylesheet
But there was problems with some 
configuration, so finally i did it in my Action who had to generate the 
XML.

If you have to duplicate your XML stream, 
one for saving, 

RE: XSP/ESQL - separation of concerns?

2002-12-18 Thread Luca Morandini
Robert,

you could try using SQLTransformer to handle just your SQL queries and then apply a 
stylesheet to transform them, if need be, in
another XML dictionary before the final rendegin in HTML, WML, PDF, etc.

The advantages are:
- a streamlining of the source code
- the ability to easily replace XML produced by a query with a static XML file (and 
viceversa)

The caveats are:
- SQLTranformer in slower than ESQL
- use 2.0.4, since there is a nasty bug in 2.0.3 making hard, at times, the use of 
XSLT after an SQLTransformer step

Best regards,

-
   Luca Morandini
   GIS Consultant
  [EMAIL PROTECTED]
http://utenti.tripod.it/lmorandini/index.html
-


 -Original Message-
 From: Robert Sösemann [mailto:[EMAIL PROTECTED]]
 Sent: Wednesday, December 18, 2002 12:22 PM
 To: [EMAIL PROTECTED]
 Subject: XSP/ESQL - separation of concerns?


 Hello,

 in my current project I am using xsp and esql logicsheet for db retrivieval
 and tag generation only.
 Although I know that this is good for developing (no extra compilation) I am
 not very happy with it.

 What I don't like is:
 ---
 - many SQL statement (complex tag structure) mixed cionfusingly with the
 actual document elements
 - the low readability of the code, also hard to debug...
 - no cocoon-like separtion of concerns (mix SQL-logic with tags)
 - the feeling that it is not the most performant way of doing this

 What I would like better (but don't excately know how):
 ---
 - put all SQL that is needed for generating on specific page into another
 thing (beans?) that has no tags
 - make my xsp shorter, more readable
 - have the good balance of performance, easy debugging, extensibility and
 the typical cocoon separation of concerns

 Here is a short but typical code snippet:
 ---
 ROOT
 esql:connection
 esql:poolmysql_pool/esql:pool

 esql:execute-query
 esql:query
 *COMPLEX QUERY, SOMETIMES 5 esql:query PER XSP *
 /esql:query

 esql:results
 esql:row-results
 ARTICLE
 xsp:attribute name=IDesql:get-int
 column=5//xsp:attribute
 xsp:attribute name=MAINesql:get-string
 column=7//xsp:attribute
 xsp:attribute name=SUBesql:get-string
 column=8//xsp:attribute
 xsp:attribute name=PDFPRINTesql:get-int
 column=9//xsp:attribute

 !-- Attribute evtl. NULL bei Direktanzeige --
 xsp:logic
 if(!esql:is-null column=3/) {
 HEADEResql:get-string
 column=1//HEADER
 }

 /xsp:logic

 esql:get-xml column=2/

 DATEesql:get-string column=11//DATE
 AUTHOResql:get-string column=12//AUTHOR
 /ARTICLE
 /esql:row-results
 /esql:results
 esql:no-results/esql:no-results
 esql:error-results/esql:error-results
 /esql:execute-query
 /esql:connection
 /ROOT

 /xsp:page


 Should I better use own generators or beans? What are your experiences?

 Robert



 -
 Please check that your question  has not already been answered in the
 FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

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



-
Please check that your question  has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

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




Re: Writing output of pipeline to a file

2002-12-18 Thread Anna Afonchenko



Thank you Ludovic, this seems as a 
perfect solution for me.
Sorry for confusing you by not 
explaining clearlywhat I need.

Thanks
Anna

  - Original Message - 
  From: 
  Ludovic de Beaurepaire 
  
  To: [EMAIL PROTECTED] 
  
  Sent: Wednesday, December 18, 2002 1:30 
  PM
  Subject: Re: Writing output of pipeline 
  to a file
  
  Sorry Anna, i didn't understand it.
  
  I thought you had to generate data and next save 
  and transfom them, but you have datas in a file and want to transform them and 
  next save and send them to your browser.
  
  A solution could be to write a transformer (in 
  XSL with redirection or in Java), localized after your transformer in the 
  pipeline. This onedoes not transform XML datas, but copy (not redirect) 
  them in a file.
  
  Ludovic
  
- Original Message - 
From: 
Anna 
Afonchenko 
To: [EMAIL PROTECTED] 

Sent: Wednesday, December 18, 2002 
11:57 AM
Subject: Re: Writing output of pipeline 
to a file

Thank you Ludovic.
Just to ensure that I got you 
right:
You say that I need to write an 
action that will get the content of the file, will write it, and then in the 
same pipeline there will be generator that will just read the file that was 
written and will serialize the output to the browser?
But I need to write the 
fileafter itwas transformed by the xsl. How this is possible in 
sitemap?
I just don't understand the logic 
of what I need to do in order to both write to the file and output file to 
the browser.
Sorry I'm bothering you, but can 
you just explain me in little more detail what I need to do?

Thank you very very 
much.
Anna

  - Original Message - 
  From: 
  Ludovic de Beaurepaire 
  
  To: [EMAIL PROTECTED] 
  
  Sent: Wednesday, December 18, 2002 
  12:44 PM
  Subject: Re: Writing output of 
  pipeline to a file
  
  Hi Anna,
  
  When you useredirect:write 
  file="testWrite.xml", your XML datas are redirected, so you have to 
  generate other XML datas for your serializer. In your case in error, no 
  XML datas are passed after the transformation.
  
  So, in your case, you have to transform AND 
  save your XML datas. i think the best solution is saving these datas in 
  file in an Action, and use this file for transformation.
  
  Ludovic
  
- Original Message - 
From: 
Anna 
Afonchenko 
To: [EMAIL PROTECTED] 

Sent: Wednesday, December 18, 2002 
8:44 AM
Subject: Re: Writing output of 
pipeline to a file

Thank you all for answering 
me, but I still can't manage to do it.
Here is my 
pipeline:
map:match 
pattern="test.html"
 
map:generate src=""/
 
map:transform src=""/
 
map:serialize type="xml"/
map:match

Here is my 
writeToFile.xsl:
?xml version="1.0" 
encoding="UTF-8"?
xsl:stylesheet 
version="1.0"xmlns:xsl="http://www.w3.org/1999/XSL/Transform"xmlns:fo=http://www.w3.org/1999/XSL/Formatxmlns:redirect="org.apache.xalan.xslt.extensions.Redirect"extension-element-prefixes="redirect"
xsl:output 
method="xml"/
xsl:template match="/"
xsl:copy-of select="*"/
redirect:open 
file="testWrite.xml"/redirect:write 
file="testWrite.xml"xsl:copy-of 
select="*"//redirect:write
redirect:close file="testWrite.xml"/
/xsl:template
/xsl:stylesheet

When I am running this, I get the following 
error message from the Cocoon:

type fatal
message Exception in 
HTMLGenerator.generate()
description 
org.apache.cocoon.ProcessingException: Exception in 
HTMLGenerator.generate(): java.lang.NullPointerException
sender 
org.apache.cocoon.servlet.CocoonServlet
source Cocoon servlet
request-uri
If I remove all the redirect: lines, then I get 
the serialized input file, so the input is OK, obviously,
I have some problems with this 
redirect:
Can anybody please tell me what's 
wrong?
Thank you very much for help.
Anna


  - Original Message - 
  From: 
  Ludovic de 
  Beaurepaire 
  To: [EMAIL PROTECTED] 
  
  Sent: Tuesday, December 17, 2002 
  4:36 PM
  Subject: Re: Writing output of 
  pipeline to a file
  
  First, i had just to save it (not to send 
  the result file to the client). I did it in a stylesheet like this 
  :
  
  ?xml version="1.0" 
  

XMLForm: Binding of values

2002-12-18 Thread Jakob Praher
hi,

I am dropping my xslt/xform impl in favour of the existing cocoon xform
approach.

Now I have come over some questions regarding the functionality:

- Is it possible to bind to existing data?
- If so how to do it ?

thanks

-- Jakob




-
Please check that your question  has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

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




RE: Writing output of pipeline to a file

2002-12-18 Thread Luca Morandini
Anna,

why don't you use SourceWritingTransformer to write the document, and then transform 
its output (the status message) in an HTML that
automatically loads the written XML document ?

Yes, you'd bounce the browser (not a particularly nice thing to do) and should write a 
separate pipeline to handle the rendering of
the written XML document... but I presume it would be easier than other methods.

You may even check, with the ResourceExists action, whether the XML document has 
already been written to disk... hence deciding
dinamycally which pipeline to use: the one writing the XML document, or the one 
rendering it.

Best regards,

-
   Luca Morandini
   GIS Consultant
  [EMAIL PROTECTED]
http://utenti.tripod.it/lmorandini/index.html
-

-Original Message-
From: Ludovic de Beaurepaire [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, December 18, 2002 12:30 PM
To: [EMAIL PROTECTED]
Subject: Re: Writing output of pipeline to a file


Sorry Anna, i didn't understand it.

I thought you had to generate data and next save and transfom them, but you have datas 
in a file and want to transform them and next
save and send them to your browser.

A solution could be to write a transformer (in XSL with redirection or in Java), 
localized after your transformer in the pipeline.
This one does not transform XML datas, but copy (not redirect) them in a file.

Ludovic
- Original Message -
From: Anna Afonchenko
To: [EMAIL PROTECTED]
Sent: Wednesday, December 18, 2002 11:57 AM
Subject: Re: Writing output of pipeline to a file


Thank you Ludovic.
Just to ensure that I got you right:
You say that I need to write an action that will get the content of the file, will 
write it, and then in the same pipeline there
will be generator that will just read the file that was written and will serialize the 
output to the browser?
But I need to write the file after it was transformed by the xsl. How this is possible 
in sitemap?
I just don't understand the logic of what I need to do in order to both write to the 
file and output file to the browser.
Sorry I'm bothering you, but can you just explain me in little more detail what I need 
to do?

Thank you very very much.
Anna
- Original Message -
From: Ludovic de Beaurepaire
To: [EMAIL PROTECTED]
Sent: Wednesday, December 18, 2002 12:44 PM
Subject: Re: Writing output of pipeline to a file


Hi Anna,

When you use  redirect:write file=testWrite.xml, your XML datas are redirected, so 
you have to generate other XML datas for your
serializer. In your case in error, no XML datas are passed after the transformation.

So, in your case, you have to transform AND save your XML datas. i think the best 
solution is saving these datas in file in an
Action, and use this file for transformation.

Ludovic

- Original Message -
From: Anna Afonchenko
To: [EMAIL PROTECTED]
Sent: Wednesday, December 18, 2002 8:44 AM
Subject: Re: Writing output of pipeline to a file


Thank you all for answering me, but I still can't manage to do it.
Here is my pipeline:
map:match pattern=test.html
map:generate src=test.html/
map:transform src=writeToFile.xsl/
map:serialize type=xml/
map:match

Here is my writeToFile.xsl:
?xml version=1.0 encoding=UTF-8?
xsl:stylesheet version=1.0 xmlns:xsl=http://www.w3.org/1999/XSL/Transform;
 xmlns:fo=http://www.w3.org/1999/XSL/Format 
xmlns:redirect=org.apache.xalan.xslt.extensions.Redirect
 extension-element-prefixes=redirect
xsl:output method=xml/

 xsl:template match=/
 xsl:copy-of select=*/
 redirect:open file=testWrite.xml/
 redirect:write file=testWrite.xml
  xsl:copy-of select=*/
 /redirect:write
 redirect:close file=testWrite.xml/
 /xsl:template
/xsl:stylesheet

When I am running this, I get the following error message from the Cocoon:
type fatal
message Exception in HTMLGenerator.generate()
description org.apache.cocoon.ProcessingException: Exception in 
HTMLGenerator.generate(): java.lang.NullPointerException
sender org.apache.cocoon.servlet.CocoonServlet
source Cocoon servlet
request-uri
If I remove all the redirect: lines, then I get the serialized input file, so the 
input is OK, obviously,
I have some problems with this redirect:
Can anybody please tell me what's wrong?
Thank you very much for help.
Anna

- Original Message -
From: Ludovic de Beaurepaire
To: [EMAIL PROTECTED]
Sent: Tuesday, December 17, 2002 4:36 PM
Subject: Re: Writing output of pipeline to a file


First, i had just to save it (not to send the result file to the client). I did it in 
a stylesheet like this :

?xml version=1.0 encoding=ISO-8859-1?
xsl:stylesheet version=1.0
 xmlns:xsl=http://www.w3.org/1999/XSL/Transform;
 xmlns:redirect=org.apache.xalan.xslt.extensions.Redirect
 extension-element-prefixes=redirect
 xsl:output method=xml encoding=ISO-8859-1/
 xsl:template match=/
 redirect:write file={$path}
  xsl:copy-of select=*/
 

removing cocoon from my url base

2002-12-18 Thread [EMAIL PROTECTED]
I've my cocoon application running on something like:
http://localhost/cocoon/something/mysite

I'd like to get mysite using a simpler URL like:
http://localhost

How can I do this?

I know I can change the Tomcat server.xml, and point the docBase of the ROOT web 
application to the location of the cocoon web app, for example:
Context path= docBase=cocoon dubug=0 reloadable=true/

Now I've
http://localhost/something/mysite

How can I remove something/mysite ?

Thanks in advance
Mirco


-
Please check that your question  has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

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




RE: XSP/ESQL - separation of concerns?

2002-12-18 Thread Ray Martin
Sir,

Have you looked at Torque, which is an Apache Software Foundation project.
Torque maps objects to relational databases.  Torque provides all the
set/gets to access table fields.

In Cocoon, you would write an action that would call the appropriate Torque
classes to perform the database access.

This keeps logic separated from the presentation - an absolute must.

Ray

 -Original Message-
 From: Robert Sösemann [mailto:[EMAIL PROTECTED]]
 Sent: Wednesday, December 18, 2002 6:22 AM
 To: [EMAIL PROTECTED]
 Subject: XSP/ESQL - separation of concerns?


 Hello,

 in my current project I am using xsp and esql logicsheet for db
 retrivieval
 and tag generation only.
 Although I know that this is good for developing (no extra
 compilation) I am
 not very happy with it.

 What I don't like is:
 ---
 - many SQL statement (complex tag structure) mixed cionfusingly with the
 actual document elements
 - the low readability of the code, also hard to debug...
 - no cocoon-like separtion of concerns (mix SQL-logic with tags)
 - the feeling that it is not the most performant way of doing this

 What I would like better (but don't excately know how):
 ---
 - put all SQL that is needed for generating on specific page into another
 thing (beans?) that has no tags
 - make my xsp shorter, more readable
 - have the good balance of performance, easy debugging, extensibility and
 the typical cocoon separation of concerns

 Here is a short but typical code snippet:
 ---
 ROOT
 esql:connection
 esql:poolmysql_pool/esql:pool

 esql:execute-query
 esql:query
 *COMPLEX QUERY, SOMETIMES 5 esql:query PER XSP *
 /esql:query

 esql:results
 esql:row-results
 ARTICLE
 xsp:attribute name=IDesql:get-int
 column=5//xsp:attribute
 xsp:attribute name=MAINesql:get-string
 column=7//xsp:attribute
 xsp:attribute name=SUBesql:get-string
 column=8//xsp:attribute
 xsp:attribute name=PDFPRINTesql:get-int
 column=9//xsp:attribute

 !-- Attribute evtl. NULL bei
 Direktanzeige --
 xsp:logic
 if(!esql:is-null column=3/) {
 HEADEResql:get-string
 column=1//HEADER
 }

 /xsp:logic

 esql:get-xml column=2/

 DATEesql:get-string column=11//DATE
 AUTHOResql:get-string
 column=12//AUTHOR
 /ARTICLE
 /esql:row-results
 /esql:results
 esql:no-results/esql:no-results
 esql:error-results/esql:error-results
 /esql:execute-query
 /esql:connection
 /ROOT

 /xsp:page


 Should I better use own generators or beans? What are your experiences?

 Robert



 -
 Please check that your question  has not already been answered in the
 FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

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





-
Please check that your question  has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

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




RE: Writing output of pipeline to a file

2002-12-18 Thread Ray Martin



I agree. 
Writing to a file is best done in an action. Allow the XSL to do styling 
of presentation. Allow actions to perform - well, actions - like writing 
to a file - JAVA is a beautiful thing - has great file 
streams.

Ray

  -Original Message-From: Ludovic de Beaurepaire 
  [mailto:[EMAIL PROTECTED]]Sent: Wednesday, December 
  18, 2002 5:44 AMTo: [EMAIL PROTECTED]Subject: 
  Re: Writing output of pipeline to a file
  Hi Anna,
  
  When you useredirect:write 
  file="testWrite.xml", your XML datas are redirected, so you have to 
  generate other XML datas for your serializer. In your case in error, no XML 
  datas are passed after the transformation.
  
  So, in your case, you have to transform AND save 
  your XML datas. i think the best solution is saving these datas in file in an 
  Action, and use this file for transformation.
  
  Ludovic
  
- Original Message - 
From: 
Anna 
Afonchenko 
To: [EMAIL PROTECTED] 

Sent: Wednesday, December 18, 2002 8:44 
AM
Subject: Re: Writing output of pipeline 
to a file

Thank you all for answering me, 
but I still can't manage to do it.
Here is my pipeline:
map:match 
pattern="test.html"
 
map:generate src=""/
 
map:transform src=""/
 
map:serialize type="xml"/
map:match

Here is my 
writeToFile.xsl:
?xml version="1.0" 
encoding="UTF-8"?
xsl:stylesheet 
version="1.0"xmlns:xsl="http://www.w3.org/1999/XSL/Transform"xmlns:fo=http://www.w3.org/1999/XSL/Formatxmlns:redirect="org.apache.xalan.xslt.extensions.Redirect"extension-element-prefixes="redirect"
xsl:output 
method="xml"/
xsl:template match="/"
xsl:copy-of select="*"/
redirect:open 
file="testWrite.xml"/redirect:write 
file="testWrite.xml"xsl:copy-of 
select="*"//redirect:write
redirect:close file="testWrite.xml"/
/xsl:template
/xsl:stylesheet

When I am running this, I get the following error 
message from the Cocoon:

type 
fatal
message Exception in 
HTMLGenerator.generate()
description 
org.apache.cocoon.ProcessingException: Exception in 
HTMLGenerator.generate(): java.lang.NullPointerException
sender org.apache.cocoon.servlet.CocoonServlet
source Cocoon servlet
request-uri
If I remove all the redirect: lines, then I get the 
serialized input file, so the input is OK, obviously,
I have some problems with this redirect:
Can anybody please tell me what's wrong?
Thank you very much for help.
Anna


  - Original Message - 
  From: 
  Ludovic de Beaurepaire 
  
  To: [EMAIL PROTECTED] 
  
  Sent: Tuesday, December 17, 2002 4:36 
  PM
  Subject: Re: Writing output of 
  pipeline to a file
  
  First, i had just to save it (not to send the 
  result file to the client). I did it in a stylesheet like this 
  :
  
  ?xml version="1.0" 
  encoding="ISO-8859-1"?xsl:stylesheet version="1.0" 
  xmlns:xsl="http://www.w3.org/1999/XSL/Transform"xmlns:redirect="org.apache.xalan.xslt.extensions.Redirect"extension-element-prefixes="redirect"
  xsl:output method="xml" 
  encoding="ISO-8859-1"/xsl:template 
  match="/"redirect:write 
  file="{$path}"xsl:copy-of 
  select="*"//redirect:write
  TEXTEoutput for the 
  client/TEXTE
  /xsl:template 
  /xsl:stylesheet
  But there was problems with some 
  configuration, so finally i did it in my Action who had to generate the 
  XML.
  
  If you have to duplicate your XML stream, one 
  for saving, another for the client, i thinkyou have to do this in an 
  action. It generates the XML file and this one is next 
  transformed/serialized.
  
  
  map:match 
  pattern="some.html"
   map:act 
  type="YourAction" map:generate 
  src=""/ 
   
  map:transform src=""/
   
  map:serialize type="html"/
  /map:match
  
  Ludovic
  
- Original Message - 
From: 
Anna 
Afonchenko 
To: [EMAIL PROTECTED] 

Sent: Tuesday, December 17, 2002 
3:09 PM
Subject: Re: Writing output of 
pipeline to a file

Hi Ludovic. Thank you for 
answering.
Can you say what do you do to 
save this XML file?
I mean, if I have the 
following pipeline:
map:match 
pattern="some.html"
 
map:generate src=""/
 
map:transform src=""/
 
map:serialize type="xml"/
/map:match
this pipeline produces an xml 
file. What should I use in order to save this file as 
"some.xml".

Sorry for asking almost 
exactly the same, I just didn't understood from you answer what should I 
do.
Thank you 

RE: Source aggregation by XInclude

2002-12-18 Thread DURDINA Michal
Thank you,
but now my xsp pages get recompiled to Java every time. Probably it is the
issue of xinclude. 
Can anyone help me how to tell cocoon not to recompile some_page.xsp every
time I acces the page?
Does it exist any explicit mechanism how to cache the output of the
pipeline?

I am using this xsp preprocesing pipeline:
  map:match pattern=some_page.xsp
map:generate src=some_file.xml/
map:transform type=xinclude/
map:serialize type=xml/
  /map:match

  map:match pattern=some_page.html
map:generate src=cocoon:/some_page.xsp type=serverpages/
map:transform src=some_other_stylesheet.xsl/
map:serialize type=xml/
  /map:match

Cocoon 2.0.3.

Thanks for help.
Michal

 -Original Message-
 From: Timothy Larson [mailto:[EMAIL PROTECTED]]
 Sent: Monday, December 16, 2002 5:18 PM
 To: [EMAIL PROTECTED]
 Subject: Re: Source aggregation by XInclude
 
 
 You can use the cocoon:/ protocol to do this:
 
   map:match pattern=some_page.xsp
 map:generate src=some_file.xml/
 map:transform src=some_stylesheet.xsl/
 map:serialize type=xml/
   /map:match
 
   map:match pattern=some_page.html
 map:generate src=cocoon:/some_page.xsp type=serverpages/
 map:transform src=some_other_stylesheet.xsl/
 map:serialize type=xml/
   /map:match
 
 You may run into problems with the java code generated from the XSP
 not always updating immediately when you make changes to the XSP page.
 It seems like the timestamp only has one minute resolution. YMMV.
 
 Tim
 
  [EMAIL PROTECTED] 12/16/02 10:57AM 
 Hello,
 In Cocoon 1.8 we used xinclude for aggregation of our xsp sources. 
 
 Now in C2, xsp is generator and xinclude is transformer, 
 therefore xinclude
 cannot precede xsp to prepare sources for it.
 
 Is there any working technique how to compose sources for xsp 
 generator from
 more than one file?
 
 Michal
 
 -- MisoD --
 Michal Durdina - [EMAIL PROTECTED] 
 ASSET Soft a.s.,
 Kosicka 56, Bratislava, 821 08
 Slovakia, Europe
 
 
 -
 Please check that your question  has not already been answered in the
 FAQ before posting. http://xml.apache.org/cocoon/faq/index.html
 
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail:   [EMAIL PROTECTED]
 
 
 
 -
 Please check that your question  has not already been answered in the
 FAQ before posting. http://xml.apache.org/cocoon/faq/index.html
 
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail:   [EMAIL PROTECTED]
 __ Informacia od NOD32 1.335 (20021211) __
 
 Tato sprava bola preverena systemom NOD32 pre Exchange.
 http://www.eset.sk
 
 
 
 

-
Please check that your question  has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

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




Re: XSP/ESQL - separation of concerns?

2002-12-18 Thread Jörg Heinicke
But it's obvious that you must map the data retrieved by the SQL-queries
into tags. Is it really useful to have an intermediate step like the mentioned
Torque? Aren't the tags only another data representation?

Joerg

 Hello,
 
 in my current project I am using xsp and esql logicsheet for db
 retrivieval
 and tag generation only.
 Although I know that this is good for developing (no extra compilation) I
 am
 not very happy with it.
 
 What I don't like is:
 ---
 - many SQL statement (complex tag structure) mixed cionfusingly with the
 actual document elements
 - the low readability of the code, also hard to debug...
 - no cocoon-like separtion of concerns (mix SQL-logic with tags)
 - the feeling that it is not the most performant way of doing this
 
 What I would like better (but don't excately know how):
 ---
 - put all SQL that is needed for generating on specific page into another
 thing (beans?) that has no tags
 - make my xsp shorter, more readable
 - have the good balance of performance, easy debugging, extensibility and
 the typical cocoon separation of concerns
 
 Here is a short but typical code snippet:
 ---
 ROOT
 esql:connection
 esql:poolmysql_pool/esql:pool
 
 esql:execute-query
 esql:query
 *COMPLEX QUERY, SOMETIMES 5 esql:query PER XSP *
 /esql:query
 
 esql:results
 esql:row-results
 ARTICLE
 xsp:attribute name=IDesql:get-int
 column=5//xsp:attribute
 xsp:attribute name=MAINesql:get-string
 column=7//xsp:attribute
 xsp:attribute name=SUBesql:get-string
 column=8//xsp:attribute
 xsp:attribute name=PDFPRINTesql:get-int
 column=9//xsp:attribute
 
 !-- Attribute evtl. NULL bei Direktanzeige
 --
 xsp:logic
 if(!esql:is-null column=3/) {
 HEADEResql:get-string
 column=1//HEADER
 }
 
 /xsp:logic
 
 esql:get-xml column=2/
 
 DATEesql:get-string column=11//DATE
 AUTHOResql:get-string
 column=12//AUTHOR
 /ARTICLE
 /esql:row-results
 /esql:results
 esql:no-results/esql:no-results
 esql:error-results/esql:error-results
 /esql:execute-query
 /esql:connection
 /ROOT
 
 /xsp:page
 
 
 Should I better use own generators or beans? What are your experiences?
 
 Robert

-- 
+++ GMX - Mail, Messaging  more  http://www.gmx.net +++
NEU: Mit GMX ins Internet. Rund um die Uhr für 1 ct/ Min. surfen!


-
Please check that your question  has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

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




/home/userx/~public_cocoon LIKE ./~public_html ?

2002-12-18 Thread Björn Voigt
Hello Cocooners,

We use a Linux/Tomcat4.1.12/Cocoon2dev Installation on a server
with many users. Some users would use Cocoon to create a homepage
with it. Is it possible to configure Cocoon to include folders
from home directories like apache with public_html and How can we
include classes from this folders.

Thanks for help

Björn




--
Björn VoigtTel: +49-3943-626654
Hochschule Harze-mail: [EMAIL PROTECTED]
Projekt MobiHarz
Friedrichstrasse 57-59
D-38855 Wernigerode



-
Please check that your question  has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

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




RE: problem in writing Actions

2002-12-18 Thread Ray Martin



Ant is a great 
thing. However, Ant is not an absolute 'must' to be able to build 
actions. There are four steps. 1) From your JAVA package directory 
structure, run JAVAC on the action file(s).
2) Copy the 
resultant class(es) to the appropriate place. 
3) Run JAR. 

4) Copy the 
resultant jar file to the the cocoon/WEB-INF/lib directory.

Maybe this is 
actually a fifth step - stop and restart your web server, hopefully 
Tomcat.

And yes, Ant can 
do those four steps very nicely foryou - saving you the 
annoyance.

Ray

  -Original Message-From: Sternath Elmar 
  [mailto:[EMAIL PROTECTED]]Sent: Wednesday, December 18, 
  2002 5:34 AMTo: '[EMAIL PROTECTED]'Subject: 
  AW: problem in writing Actions
  Hi 
  Anna,
  
  the .java file 
  has to be compiled into a class file. Cocoon then accesses the class file to 
  execute the desired functionality. For compilation, you need an appropriate 
  tool, for instance ant. I would recommend to get familiar with ant. Ant 
  provides functionality to compile .java files into .class files, pack them 
  into .jar libraries and deploy them into the target directory of 
  cocoon.
  
  Regards,
  Elmar
  -Ursprngliche Nachricht-Von: 
  Anna Afonchenko [mailto:[EMAIL PROTECTED]]Gesendet: Mittwoch, 18. 
  Dezember 2002 11:22An: cocoon-usersBetreff: problem in 
  writing Actions
  
Hi all.
I am exploring the action 
possibilities in Cocoon now, and I wanted to test some actions.
I took sample action class 
RandomAction.java (from book "Cocoon:Building XML Applications" by 
Langham Ziegeler), changed the package name to ub, and copied 
this file into ub directory under cocoon directory. Then I declared it in a 
sitemap by adding
map:action name="random" 
src=""/

When I try to use it (even if I 
just call http://localhost:8080/cocoon/and 
not the pattern match for this action), I get an error from 
Cocoon:

type 
fatal
message Error in sitemap configuration : 
ub.RandomAction
description 
org.apache.avalon.framework.configuration.ConfigurationException: Error 
in sitemap configuration : ub.RandomAction
sender org.apache.cocoon.servlet.CocoonServlet
source Cocoon servlet
request-uri
/cocoon/
I tried to move the 
RandomAction.java to the cocoon directory, it doesn't help.
What should I do and where should I 
put my own Action class in order to use it in the sitemap?
Thank you very much for 
help.
Anna


RE: removing cocoon from my url base

2002-12-18 Thread Luca Morandini
Mirco,

I presume something like this:

map:match pattern=**
map:mount uri-prefix=
src=file:///c:/something/mysite/
check-reload=yes
reload-method=synchron/
/map:match

should work.

Best regards,

- 
   Luca Morandini 
   GIS Consultant 
  [EMAIL PROTECTED] 
http://utenti.tripod.it/lmorandini/index.html 
-
 

 -Original Message-
 From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
 Sent: Wednesday, December 18, 2002 1:04 PM
 To: cocoon-users
 Subject: removing cocoon from my url base
 
 
 I've my cocoon application running on something like:
 http://localhost/cocoon/something/mysite
 
 I'd like to get mysite using a simpler URL like:
 http://localhost
 
 How can I do this?
 
 I know I can change the Tomcat server.xml, and point the docBase of the ROOT web 
application to the location of the 
 cocoon web app, for example:
 Context path= docBase=cocoon dubug=0 reloadable=true/
 
 Now I've
 http://localhost/something/mysite
 
 How can I remove something/mysite ?
 
 Thanks in advance
 Mirco
 
 
 -
 Please check that your question  has not already been answered in the
 FAQ before posting. http://xml.apache.org/cocoon/faq/index.html
 
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail:   [EMAIL PROTECTED]
 

-
Please check that your question  has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

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




RE: removing cocoon from my url base [performance ??]

2002-12-18 Thread Cocoon User

yes but what about the performance

maybe this way has effects to cocoon performance ?


stavros

On Wed, 18 Dec 2002, Luca Morandini wrote:

 Mirco,

 I presume something like this:

 map:match pattern=**
   map:mount uri-prefix=
   src=file:///c:/something/mysite/
   check-reload=yes
   reload-method=synchron/
 /map:match

 should work.

 Best regards,

 -
Luca Morandini
GIS Consultant
   [EMAIL PROTECTED]
 http://utenti.tripod.it/lmorandini/index.html
 -


  -Original Message-
  From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
  Sent: Wednesday, December 18, 2002 1:04 PM
  To: cocoon-users
  Subject: removing cocoon from my url base
 
 
  I've my cocoon application running on something like:
  http://localhost/cocoon/something/mysite
 
  I'd like to get mysite using a simpler URL like:
  http://localhost
 
  How can I do this?
 
  I know I can change the Tomcat server.xml, and point the docBase of the ROOT web 
application to the location of the
  cocoon web app, for example:
  Context path= docBase=cocoon dubug=0 reloadable=true/
 
  Now I've
  http://localhost/something/mysite
 
  How can I remove something/mysite ?
 
  Thanks in advance
  Mirco
 
 
  -
  Please check that your question  has not already been answered in the
  FAQ before posting. http://xml.apache.org/cocoon/faq/index.html
 
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail:   [EMAIL PROTECTED]
 

 -
 Please check that your question  has not already been answered in the
 FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

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




-
Please check that your question  has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

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




Re: /home/userx/~public_cocoon LIKE ./~public_html ?

2002-12-18 Thread Konstantin Piroumian
From: Björn Voigt [EMAIL PROTECTED]

 Hello Cocooners,

 We use a Linux/Tomcat4.1.12/Cocoon2dev Installation on a server
 with many users. Some users would use Cocoon to create a homepage
 with it. Is it possible to configure Cocoon to include folders
 from home directories like apache with public_html and How can we
 include classes from this folders.

Just take a look at the sitemap in /src/webapp/userhomes (Cocoon 2.1):

   map:match pattern=~*/**
 map:mount check-reload=yes src=/home/{1}/public_html/
uri-prefix=~{1}/
   /map:match

   map:match pattern=~*
 map:redirect-to uri={0}//
   /map:match

These two matchers would do the trick.

Btw, it would be also possible to do the same thing for Windows platforms
using system-property module (take a look at the
/samples/modules/sitemap.xmap), but the problem is that user home base
directory on Win2000 contains spaces and that causes problems in Cocoon.

Konstantin


 Thanks for help

 Björn




 --
 Björn VoigtTel: +49-3943-626654
 Hochschule Harze-mail: [EMAIL PROTECTED]
 Projekt MobiHarz
 Friedrichstrasse 57-59
 D-38855 Wernigerode



 -
 Please check that your question  has not already been answered in the
 FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

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




-
Please check that your question  has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

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




HSSFSerializer

2002-12-18 Thread nandipinto
Hi all,
I'm using HSSFSerializer to generate Excel file, but strange things
happened. I set font to a Chinese font for the whole document, but the
result is that the font is reset to Arial somewhere in the page (in the
middle of the page), and then back to the Chinese font again in the end of
the page.
Anyone knows how this happen and how to solve this?

regards,

nandipinto.


-
Please check that your question  has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

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




Re: XMLForm Wizard alternative?

2002-12-18 Thread Konstantin Piroumian
From: Robert Sösemann [EMAIL PROTECTED]

 Hy,

 in our project (CMS) we want to easily generate input fields in a
 wizard-like interface. It is later used by authors to put different types
of
 articles into a database.

 As different types of articles have other information needs, we want to
 provide the user with form field that represent that needs of the specific
 article. So we need a mechanism to generate steps of our wizard (namely
page
 with form fields) from centralized information (great would be the db)

 As this XMLWizard mechanism is only available from a cocoon beta, we are
not
 allowed to use it. Can you imagine an alternative way to solve this?

You can simply use the XMLForm's syntax for form representation and use a
custom action to generate the next step for you. To customize the forms you
can either use XSP or a special transformer.

Konstantin


 Thanks in advance,
 Robert


 -
 Please check that your question  has not already been answered in the
 FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

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




-
Please check that your question  has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

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




RE: removing cocoon from my url base [performance ??]

2002-12-18 Thread Luca Morandini
Stavros,

I don't think so; since the matching process is executed in a strictly sequential 
manner, if you have this map:match element in
the first pipeline, no other matching will take place... or do you refer to something 
else ?

Best regards,

-
   Luca Morandini
   GIS Consultant
  [EMAIL PROTECTED]
http://utenti.tripod.it/lmorandini/index.html
-


 -Original Message-
 From: Cocoon User [mailto:[EMAIL PROTECTED]]
 Sent: Wednesday, December 18, 2002 1:33 PM
 To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
 Subject: RE: removing cocoon from my url base [performance ??]



 yes but what about the performance

 maybe this way has effects to cocoon performance ?


 stavros

 On Wed, 18 Dec 2002, Luca Morandini wrote:

  Mirco,
 
  I presume something like this:
 
  map:match pattern=**
  map:mount uri-prefix=
  src=file:///c:/something/mysite/
  check-reload=yes
  reload-method=synchron/
  /map:match
 
  should work.
 
  Best regards,
 
  -
 Luca Morandini
 GIS Consultant
[EMAIL PROTECTED]
  http://utenti.tripod.it/lmorandini/index.html
  -
 


-
   Luca Morandini
   GIS Consultant
  [EMAIL PROTECTED]
http://utenti.tripod.it/lmorandini/index.html
-



-
Please check that your question  has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

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




Re: /home/userx/~public_cocoon LIKE ./~public_html ?

2002-12-18 Thread Piotr Legiecki
Konstantin Piroumian wrote:


Just take a look at the sitemap in /src/webapp/userhomes (Cocoon 2.1):

  map:match pattern=~*/**
map:mount check-reload=yes src=/home/{1}/public_html/
uri-prefix=~{1}/
  /map:match

  map:match pattern=~*
map:redirect-to uri={0}//
  /map:match

These two matchers would do the trick.

 


Is it possible under Cocoon 2.0.x?

Regards
Piotr Legiecki



-
Please check that your question  has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

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




Re: Writing output of pipeline to a file

2002-12-18 Thread Anna Afonchenko
As I understand the SourceWritingTransformer (I may be wrong, I am new to
all this)
the directives for write to a file (source:write) should be in the xml, not
in xsl.
I don't write the xml, I get it, so I need to perform the writing in xsl.
If you can explain to me how I can use SourceWritingTransformer  to write to
a file from the stylesheet, I would be very grateful.
For now I will just use java extension function in my xsl stylesheet to
perform writing to file.

Thanks for answering

Anna

- Original Message -
From: Luca Morandini [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, December 18, 2002 1:45 PM
Subject: RE: Writing output of pipeline to a file


Anna,

why don't you use SourceWritingTransformer to write the document, and then
transform its output (the status message) in an HTML that
automatically loads the written XML document ?

Yes, you'd bounce the browser (not a particularly nice thing to do) and
should write a separate pipeline to handle the rendering of
the written XML document... but I presume it would be easier than other
methods.

You may even check, with the ResourceExists action, whether the XML document
has already been written to disk... hence deciding
dinamycally which pipeline to use: the one writing the XML document, or the
one rendering it.

Best regards,

-
   Luca Morandini
   GIS Consultant
  [EMAIL PROTECTED]
http://utenti.tripod.it/lmorandini/index.html
-

-Original Message-
From: Ludovic de Beaurepaire [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, December 18, 2002 12:30 PM
To: [EMAIL PROTECTED]
Subject: Re: Writing output of pipeline to a file


Sorry Anna, i didn't understand it.

I thought you had to generate data and next save and transfom them, but you
have datas in a file and want to transform them and next
save and send them to your browser.

A solution could be to write a transformer (in XSL with redirection or in
Java), localized after your transformer in the pipeline.
This one does not transform XML datas, but copy (not redirect) them in a
file.

Ludovic
- Original Message -
From: Anna Afonchenko
To: [EMAIL PROTECTED]
Sent: Wednesday, December 18, 2002 11:57 AM
Subject: Re: Writing output of pipeline to a file


Thank you Ludovic.
Just to ensure that I got you right:
You say that I need to write an action that will get the content of the
file, will write it, and then in the same pipeline there
will be generator that will just read the file that was written and will
serialize the output to the browser?
But I need to write the file after it was transformed by the xsl. How this
is possible in sitemap?
I just don't understand the logic of what I need to do in order to both
write to the file and output file to the browser.
Sorry I'm bothering you, but can you just explain me in little more detail
what I need to do?

Thank you very very much.
Anna
- Original Message -
From: Ludovic de Beaurepaire
To: [EMAIL PROTECTED]
Sent: Wednesday, December 18, 2002 12:44 PM
Subject: Re: Writing output of pipeline to a file


Hi Anna,

When you use  redirect:write file=testWrite.xml, your XML datas are
redirected, so you have to generate other XML datas for your
serializer. In your case in error, no XML datas are passed after the
transformation.

So, in your case, you have to transform AND save your XML datas. i think the
best solution is saving these datas in file in an
Action, and use this file for transformation.

Ludovic

- Original Message -
From: Anna Afonchenko
To: [EMAIL PROTECTED]
Sent: Wednesday, December 18, 2002 8:44 AM
Subject: Re: Writing output of pipeline to a file


Thank you all for answering me, but I still can't manage to do it.
Here is my pipeline:
map:match pattern=test.html
map:generate src=test.html/
map:transform src=writeToFile.xsl/
map:serialize type=xml/
map:match

Here is my writeToFile.xsl:
?xml version=1.0 encoding=UTF-8?
xsl:stylesheet version=1.0
xmlns:xsl=http://www.w3.org/1999/XSL/Transform;
 xmlns:fo=http://www.w3.org/1999/XSL/Format
xmlns:redirect=org.apache.xalan.xslt.extensions.Redirect
 extension-element-prefixes=redirect
xsl:output method=xml/

 xsl:template match=/
 xsl:copy-of select=*/
 redirect:open file=testWrite.xml/
 redirect:write file=testWrite.xml
  xsl:copy-of select=*/
 /redirect:write
 redirect:close file=testWrite.xml/
 /xsl:template
/xsl:stylesheet

When I am running this, I get the following error message from the Cocoon:
type fatal
message Exception in HTMLGenerator.generate()
description org.apache.cocoon.ProcessingException: Exception in
HTMLGenerator.generate(): java.lang.NullPointerException
sender org.apache.cocoon.servlet.CocoonServlet
source Cocoon servlet
request-uri
If I remove all the redirect: lines, then I get the serialized input file,
so the input is OK, obviously,
I have some problems with this redirect:
Can anybody please tell 

Re: /home/userx/~public_cocoon LIKE ./~public_html ?

2002-12-18 Thread Konstantin Piroumian
From: Piotr Legiecki [EMAIL PROTECTED]
 Konstantin Piroumian wrote:
 
 Just take a look at the sitemap in /src/webapp/userhomes (Cocoon 2.1):
 
map:match pattern=~*/**
  map:mount check-reload=yes src=/home/{1}/public_html/
 uri-prefix=~{1}/
/map:match
 
map:match pattern=~*
  map:redirect-to uri={0}//
/map:match
 
 These two matchers would do the trick.
 
   
 
 
 Is it possible under Cocoon 2.0.x?

Sure, why not?
Just try and let us know if there are any problems with it.

Konstantin

 
 Regards
 Piotr Legiecki
 
 
 
 -
 Please check that your question  has not already been answered in the
 FAQ before posting. http://xml.apache.org/cocoon/faq/index.html
 
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail:   [EMAIL PROTECTED]
 
 

-
Please check that your question  has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

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




Re: Configuring JTidy

2002-12-18 Thread Martin Holz
Anna Afonchenko [EMAIL PROTECTED] writes:

 OK, thank you, I now understand how to set a doctype.
 But what about other settings, like converting quotes to entities.
 Not that I need it so much, but I am just curious, why this doesn't work
 through
 jtidy-config. I just want to know if that's me doing something wrong, or
 maybe this is some JTidy/Cocoon bug?

Don't know. You may put a LogTransformer between the generator and
the serializer to see, what the HTMLGenerator is really 
producing. I think, you must extend a serializer to replace
certain unicode characters with entities, since a transformer could 
forward the entities only, if it implements LexicalHandler, which is
optional. 

There was some talk about a TidySerializer at the dev list: 
http://article.gmane.org/gmane.text.xml.cocoon.devel/10062


Martin

-
Please check that your question  has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

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




RE: Writing output of pipeline to a file

2002-12-18 Thread Luca Morandini
Anna,

wait, you could use  a small  XSLT to parse the input XML document, enclose the 
document in a source:write element and pass it
along to the SourceWritingTransformer... any problem with this scenario ?

Best regards,

-
   Luca Morandini
   GIS Consultant
  [EMAIL PROTECTED]
http://utenti.tripod.it/lmorandini/index.html
-


 -Original Message-
 From: Anna Afonchenko [mailto:[EMAIL PROTECTED]]
 Sent: Wednesday, December 18, 2002 1:25 PM
 To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
 Subject: Re: Writing output of pipeline to a file


 As I understand the SourceWritingTransformer (I may be wrong, I am new to
 all this)
 the directives for write to a file (source:write) should be in the xml, not
 in xsl.
 I don't write the xml, I get it, so I need to perform the writing in xsl.
 If you can explain to me how I can use SourceWritingTransformer  to write to
 a file from the stylesheet, I would be very grateful.
 For now I will just use java extension function in my xsl stylesheet to
 perform writing to file.

 Thanks for answering

 Anna

 - Original Message -
 From: Luca Morandini [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Wednesday, December 18, 2002 1:45 PM
 Subject: RE: Writing output of pipeline to a file


 Anna,

 why don't you use SourceWritingTransformer to write the document, and then
 transform its output (the status message) in an HTML that
 automatically loads the written XML document ?

 Yes, you'd bounce the browser (not a particularly nice thing to do) and
 should write a separate pipeline to handle the rendering of
 the written XML document... but I presume it would be easier than other
 methods.

 You may even check, with the ResourceExists action, whether the XML document
 has already been written to disk... hence deciding
 dinamycally which pipeline to use: the one writing the XML document, or the
 one rendering it.

 Best regards,



-
Please check that your question  has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

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




Re: XMLForm: Binding of values

2002-12-18 Thread Konstantin Piroumian
From: Jakob Praher [EMAIL PROTECTED]

 hi,

 I am dropping my xslt/xform impl in favour of the existing cocoon xform
 approach.

 Now I have come over some questions regarding the functionality:

 - Is it possible to bind to existing data?

Elaborate on this please. What are you going to bind and where is that data
exist?

 - If so how to do it ?

The more you tell us, the quicker you'll get the answer ;)

Konstantin


 thanks

 -- Jakob




 -
 Please check that your question  has not already been answered in the
 FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

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




-
Please check that your question  has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

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




XPath problem in Cocoon?

2002-12-18 Thread Anna Afonchenko



Hi all.
Another question for 
today:
I wrote a small xsl that matches p 
nodes from the input and prints their content.
I wrote it like this:
xsl:template 
match="/"
 xsl:for-each 
select="//p"
  
xsl:textContent of this tag is /xsl:text
  
xsl:value-of select="."/
 
/xsl:for-each
/xsl:template

Then I run this stylesheet through 
cocoon pipeline.
I get empty result, e.g. the for-each 
didn't match any p node in the input xml file.
But there are p tags in the 
input.
Moreover, if I change the for-each 
statement to
xsl:for-each 
select="descendant::node()[name()='p']"
It executes correctly!

Can anyone explain to me, why Cocoon 
doesn't match //node-name?
In XPath both //node-name and 
descendant::node()[name()='node-name'] have the same meaning.
I dont want to use descendant::... 
style because I have this stylesheet get the XPath expression to match from some 
external xml file, and it is really a headache (if possible at all) to change 
all my //node-name expressions to descendant::node()[name()='node-name'] 
style.

Please explain this mistery to 
me.

Thank you very much for 
help.
I know I am writing too many e-mails 
to the group these days, but since I am very new to Cocoon, I get stuck every 
fewminutes on something new.

Regards,
Anna


Cocoon and Tamino ??

2002-12-18 Thread Rui Leal
Hello !

I'm considering using Tamino XML Database on a project. and i've been
evaluating XMLStarterKit

I know i have a couple of possibilities when trying to execute a query:

- a pipeline with a generator pointing to a tamino URL, which returns a XML
result, on which i can apply a stylesheet and clean it !
- use a tamino generator i've found in the mailing list archives (by Mitch
christensen, thanks .. might by useful !)

My question is ..

Is there any logicsheet or taglib which integrates Tamino with XSP ? ..
I started to make one, but i don´t like to re-invent the wheel, if you
know what i mean! :)

I don´t want to waste time in XML:DB right now, because tamino XML:DB plugin
isn´t fully compliant yet !

Any suggestions anyone ?
Thank in advance !!

[--] Rui Pedro Leal
[--] [EMAIL PROTECTED]
[--] [EMAIL PROTECTED]
[--] ICQ: 318173


-
Please check that your question  has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

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




Re: XPath problem in Cocoon?

2002-12-18 Thread Konstantin Piroumian
Anna,
(please avoid HTML emails)

Cocoon uses underlying XSLT engine to perform the transformation, so either
this is just an XSLT problem in your code or a problem of the Xalan or XSLTC
(which one is used).

You can simply check if your stylesheet works without Cocoon: run Xalan from
the command line with your XML as input and see what happens.

Konstantin

- Original Message -
From: Anna Afonchenko
To: cocoon-users
Sent: Wednesday, December 18, 2002 16:01
Subject: XPath problem in Cocoon?


Hi all.
Another question for today:
I wrote a small xsl that matches p nodes from the input and prints their
content.
I wrote it like this:
xsl:template match=/
xsl:for-each select=//p
xsl:textContent of this tag is /xsl:text
xsl:value-of select=./
/xsl:for-each
/xsl:template

Then I run this stylesheet through cocoon pipeline.
I get empty result, e.g. the for-each didn't match any p node in the input
xml file.
But there are p tags in the input.
Moreover, if I change the for-each statement to
xsl:for-each select=descendant::node()[name()='p']
It executes correctly!

Can anyone explain to me, why Cocoon doesn't match //node-name?
In XPath both //node-name and descendant::node()[name()='node-name'] have
the same meaning.
I dont want to use descendant::... style because I have this stylesheet get
the XPath expression to match from some external xml file, and it is really
a headache (if possible at all) to change all my //node-name expressions to
descendant::node()[name()='node-name'] style.

Please explain this mistery to me.

Thank you very much for help.
I know I am writing too many e-mails to the group these days, but since I am
very new to Cocoon, I get stuck every few minutes on something new.

Regards,
Anna


-
Please check that your question  has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

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




User Authentication?

2002-12-18 Thread Johannes . Becker
Hi,

I'm having a hard time understanding the tutorial on authentication from
the coccon website.
My case:
I have a loginpage (login) with a field for user and password. If the user
is logged in successfully, he should be redirected to services, which is
protected.
My questions:
How / Where do I check the parameters, if I wanna check the parameters with
entries in a database.

If I try to access the page services now directly, I get the following
error message:

The
org.apache.cocoon.www.file_.C_.Apache_Group.Tomcat_4_1.webapps.cocoon.mount.fraud.sitemap_xmap
 notifies that org.apache.avalon.framework.component.ComponentException
says:
UnnamedSelector: ComponentSelector could not find the component for hint
[auth-protect]
More precisely:
org.apache.avalon.framework.component.ComponentException: UnnamedSelector:
ComponentSelector could not find the component for hint [auth-protect]

Here is my sitemap:

 
 
  map:matchers default=wildcard/
  /map:components
  !-- === Pipelines
= --
  map:pipelines
map:component-configurations
authentication-manager
  handlers
  handler name=userPortal
redirect-to uri=login/
authentication uri
=userLogin/
  /handler
/handlers
/authentication-manager
/map:component-configurations
map:pipeline
  map:match pattern=login
map:generate type=xsp src=login.xsp/
map:serialize/
  /map:match
  map:match pattern=userLogin
map:act type=auth-login
  map:parameter name=handler value
=userPortal/
  map:parameter name=parameter_userid value
={request:user}/
  map:parameter name=parameter_password
value={request:password}/
  map:redirect-to uri=services/
/map:act
!-- authentication failed: Back to login-page --
map:generate type=xsp src=login.xsp/
map:serialize/
  /map:match
  map:match pattern=services
map:act type=auth-protect
  map:parameter name=handler value
=userPortal/
  map:generate type=xsp src=services.xsp/
  map:serialize/
/map:act
  /map:match

Greetings
Jonny



This electronic message contains information from the mmo2 plc Group which
may be
privileged or confidential. The information is intended to be for the use
of the
individual(s) or entity named above. If you are not the intended recipient
be aware
that any disclosure, copying, distribution or use of the contents of this
information
is prohibited. If you have received this electronic message in error,
please notify
us by telephone or email (to the numbers or address above) immediately.




-
Please check that your question  has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

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




integrate IF THEN ELSE conditions in a simple XSP page

2002-12-18 Thread Maxime.Gheysen
Hi,
How can I quickly add a condition in someting like  :

tdesql:get-string column=ID//td

If I want to add a condition like : 
If ID = 3 then font color = red else font color = green ? I'm using XSP
pages.

Thank you for your help!
 

-
Please check that your question  has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

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




Re: integrate IF THEN ELSE conditions in a simple XSP page

2002-12-18 Thread Cocoon User

try something like

xsp:logic
int rowID = esql:get-string column=ID/;

if (rowID == 3){

 bla bla .. your code

}

xsp:logic





stavros




esql:get-string column=ID/

On Wed, 18 Dec 2002 [EMAIL PROTECTED] wrote:

 Hi,
 How can I quickly add a condition in someting like  :

 tdesql:get-string column=ID//td

 If I want to add a condition like :
 If ID = 3 then font color = red else font color = green ? I'm using XSP
 pages.

 Thank you for your help!


 -
 Please check that your question  has not already been answered in the
 FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

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




-
Please check that your question  has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

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




Re: XMLForm: Binding of values

2002-12-18 Thread Jakob Praher
Am Mit, 2002-12-18 um 14.03 schrieb Konstantin Piroumian:
 From: Jakob Praher [EMAIL PROTECTED]
 
  hi,
 
  I am dropping my xslt/xform impl in favour of the existing cocoon xform
  approach.
 
  Now I have come over some questions regarding the functionality:
 
  - Is it possible to bind to existing data?
 
 Elaborate on this please. What are you going to bind and where is that data
 exist?
 
 - If so how to do it ?
 

yup.
imagine: you have a list of countries that are stored somewhere (like a
custom generator out of your app server, or an xml file on the disk )

you have a bean that expects one country out of a list of countries.

so you have your xform statement like this:

xf:selectOne ref=/country 

  xf:choices
item .../
  /xf:choices

/xf:selectOne

mow it would be nifty to bind the items via xpath to an existing
document (for instance using the cocoon:/ uri scheme )

you could do it by using an xsp page, thus generating the item /, but
I think it is such a common idea that it could be good if it is in the
framework - so you don't have to write an xsp page every time.


-- Jakob
 
  -
  Please check that your question  has not already been answered in the
  FAQ before posting. http://xml.apache.org/cocoon/faq/index.html
 
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail:   [EMAIL PROTECTED]
 
 
 
 
 -
 Please check that your question  has not already been answered in the
 FAQ before posting. http://xml.apache.org/cocoon/faq/index.html
 
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail:   [EMAIL PROTECTED]


-
Please check that your question  has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

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




Re: XML Schema's or DTDs for sitemaps/logicsheets?

2002-12-18 Thread Ben Young
Thanks for your help Konstantin. I found the RelaxNG schema as well.

Thanks again,
Ben

 Konstantin Piroumian [EMAIL PROTECTED] 12/18/02 02:42 AM 
You'll find a more or less up-to-date XSD for the sitemap in
/src/documentation/xdocs/drafts/sitemap-2.1-draft.xsd

There is also a DTD for the sitemap and a RelaxNG schema somewhere there...

Konstantin

From: Ben Young [EMAIL PROTECTED]

 Are there any Schemas or DTDs available for the sitemap or logicsheets?

 Thanks,
 Ben


 -
 Please check that your question  has not already been answered in the
 FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

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





-
Please check that your question  has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

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




RE: Source aggregation by XInclude

2002-12-18 Thread Timothy Larson
You coulde try the caching version of the cinclude transformer in place of the 
non-caching xinclude transformer.
See http://xml.apache.org/cocoon/userdocs/transformers/cinclude-transformer.html
The only problem I see is that the cinclude transformer does not seem to have the 
xpath features
that the xinclude transformer has.

Tim

 [EMAIL PROTECTED] 12/18/02 07:16AM 
Thank you,
but now my xsp pages get recompiled to Java every time. Probably it is the
issue of xinclude. 
Can anyone help me how to tell cocoon not to recompile some_page.xsp every
time I acces the page?
Does it exist any explicit mechanism how to cache the output of the
pipeline?

I am using this xsp preprocesing pipeline:
  map:match pattern=some_page.xsp
map:generate src=some_file.xml/
map:transform type=xinclude/
map:serialize type=xml/
  /map:match

  map:match pattern=some_page.html
map:generate src=cocoon:/some_page.xsp type=serverpages/
map:transform src=some_other_stylesheet.xsl/
map:serialize type=xml/
  /map:match

Cocoon 2.0.3.

Thanks for help.
Michal



-
Please check that your question  has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

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




Re: XMLForm: Binding of values

2002-12-18 Thread Konstantin Piroumian
From: Jakob Praher [EMAIL PROTECTED]
 Am Mit, 2002-12-18 um 14.03 schrieb Konstantin Piroumian:
  From: Jakob Praher [EMAIL PROTECTED]
 
   hi,
  
   I am dropping my xslt/xform impl in favour of the existing cocoon
xform
   approach.
  
   Now I have come over some questions regarding the functionality:
  
   - Is it possible to bind to existing data?
 
  Elaborate on this please. What are you going to bind and where is that
data
  exist?
 
  - If so how to do it ?
 

 yup.
 imagine: you have a list of countries that are stored somewhere (like a
 custom generator out of your app server, or an xml file on the disk )

 you have a bean that expects one country out of a list of countries.

 so you have your xform statement like this:

 xf:selectOne ref=/country 

   xf:choices
 item .../
   /xf:choices

 /xf:selectOne

 mow it would be nifty to bind the items via xpath to an existing
 document (for instance using the cocoon:/ uri scheme )

 you could do it by using an xsp page, thus generating the item /, but
 I think it is such a common idea that it could be good if it is in the
 framework - so you don't have to write an xsp page every time.

It's a very good idea, though, it's not much in XForms way (I mean the W3C
XForms).
Unfortunately, this is not implemented now. It'd be fine if you could
provide a patch or send a more detailed request to cocoon-dev list, so
Ivelin (the author of XMLForms) and other developers could participate in
discussing it and implementing.

Konstantin



 -- Jakob
  
   -
   Please check that your question  has not already been answered in the
   FAQ before posting. http://xml.apache.org/cocoon/faq/index.html
  
   To unsubscribe, e-mail: [EMAIL PROTECTED]
   For additional commands, e-mail:   [EMAIL PROTECTED]
  
  
 
 
  -
  Please check that your question  has not already been answered in the
  FAQ before posting. http://xml.apache.org/cocoon/faq/index.html
 
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail:   [EMAIL PROTECTED]


 -
 Please check that your question  has not already been answered in the
 FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

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




-
Please check that your question  has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

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




Cocoon Transformation error

2002-12-18 Thread Mark Pembury
Hi All

I'm running Tomcat 4.0.4, XIndices 1.0, and Cocoon 2.0.3.

I've got a simple Cocoon pipeline that transforms XML to XHTML. The XML is
generated via a XSP page. In my Tomcat window I get the follow error
displayed every time I do a transformation

java.lang.RuntimeException: java.net.SocketException: Connection reset by
peer:
socket write error at
org.apache.xalan.transformer.TransformerImpl.run(TransformerImpl.java:3231)

Any ideas? I've checked that the XSL/T transformation is correct and all
appears ok.

Mark.


Mark Pembury

Product Architect
ARK eManagement


attachment: winmail.dat-
Please check that your question  has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

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


Re: XPath problem in Cocoon?

2002-12-18 Thread Anna Afonchenko
Hi Konstantin.
I know that my stylesheet works without Cocoon, I ran it through the batch
file, using saxon. Even if I just run it using XSL Transformation of XMLSpy,
it works fine, and chooses the //p tags as it should.
So I am sure the problem is with Cocoon, but I don't understand, if it's my
problem giving cocoon some wrong parameters (I don't know how this could
happen) or maybe it is Cocoon problem? Using //node-name is a common XPath
expression, it should work.

Maybe somebody knows what's wrong?
Does nobody having problems with matching this kind of XPath expression in
Cocoon?
It is very important for me, so if somebody can give me a hint of where the
problem lies, I would really appreciate this.

Thank you very much for helping

Anna

- Original Message -
From: Konstantin Piroumian [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, December 18, 2002 3:17 PM
Subject: Re: XPath problem in Cocoon?


Anna,
(please avoid HTML emails)

Cocoon uses underlying XSLT engine to perform the transformation, so either
this is just an XSLT problem in your code or a problem of the Xalan or XSLTC
(which one is used).

You can simply check if your stylesheet works without Cocoon: run Xalan from
the command line with your XML as input and see what happens.

Konstantin

- Original Message -
From: Anna Afonchenko
To: cocoon-users
Sent: Wednesday, December 18, 2002 16:01
Subject: XPath problem in Cocoon?


Hi all.
Another question for today:
I wrote a small xsl that matches p nodes from the input and prints their
content.
I wrote it like this:
xsl:template match=/
xsl:for-each select=//p
xsl:textContent of this tag is /xsl:text
xsl:value-of select=./
/xsl:for-each
/xsl:template

Then I run this stylesheet through cocoon pipeline.
I get empty result, e.g. the for-each didn't match any p node in the input
xml file.
But there are p tags in the input.
Moreover, if I change the for-each statement to
xsl:for-each select=descendant::node()[name()='p']
It executes correctly!

Can anyone explain to me, why Cocoon doesn't match //node-name?
In XPath both //node-name and descendant::node()[name()='node-name'] have
the same meaning.
I dont want to use descendant::... style because I have this stylesheet get
the XPath expression to match from some external xml file, and it is really
a headache (if possible at all) to change all my //node-name expressions to
descendant::node()[name()='node-name'] style.

Please explain this mistery to me.

Thank you very much for help.
I know I am writing too many e-mails to the group these days, but since I am
very new to Cocoon, I get stuck every few minutes on something new.

Regards,
Anna


-
Please check that your question  has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

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


-
Please check that your question  has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

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




Re: Configuring JTidy

2002-12-18 Thread Anna Afonchenko
Hi Martin. Thanks for answering.
The whole point of me using jtidy configuration options is because I want to
affect the input file transferred to the xsl stylesheet, not to layout the
output.
So modifying serializer won't help me.
I need to modify the generator.

But anyway thank you very much for answering my questions

Anna

- Original Message -
From: Martin Holz [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, December 18, 2002 2:45 PM
Subject: Re: Configuring JTidy


Anna Afonchenko [EMAIL PROTECTED] writes:

 OK, thank you, I now understand how to set a doctype.
 But what about other settings, like converting quotes to entities.
 Not that I need it so much, but I am just curious, why this doesn't work
 through
 jtidy-config. I just want to know if that's me doing something wrong, or
 maybe this is some JTidy/Cocoon bug?

Don't know. You may put a LogTransformer between the generator and
the serializer to see, what the HTMLGenerator is really
producing. I think, you must extend a serializer to replace
certain unicode characters with entities, since a transformer could
forward the entities only, if it implements LexicalHandler, which is
optional.

There was some talk about a TidySerializer at the dev list:
http://article.gmane.org/gmane.text.xml.cocoon.devel/10062


Martin

-
Please check that your question  has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

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


-
Please check that your question  has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

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




Re: User Authentication?

2002-12-18 Thread Yves Vindevogel
The attached files do something like you want ...


 Hi,

 I'm having a hard time understanding the tutorial on authentication from
 the coccon website.
 My case:
 I have a loginpage (login) with a field for user and password. If the user
 is logged in successfully, he should be redirected to services, which is
 protected.
 My questions:
 How / Where do I check the parameters, if I wanna check the parameters with
 entries in a database.

 If I try to access the page services now directly, I get the following
 error message:

 The
 org.apache.cocoon.www.file_.C_.Apache_Group.Tomcat_4_1.webapps.cocoon.mount
.fraud.sitemap_xmap notifies that
 org.apache.avalon.framework.component.ComponentException says:
 UnnamedSelector: ComponentSelector could not find the component for hint
 [auth-protect]
 More precisely:
 org.apache.avalon.framework.component.ComponentException: UnnamedSelector:
 ComponentSelector could not find the component for hint [auth-protect]

 Here is my sitemap:

  
  
   map:matchers default=wildcard/
   /map:components
   !-- === Pipelines
 = --
   map:pipelines
 map:component-configurations
 authentication-manager
   handlers
   handler name=userPortal
 redirect-to uri=login/
 authentication uri
 =userLogin/
   /handler
 /handlers
 /authentication-manager
 /map:component-configurations
 map:pipeline
   map:match pattern=login
 map:generate type=xsp src=login.xsp/
 map:serialize/
   /map:match
   map:match pattern=userLogin
 map:act type=auth-login
   map:parameter name=handler value
 =userPortal/
   map:parameter name=parameter_userid value
 ={request:user}/
   map:parameter name=parameter_password
 value={request:password}/
   map:redirect-to uri=services/
 /map:act
 !-- authentication failed: Back to login-page --
 map:generate type=xsp src=login.xsp/
 map:serialize/
   /map:match
   map:match pattern=services
 map:act type=auth-protect
   map:parameter name=handler value
 =userPortal/
   map:generate type=xsp src=services.xsp/
   map:serialize/
 /map:act
   /map:match

 Greetings
 Jonny

 ---
-

 This electronic message contains information from the mmo2 plc Group which
 may be
 privileged or confidential. The information is intended to be for the use
 of the
 individual(s) or entity named above. If you are not the intended recipient
 be aware
 that any disclosure, copying, distribution or use of the contents of this
 information
 is prohibited. If you have received this electronic message in error,
 please notify
 us by telephone or email (to the numbers or address above) immediately.




 -
 Please check that your question  has not already been answered in the
 FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

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

-- 
Kind regards,
Yves Vindevogel

Implements
Kortrijkstraat 2 bus 1  --  9700 Oudenaarde  --  Belgium
Phone/Fax: +32 (55) 45.74.73  --  Mobile: +32 (478) 80.82.91
Mail: [EMAIL PROTECTED]  --  www.implements.be

Quote: The winner never says participating is more important than winning.
?xml version=1.0 encoding=ISO-8859-1?

xsp:page language=java
			xmlns:xsp=http://apache.org/xsp;
			xmlns:esql=http://apache.org/cocoon/SQL/v2;
			xmlns:xsp-request=http://apache.org/xsp/request/2.0;
			xmlns:xsp-session=http://apache.org/xsp/session/2.0;
			create-session=true

html

esql:connection
esql:poolpierrefabre/esql:pool

esql:execute-query
			esql:query
select * from tblLogin
	where name = 'xsp-request:get-parameter name=username/'
 	and password = 'xsp-request:get-parameter name=password/' ;
			/esql:query

esql:results
			xsp-session:set-attribute name=useradmin/xsp-session:set-attribute

			body 

RE: problem in writing Actions

2002-12-18 Thread Geoff Howard

-Original Message-
From: Anna Afonchenko [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, December 18, 2002 5:43 AM
To: [EMAIL PROTECTED]
Subject: Re: problem in writing Actions


 Hi Sternath.
 Thanks for the answer.
 So, if I get it right, I need to compile the java file and put the 
 resulting class file into the cocoon
 directory? I don't need to put the class into some subdirectory of cocoon?

Yes, if you don't want to jar them up, classes go under WEB-INF/classes/ with 
directory structure that matches the package name, so for ub.RandomAction you 
would need WEB-INF/classes/ub/RandomAction.class

Geoff


-
Please check that your question  has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

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




RE: build Cocoon2.1 CVS [ERROR]

2002-12-18 Thread Geoff Howard
You haven't followed the jdk 1.4 specific instructions (or
they are still incorrect for recent tomcat).

Copy xalan*.jar, xerces*.jar and xml-apis.jar from WEB-INF\lib
(or from lib\core in cvs) to %TOMCAT_HOME%\common\endorsed

The docs at one point only mentioned %JAVA_HOME%\jre\lib\endorsed
but later tomcat versions use -Djava.endorsed.dirs to override
the standard jdk defined location.

Geoff Howard

 -Original Message-
 From: Cocoon User [mailto:[EMAIL PROTECTED]]
 Sent: Wednesday, December 18, 2002 5:11 AM
 To: [EMAIL PROTECTED]
 Subject: build Cocoon2.1 CVS [ERROR]



 i try to build cocoon 2.1 CVS [2002.12.18 snapshot]

 environment:
 win XP
 jakarta-tomcat-4.1.17
 j2sdk1.4.1_01


 i put the .war file into webapp  folder an start tomcat

 when i ask cocoon [http://.:8080/cocoon]

 i recieve the follow error

 (copy - paste)

 from error.log:

 ERROR   (2002-12-18) 11:53.44:153   [access]
 (/cocoon/documents/index.html) Thread-9/CocoonServlet: Problem with Cocoon
 servlet
 org.apache.cocoon.ProcessingException: Failed to execute pipeline.:
 org.apache.cocoon.CascadingIOException:
 org.apache.xml.utils.WrappedRuntimeException: The output format must have
 a '{http://xml.apache.org/xslt}content-handler' property!:
 org.apache.xml.utils.WrappedRuntimeException: The output format must have
 a '{http://xml.apache.org/xslt}content-handler' property!
   at
 org.apache.cocoon.components.pipeline.AbstractProcessingPipeline.p
 rocessXMLPipeline(AbstractProcessingPipeline.java:519)
   at
 org.apache.cocoon.components.pipeline.impl.AbstractCachingProcessi
 ngPipeline.processXMLPipeline(AbstractCachingProcessingPipeline.java:192)
   at
 org.apache.cocoon.components.pipeline.AbstractProcessingPipeline.p
 rocess(AbstractProcessingPipeline.java:484)
   at
 org.apache.cocoon.components.treeprocessor.sitemap.SerializeNode.i
 nvoke(SerializeNode.java:149)
   at
 org.apache.cocoon.components.treeprocessor.AbstractParentProcessin
 gNode.invokeNodes(AbstractParentProcessingNode.java:84)
   at
 org.apache.cocoon.components.treeprocessor.sitemap.PreparableMatch
 Node.invoke(PreparableMatchNode.java:164)


 any idea?


 i remember the days i try to build cocoon2rc1
 i have to comment some lines in sitemap.xmap and recombile to have a
 working .war


 stavros kounis


 -
 Please check that your question  has not already been answered in the
 FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

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





-
Please check that your question  has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

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




Problem using java extension in xsl

2002-12-18 Thread Anna Afonchenko



Hi All.
Ok, I hope this is the last question 
for today.
In my xsl stylesheet I use some java 
extension class ParseTagContent.class.
In my xsl I have declared 
xmlns:java="xalan://ParseTagContent"
The class ParseTagContent.class is in 
the same directory with the xsl.

When I run this xsl using a batch 
file (not through Cocoon), everything is fine.
But when I try to run it through 
Cocoon, I get the following error message:
The URI xalan://ParseTagContent does not identify an external Java 
class
description: org.apache.cocoon.ProcessingException: Could not read 
resource file:/C:/Program Files/Apache Group/Tomcat 
4.1/webapps/cocoon/ub/violations.html: javax.xml.transform.TransformerException: 
The URI xalan://ParseTagContent does not identify an external Java 
class

I guess this is because Cocoon cannot find the .class file.
Where should I put this class so that both Cocoon and my xsl could find 
it?
Hope I explained this clearly.

Thank you all very much for 
help.

Anna


RE: Configuring JTidy

2002-12-18 Thread Geoff Howard
Anna,

The point remains that you are trying to judge what's in the pipeline by
the output to your browser after serializing to html.  Try putting an xml
serializer back in and see if the output is now escaped.

Can you confirm that other options from your jtidy configuration are
working?
Maybe that process is not really working?

Geoff

 -Original Message-
 From: Anna Afonchenko [mailto:[EMAIL PROTECTED]]
 Sent: Wednesday, December 18, 2002 9:28 AM
 To: [EMAIL PROTECTED]
 Subject: Re: Configuring JTidy


 Hi Martin. Thanks for answering.
 The whole point of me using jtidy configuration options is
 because I want to
 affect the input file transferred to the xsl stylesheet, not to layout the
 output.
 So modifying serializer won't help me.
 I need to modify the generator.

 But anyway thank you very much for answering my questions

 Anna



-
Please check that your question  has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

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




How do I read files inside an Action?

2002-12-18 Thread Chintalapaty, Sreedhar
Hi,

Can some one point me to an example of how we can access an xml file on the file 
system from a custom Action?

TIA,

Sreedhar

-
Please check that your question  has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

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




[FIXED] RE: build Cocoon2.1 CVS [ERROR]

2002-12-18 Thread Cocoon User
that was the problem

thnx Geof

stavros





On Wed, 18 Dec 2002, Geoff Howard wrote:

 You haven't followed the jdk 1.4 specific instructions (or
 they are still incorrect for recent tomcat).

 Copy xalan*.jar, xerces*.jar and xml-apis.jar from WEB-INF\lib
 (or from lib\core in cvs) to %TOMCAT_HOME%\common\endorsed

 The docs at one point only mentioned %JAVA_HOME%\jre\lib\endorsed
 but later tomcat versions use -Djava.endorsed.dirs to override
 the standard jdk defined location.

 Geoff Howard

  -Original Message-
  From: Cocoon User [mailto:[EMAIL PROTECTED]]
  Sent: Wednesday, December 18, 2002 5:11 AM
  To: [EMAIL PROTECTED]
  Subject: build Cocoon2.1 CVS [ERROR]
 
 
 
  i try to build cocoon 2.1 CVS [2002.12.18 snapshot]
 
  environment:
  win XP
  jakarta-tomcat-4.1.17
  j2sdk1.4.1_01
 
 
  i put the .war file into webapp  folder an start tomcat
 
  when i ask cocoon [http://.:8080/cocoon]
 
  i recieve the follow error
 
  (copy - paste)
 
  from error.log:
 
  ERROR   (2002-12-18) 11:53.44:153   [access]
  (/cocoon/documents/index.html) Thread-9/CocoonServlet: Problem with Cocoon
  servlet
  org.apache.cocoon.ProcessingException: Failed to execute pipeline.:
  org.apache.cocoon.CascadingIOException:
  org.apache.xml.utils.WrappedRuntimeException: The output format must have
  a '{http://xml.apache.org/xslt}content-handler' property!:
  org.apache.xml.utils.WrappedRuntimeException: The output format must have
  a '{http://xml.apache.org/xslt}content-handler' property!
  at
  org.apache.cocoon.components.pipeline.AbstractProcessingPipeline.p
  rocessXMLPipeline(AbstractProcessingPipeline.java:519)
  at
  org.apache.cocoon.components.pipeline.impl.AbstractCachingProcessi
  ngPipeline.processXMLPipeline(AbstractCachingProcessingPipeline.java:192)
  at
  org.apache.cocoon.components.pipeline.AbstractProcessingPipeline.p
  rocess(AbstractProcessingPipeline.java:484)
  at
  org.apache.cocoon.components.treeprocessor.sitemap.SerializeNode.i
  nvoke(SerializeNode.java:149)
  at
  org.apache.cocoon.components.treeprocessor.AbstractParentProcessin
  gNode.invokeNodes(AbstractParentProcessingNode.java:84)
  at
  org.apache.cocoon.components.treeprocessor.sitemap.PreparableMatch
  Node.invoke(PreparableMatchNode.java:164)
 
 
  any idea?
 
 
  i remember the days i try to build cocoon2rc1
  i have to comment some lines in sitemap.xmap and recombile to have a
  working .war
 
 
  stavros kounis
 
 
  -
  Please check that your question  has not already been answered in the
  FAQ before posting. http://xml.apache.org/cocoon/faq/index.html
 
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail:   [EMAIL PROTECTED]
 
 
 


 -
 Please check that your question  has not already been answered in the
 FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

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




-
Please check that your question  has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

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




LDAPTransformer

2002-12-18 Thread Mark Pembury
Hi

I'm using Cocoon 2.0.3 with the LDAP option enabled, Tomcat 4.0.4, and
XIndices 1.0

I'm trying to get the LDAPTransformer to work. I've set-up a simple LDAP
database using Qcslapd. I can browser and connect to the local LDAP server
using JNDI with no problem. When I set-up a Cocoon LDAPTransformer example I
get the following problem

[LDAPTransformer] Error in LDAP-Query: javax.naming.PartialResultException:
[LDAP: error code 9; remaining name 'o=ark-online.net'.
The query I'm submitting is 

page xmlns:ldap=http://apache.org/cocoon/LDAP/1.0;
execute-query xmlns=http://apache.org/cocoon/LDAP/1.0;
 initializercom.sun.jndi.ldap.LdapCtxFactory/initializer
 serverurlldap://localhost:389/o=ark-online.net/serverurl
 scopeSUBTREE_SCOPE/scope
 debugTRUE/debug 
 rootdncn=mark.pembury,o=ark-online.net/rootdn
 passwordpassword/password
 searchbaseo=ark-online.net/searchbase
 show-attributetrue/show-attribute
 
filter![CDATA[((uid=mark.pembury*)(objectclass=groupOfUniqueNames))]]/
filter
/execute-query
/page

Has anyone come across this before. Does anyone use the LDAPTransformer?

In hope

Mark.


Mark Pembury

Product Architect
ARK eManagement


attachment: winmail.dat-
Please check that your question  has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

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


use redirect with SourceWritingTransformer?

2002-12-18 Thread Timothy Larson
Is it possible to call a pipeline to use the SourceWritingTransformer
and still only send a simple map:redirect-to ... back to the client?

Tim



-
Please check that your question  has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

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




esql character encoding problem

2002-12-18 Thread [EMAIL PROTECTED]
SORRY I'VE POSTED THIS YET BUT I FORGOT THE SUBJECT

I'm using ESQL to read and write data from a MYSQL database.

When I fill a field with non US characters, I see strange characters instead of the 
ones I expected.
For example, when I write the string òàù, this is written like =a?, even if when I 
red it with ESQL I get back the right string.

if I manually try from mysql prompt:
INSERT INTO table VALUES ('òàù'), the data is properly stored.

I've read an article at
http://marc.theaimsgroup.com/?l=xml-cocoon-usersm=103701015026425w=2
about a similar subject, but the author speak of a request generator and an XML 
serializer, while I'm using an xsp generator and an html serializer:

map:match pattern=*/*.html
   map:generate type=serverpages src={1}/{2}.xsp/
   map:transform src={1}/{2}.xsl/
   map:serialize type=html/
/map:match

They suggest to use the SetCharacterEncodingAction, but it hasn't solved my problem.

MySQL uses the default ISO-8859-1 encoding and I've added the ISO-8859-1 encoding to 
the html serializer:

map:serializer logger=sitemap.serializer.html mime-type=text/html ...
  encodingISO-8859-1/encoding
  buffer-size1024/buffer-size
/map:serializer

I've tried to add the same encoding element to the serverpages generator, but it 
didn't work.

Any suggestion?



-
Please check that your question  has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

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




Re: cvs2.1 xmlform sample broken?

2002-12-18 Thread Thor Heinrichs-Wolpert
The note below shows the moved files and issue.

The classes have been moved.  When I do a clean cvs pull and then 
build, the sample no longer works since the classes do not get built 
and the sitemap is looking for them.
Cheers,
Thor HW

On Wednesday, December 18, 2002, at 12:51  AM, Nicola Ken Barozzi wrote:



Ivelin Ivanov wrote:

Thanks for the notification Thor.
Nicola, what is the deal?


What is the problem?


- Original Message - From: Thor Heinrichs-Wolpert 
[EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, December 17, 2002 10:03 PM
Subject: cvs2.1 xmlform sample broken?
I see some files moved in CVS by nicolaken such as
src/java/org/apache/cocoon/samples/xmlform
 UsageFeedbackAction.java
 UserBean.java
 WizardAction.java
but the sitemaps and examples don't seem to have been modified.
Is something up?


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


-
Please check that your question  has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

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





-
Please check that your question  has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

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




Re: esql character encoding problem

2002-12-18 Thread Christian Haul
On 18.Dec.2002 -- 05:33 PM, [EMAIL PROTECTED] wrote:
 SORRY I'VE POSTED THIS YET BUT I FORGOT THE SUBJECT
 
 I'm using ESQL to read and write data from a MYSQL database.
 
 When I fill a field with non US characters, I see strange characters instead of the 
ones I expected.
 For example, when I write the string òàù, this is written like =a?, even if when 
I red it with ESQL I get back the right string.
 
 if I manually try from mysql prompt:
 INSERT INTO table VALUES ('òàù'), the data is properly stored.
 
 I've read an article at
 http://marc.theaimsgroup.com/?l=xml-cocoon-usersm=103701015026425w=2
 about a similar subject, but the author speak of a request generator and an XML 
serializer, while I'm using an xsp generator and an html serializer:
 
 map:match pattern=*/*.html
map:generate type=serverpages src={1}/{2}.xsp/
map:transform src={1}/{2}.xsl/
map:serialize type=html/
 /map:match
 
 They suggest to use the SetCharacterEncodingAction, but it hasn't solved my problem.
 
 MySQL uses the default ISO-8859-1 encoding and I've added the ISO-8859-1 encoding to 
the html serializer:
 
 map:serializer logger=sitemap.serializer.html mime-type=text/html ...
   encodingISO-8859-1/encoding
   buffer-size1024/buffer-size
 /map:serializer
 
 I've tried to add the same encoding element to the serverpages generator, but it 
didn't work.

Hi,

your JDBC driver is supposed to return unicode to the application. If
it doesn't, it is either broken or you did not tell the DBMS the
correct character encoding. IOW this problem would appear with any
java application using your data. Please check.

The esql:get-string tag accepts an additional encoding parameter to do
conversions but YMMV. Search this list, there have been some good
explanations of this recently.

Chris.

Please follow up summarizing your problem and which suggested solution
/ information worked for you when you consider your problem
solved. Add SUMMARY:  to the subject line. This will make FAQ
generation and searching the list easier. In addition, it makes
helping you more fun. Thank you.

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

-
Please check that your question  has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

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




cocoon samples live [why not]

2002-12-18 Thread Cocoon User
i have test today for my first time cocoon2.1 cvs

when i asks http:/./cocoon
i have notice than in my local machine i have cocoon's web site

when i call /cocoon/samples

i get all the refactored samples

i have try to ask /cocoon/samples from the xml.apache.org
live web site without to get any responce. why we dont have all this
sample live to anyone?

stavros kounis



-
Please check that your question  has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

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




Re: LDAPTransformer

2002-12-18 Thread Nicola Ken Barozzi


Mark Pembury wrote:

Hi

I'm using Cocoon 2.0.3 with the LDAP option enabled, Tomcat 4.0.4, and
XIndices 1.0

I'm trying to get the LDAPTransformer to work. I've set-up a simple LDAP
database using Qcslapd. I can browser and connect to the local LDAP server
using JNDI with no problem. 

I'm using Qcslapd too with Cocoon, and for me it works.
But there seem to be bugs in some cases, and I've not yet had time to 
follow up on them, since for me it works.

When I set-up a Cocoon LDAPTransformer example I
get the following problem

[LDAPTransformer] Error in LDAP-Query: javax.naming.PartialResultException:
[LDAP: error code 9; remaining name 'o=ark-online.net'.
The query I'm submitting is 

page xmlns:ldap=http://apache.org/cocoon/LDAP/1.0;
execute-query xmlns=http://apache.org/cocoon/LDAP/1.0;
 initializercom.sun.jndi.ldap.LdapCtxFactory/initializer
 serverurlldap://localhost:389/o=ark-online.net/serverurl
 scopeSUBTREE_SCOPE/scope
 debugTRUE/debug 
 rootdncn=mark.pembury,o=ark-online.net/rootdn
 passwordpassword/password
 searchbaseo=ark-online.net/searchbase
 show-attributetrue/show-attribute
 
filter![CDATA[((uid=mark.pembury*)(objectclass=groupOfUniqueNames))]]/
filter
/execute-query
/page

Has anyone come across this before. Does anyone use the LDAPTransformer?

?xml version=1.0?

page
 execute-query xmlns=http://apache.org/cocoon/LDAP/1.0;
   initializercom.sun.jndi.ldap.LdapCtxFactory/initializer
   serverurlldap://localhost/serverurl
   debugTRUE/debug
   searchbaseo=AISA,c=IT/searchbase
   filter![CDATA[(objectclass=*)]]/filter
/execute-query

/page

This is the query that currently I'm using inhouse for my company 
adressbook (small), see if there is anything that you might infer from it.

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


-
Please check that your question  has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

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



EJBs and Cocoon (hmm, again ;-)

2002-12-18 Thread Alef Arendsen
Hi all,

snip from=Rob Jellinghaus date=2002-04-02
You wouldn't want to develop an airline reservation system with (just) 
Cocoon.  You wouldn't want to develop a website and documentation 
production environment with (just) EJBs.

I look forward to the two becoming more closely interoperable.  Having
an 
XSP framework which can work with an EJB environment would be a good
start
/snip

Ok, Rob mentioned the fact that he'd like to see Cocoon more
interoperable with EJBs. That's exactly what I'd like to see as well.
I'm kind of new to Cocoon but basically decided already to use in our
next project, which is an eCommerce system that also has a lot of
content management features in it.

I want to have my interface component based as much as I want my backend
to be component based and I think Cocoon is the solution for this
problem. But how to connect Cocoon to my EJBs? I've seen this question
asked a lot but haven't seen any real answers.

So the question is: does anybody already have a decent solution for the
EJB-Cocoon problem? Or isn't there any problem at all...

If somebody would help me out here, you've got another happy Cocoon user
once again ;-)

Thanks a lot,

Alef Arendsen

--
Alef Arendsen
JTeam B.V.
E: [EMAIL PROTECTED]
T: +31(0) 20 486 20 36
F: +31(0) 84 837 00 00
M: +31(0) 6 24 11 1996
W: www.jteam.nl
[EMAIL PROTECTED]
+31(0)6 19 338 921


-
Please check that your question  has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

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




Re: cvs2.1 xmlform sample broken?

2002-12-18 Thread Nicola Ken Barozzi

Thor Heinrichs-Wolpert wrote:

The note below shows the moved files and issue.

The classes have been moved.  When I do a clean cvs pull and then build, 
the sample no longer works since the classes do not get built and the 
sitemap is looking for them.

The problem is not because they were moved per se, but because the 
samples block was not included in properties.xml

Sorry for the inconvenience, it should work now, I committed a fix.

Try it, I'm debugging ATM other blocks I'm moving, so I can't try it myself.

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


-
Please check that your question  has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

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



ProfilerGenerator

2002-12-18 Thread Rano, Didier

I tried the ProfilerGenerator. But I have a problem with some negative values in
results. How avoid this problem ?

Didier Rano
Serv'N Data

-
Please check that your question  has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

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




Re: Problem using java extension in xsl

2002-12-18 Thread Martin Holz
Anna Afonchenko [EMAIL PROTECTED] writes:

 Hi All.
 
 Ok, I hope this is the last question for today.
 
 In my xsl stylesheet I use some java extension class ParseTagContent.class.
 
 In my xsl I have declared xmlns:java=xalan://ParseTagContent
 
 The class ParseTagContent.class is in the same directory with the xsl.
 
  
 
 When I run this xsl using a batch file (not through Cocoon), everything is
 fine.
 
 But when I try to run it through Cocoon, I get the following error message:
 
 The URI xalan://ParseTagContent does not identify an external Java class
 
 description: org.apache.cocoon.ProcessingException: Could not read resource
 file:/C:/Program Files/Apache Group/Tomcat
 4.1/webapps/cocoon/ub/violations.html:
 javax.xml.transform.TransformerException: The URI xalan://ParseTagContent does
 not identify an external Java class
 
  
 
 I guess this is because Cocoon cannot find the .class file.
 
 Where should I put this class so that both Cocoon and my xsl could find it?

Put it into WEB-INF/classes

Martin

-
Please check that your question  has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

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




Re: cvs2.1 xmlform sample broken?

2002-12-18 Thread Nicola Ken Barozzi

Nicola Ken Barozzi wrote:


Thor Heinrichs-Wolpert wrote:


The note below shows the moved files and issue.

The classes have been moved.  When I do a clean cvs pull and then 
build, the sample no longer works since the classes do not get built 
and the sitemap is looking for them.


The problem is not because they were moved per se, but because the 
samples block was not included in properties.xml

Sorry for the inconvenience, it should work now, I committed a fix.

Try it, I'm debugging ATM other blocks I'm moving, so I can't try it 
myself.

Ok, I tried it and it still doesn't work, because the build system has a 
bug. In the meantime, create a mocks dir in the samples block with a 
dummy file in it to make it compile.

I'm working on it.

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


-
Please check that your question  has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

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



Re: cvs2.1 xmlform sample broken?

2002-12-18 Thread Thor Heinrichs-Wolpert
It looks happy enough now.
I did a
touch xml-cocoon2/src/blocks/samples/mocks/foo.txt
and it built happily enough.  I've run the example and it works again.

Cheers,
Thor HW

On Wednesday, December 18, 2002, at 10:41  AM, Nicola Ken Barozzi wrote:



Nicola Ken Barozzi wrote:

Thor Heinrichs-Wolpert wrote:

The note below shows the moved files and issue.

The classes have been moved.  When I do a clean cvs pull and then 
build, the sample no longer works since the classes do not get built 
and the sitemap is looking for them.
The problem is not because they were moved per se, but because the 
samples block was not included in properties.xml
Sorry for the inconvenience, it should work now, I committed a fix.
Try it, I'm debugging ATM other blocks I'm moving, so I can't try it 
myself.

Ok, I tried it and it still doesn't work, because the build system has 
a bug. In the meantime, create a mocks dir in the samples block with a 
dummy file in it to make it compile.

I'm working on it.

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


-
Please check that your question  has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

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




-
Please check that your question  has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

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




RE: LDAPTransformer

2002-12-18 Thread Mark Pembury
Thanks for your help. I'll give it a try.

-Original Message-
From: Nicola Ken Barozzi [mailto:[EMAIL PROTECTED]]
Sent: 18 December 2002 17:31
To: [EMAIL PROTECTED]
Subject: Re: LDAPTransformer




Mark Pembury wrote:
 Hi

 I'm using Cocoon 2.0.3 with the LDAP option enabled, Tomcat 4.0.4, and
 XIndices 1.0

 I'm trying to get the LDAPTransformer to work. I've set-up a simple LDAP
 database using Qcslapd. I can browser and connect to the local LDAP server
 using JNDI with no problem.

I'm using Qcslapd too with Cocoon, and for me it works.
But there seem to be bugs in some cases, and I've not yet had time to
follow up on them, since for me it works.

 When I set-up a Cocoon LDAPTransformer example I
 get the following problem

 [LDAPTransformer] Error in LDAP-Query:
javax.naming.PartialResultException:
 [LDAP: error code 9; remaining name 'o=ark-online.net'.
 The query I'm submitting is

 page xmlns:ldap=http://apache.org/cocoon/LDAP/1.0;
 execute-query xmlns=http://apache.org/cocoon/LDAP/1.0;
  initializercom.sun.jndi.ldap.LdapCtxFactory/initializer
  serverurlldap://localhost:389/o=ark-online.net/serverurl
  scopeSUBTREE_SCOPE/scope
  debugTRUE/debug
  rootdncn=mark.pembury,o=ark-online.net/rootdn
  passwordpassword/password
  searchbaseo=ark-online.net/searchbase
  show-attributetrue/show-attribute


filter![CDATA[((uid=mark.pembury*)(objectclass=groupOfUniqueNames))]]/
 filter
 /execute-query
 /page

 Has anyone come across this before. Does anyone use the LDAPTransformer?

?xml version=1.0?

page
  execute-query xmlns=http://apache.org/cocoon/LDAP/1.0;
initializercom.sun.jndi.ldap.LdapCtxFactory/initializer
serverurlldap://localhost/serverurl
debugTRUE/debug
searchbaseo=AISA,c=IT/searchbase
filter![CDATA[(objectclass=*)]]/filter
/execute-query

/page

This is the query that currently I'm using inhouse for my company
adressbook (small), see if there is anything that you might infer from it.

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


-
Please check that your question  has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

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



-
Please check that your question  has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

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




RE: cocoon samples live [why not]

2002-12-18 Thread Geoff Howard
Because for now, the site at xml.apache.org is static-only by decree 
to conserve the shared resources across all sites.  It is a shame, 
but may not be so much longer because cocoon is in the process of 
being promoted to a top level apache project and my understanding 
is that that will carry with it the option of eating one's own dog 
food as the saying goes.

Correct me if I'm wrong, but I don't think Tomcat's examples are available 
on the live site either.

Geoff Howard

 -Original Message-
 From: Cocoon User [mailto:[EMAIL PROTECTED]]
 Sent: Wednesday, December 18, 2002 12:28 PM
 To: [EMAIL PROTECTED]
 Subject: cocoon samples live [why not]
 
 
 i have test today for my first time cocoon2.1 cvs
 
 when i asks http:/./cocoon
 i have notice than in my local machine i have cocoon's web site
 
 when i call /cocoon/samples
 
 i get all the refactored samples
 
 i have try to ask /cocoon/samples from the xml.apache.org
 live web site without to get any responce. why we dont have all this
 sample live to anyone?
 
 stavros kounis
 
 
 
 -
 Please check that your question  has not already been answered in the
 FAQ before posting. http://xml.apache.org/cocoon/faq/index.html
 
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail:   [EMAIL PROTECTED]
 
 
 

-
Please check that your question  has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

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




RE: LDAPTransformer

2002-12-18 Thread Mark Pembury
I've modified your query and I now get some information from LDAP. There
does appear to be a problem when dealing with binary data (i.e. passwords).
I will experiment with differnet options and see if I can use the attribute
tag to exclude some of the fields.

Thanks once again for your help.

-Original Message-
From: Nicola Ken Barozzi [mailto:[EMAIL PROTECTED]]
Sent: 18 December 2002 17:31
To: [EMAIL PROTECTED]
Subject: Re: LDAPTransformer




Mark Pembury wrote:
 Hi

 I'm using Cocoon 2.0.3 with the LDAP option enabled, Tomcat 4.0.4, and
 XIndices 1.0

 I'm trying to get the LDAPTransformer to work. I've set-up a simple LDAP
 database using Qcslapd. I can browser and connect to the local LDAP server
 using JNDI with no problem.

I'm using Qcslapd too with Cocoon, and for me it works.
But there seem to be bugs in some cases, and I've not yet had time to
follow up on them, since for me it works.

 When I set-up a Cocoon LDAPTransformer example I
 get the following problem

 [LDAPTransformer] Error in LDAP-Query:
javax.naming.PartialResultException:
 [LDAP: error code 9; remaining name 'o=ark-online.net'.
 The query I'm submitting is

 page xmlns:ldap=http://apache.org/cocoon/LDAP/1.0;
 execute-query xmlns=http://apache.org/cocoon/LDAP/1.0;
  initializercom.sun.jndi.ldap.LdapCtxFactory/initializer
  serverurlldap://localhost:389/o=ark-online.net/serverurl
  scopeSUBTREE_SCOPE/scope
  debugTRUE/debug
  rootdncn=mark.pembury,o=ark-online.net/rootdn
  passwordpassword/password
  searchbaseo=ark-online.net/searchbase
  show-attributetrue/show-attribute


filter![CDATA[((uid=mark.pembury*)(objectclass=groupOfUniqueNames))]]/
 filter
 /execute-query
 /page

 Has anyone come across this before. Does anyone use the LDAPTransformer?

?xml version=1.0?

page
  execute-query xmlns=http://apache.org/cocoon/LDAP/1.0;
initializercom.sun.jndi.ldap.LdapCtxFactory/initializer
serverurlldap://localhost/serverurl
debugTRUE/debug
searchbaseo=AISA,c=IT/searchbase
filter![CDATA[(objectclass=*)]]/filter
/execute-query

/page

This is the query that currently I'm using inhouse for my company
adressbook (small), see if there is anything that you might infer from it.

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


-
Please check that your question  has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

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



-
Please check that your question  has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

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




RE: How do I read files inside an Action?

2002-12-18 Thread Ray Martin
Sir,

Just like any other file called from java.

In the action class you would need:

import java.io.File; // cocoon has some defaults - this could be one of them

//nothing special here, just an example.  however, this directory is where
cocoon places uploaded files by default.  make yours wherever your xml file
is located.
String currentPath = C:/Program Files/Apache Group/Tomcat
4.1/work/Standalone/localhost/cocoon/cocoon-files/upload-dir/;

// next three lines checks the directory for files and sets pointer to the
first file in the directory (should put some checks around this)(could
iterate through the list)
File fileDir = new File(currentPath);
File[] listOfFiles = fileDir.listFiles();
String filename = listOfFiles[0].toString();

File uploadDir = new File(currentPath);
File theXMLfile = new File(filename);
System.out.println(The director is:  + theResume.getParent());
System.out.println(The file name:  + theResume.getName());
long fileLen = theXMLfile.length();
Long testThis = new Long(fileLen);
int fileLength = testThis.intValue();
FileInputStream fis = new FileInputStream(theResume);
byte[] byteArray = new byte[fileLength];
int cnt = fis.read(byteArray, 0, fileLength);
fis.close();

byteArray now contains the contents of theXMLfile.  this only works for
ASCII files.  i do not have an example at my fingertips for Unicode.


these are snippets from an action that i have performing.  if you need
anything else, holler.

Ray

 -Original Message-
 From: Chintalapaty, Sreedhar [mailto:[EMAIL PROTECTED]]
 Sent: Wednesday, December 18, 2002 10:00 AM
 To: [EMAIL PROTECTED]
 Subject: How do I read files inside an Action?


 Hi,

 Can some one point me to an example of how we can access an xml
 file on the file system from a custom Action?

 TIA,

 Sreedhar

 -
 Please check that your question  has not already been answered in the
 FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

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





-
Please check that your question  has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

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




RE: cocoon samples live [why not]

2002-12-18 Thread Cocoon User
cocoon it's a great project (last 16 months we have develop about 5
commercial site xml based served by a virtual hosting cocoon based server)


the best way for any one to accept cocoon is to see the examples online
without to have to install cocoon himself.

try to make cocoon so popular as apache web server :-)


stavros


On Wed, 18 Dec 2002, Geoff Howard wrote:

 Because for now, the site at xml.apache.org is static-only by decree
 to conserve the shared resources across all sites.  It is a shame,
 but may not be so much longer because cocoon is in the process of
 being promoted to a top level apache project and my understanding
 is that that will carry with it the option of eating one's own dog
 food as the saying goes.

 Correct me if I'm wrong, but I don't think Tomcat's examples are available
 on the live site either.

 Geoff Howard

  -Original Message-
  From: Cocoon User [mailto:[EMAIL PROTECTED]]
  Sent: Wednesday, December 18, 2002 12:28 PM
  To: [EMAIL PROTECTED]
  Subject: cocoon samples live [why not]
 
 
  i have test today for my first time cocoon2.1 cvs
 
  when i asks http:/./cocoon
  i have notice than in my local machine i have cocoon's web site
 
  when i call /cocoon/samples
 
  i get all the refactored samples
 
  i have try to ask /cocoon/samples from the xml.apache.org
  live web site without to get any responce. why we dont have all this
  sample live to anyone?
 
  stavros kounis
 
 
 
  -
  Please check that your question  has not already been answered in the
  FAQ before posting. http://xml.apache.org/cocoon/faq/index.html
 
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail:   [EMAIL PROTECTED]
 
 
 

 -
 Please check that your question  has not already been answered in the
 FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

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




-
Please check that your question  has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

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




Link Livesites: Simauria Networks http://www.simauria.net cocoon2.0.3

2002-12-18 Thread Jose Antonio Garcia-Luengo
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1



- -- 
  José A. Garcia-Luengo  |Simauria Networks
 --
  [EMAIL PROTECTED] |  [EMAIL PROTECTED]
 Tlf: 615 91 13 92   | http://www.simauria.net
 --
 C/ Cádiz, 90 pta 6. 46006 Valencia.
Tlf: +34 963.44.48.48 - Fax: +34 963.44.48.49
 --


-BEGIN PGP SIGNATURE-
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see http://www.gnupg.org

iD8DBQE+AGRDCVYSKXvUBooRAlX0AJ4gBrnEHbTd4CI+CP+Dk/vfq81dYwCaAk3h
4gdIYDxcQH37d0cYDQip8S0=
=Vtli
-END PGP SIGNATURE-


-
Please check that your question  has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

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




RE: [ANNOUNCEMENT] Cocoon Developers Handbook Available

2002-12-18 Thread Matthew Langham
Congratulations!

Matthew

--
Open Source Group   Cocoon { Consulting, Training, Projects }
=
Matthew Langham, SN AG, Klingenderstrasse 5, D-33100 Paderborn
Tel:+49-5251-1581-30  [EMAIL PROTECTED] - http://www.s-und-n.de
-
Cocoon book:
  http://www.amazon.com/exec/obidos/ASIN/0735712352/needacake-20
Weblogs:
  http://radio.weblogs.com/0103021/
  http://www.oreillynet.com/weblogs/author/1014
=


-Original Message-
From: Jeremy Aston [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, December 18, 2002 1:51 PM
To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Subject: [ANNOUNCEMENT] Cocoon Developers Handbook Available


Lajos Moczar and myself are pleased to let the
community know that our book, the Cocoon Developer's
Handbook, is now available.  It has been published by
Sams (http://www.sams.com) and is available from their
website as well as all the usual suspects like Amazon,
Barnes and Noble etc.

The book covers pretty much all of the proven
features, architecture and components.  We have also
got lots of detailed coverage of other topics such as
internationalisation, searching, entity catlogs,
portals, SOAP, extending Cocoon, reference material
developing apps, tuning and much more.

The relevant source code is available from Lajos' and
my sites (http://galatea.com and
http://www.pigbite.com respectively).

If you get hold of a copy then please let us know what
you think!

Shameless plug over ;-)

Best regards

Jeremy  Lajos


__
Do You Yahoo!?
Everything you'll ever need on one web page
from News and Sport to Email and Music Charts
http://uk.my.yahoo.com

-
Please check that your question  has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

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


-
Please check that your question  has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

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




Cocoon file upload

2002-12-18 Thread Siraj Shakil
Hello Guys,

How do u know the uploaded file name using Cocoon file
upload mechanism? I only see that uploaded url is
upload : and can see the upload file directory. Any
suggestions?

Thanks in advance.

Best regards, Shakil

__
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com

-
Please check that your question  has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

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




Getting XSP pages from an XML database

2002-12-18 Thread Mark Horgan
I'm trying to make a CMS and I'm looking into keeping everything in an XML
database but I can't seem to get XSP pages directly from the database.

Is there a way to store XSPs in the database and have cocoon generate class
files so the process is resonably fast? The XML pseudo-protocol works for
the file generator but not server-pages. Does that mean that there is a
different set of sources that work for each generator?


From the sitemap:

The following doesn't work:
map:generate type=serverpages src=xmldb:xindice:///db/test/simple/

Though this does work:
map:generate type=file src=xmldb:xindice:///db/test/simple/

The following does work but it doesn't seem to create a class file and is
quite slow every time.

map:match pattern=learning-db
map:generate type=file src=xmldb:xindice:///db/test/simple/
  map:serialize type=xml/
/map:match
map:match pattern=learning
map:generate type=serverpages src=cocoon:/learning-db/
map:serialize type=xml/
/map:match

(Using Cocoon 2.1-dev)






-
Please check that your question  has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

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




RE: XPath problem in Cocoon?

2002-12-18 Thread Luca Morandini
Anna,

ok, let's try to sort it out, send us:

- The pipeline
- The XML to be transformed
- The XSLT

Possibly, strip off all the unnecessary stuff.

Best regards,

- 
   Luca Morandini 
   GIS Consultant 
  [EMAIL PROTECTED] 
http://utenti.tripod.it/lmorandini/index.html 
-
 

 -Original Message-
 From: Anna Afonchenko [mailto:[EMAIL PROTECTED]]
 Sent: Wednesday, December 18, 2002 3:25 PM
 To: [EMAIL PROTECTED]
 Subject: Re: XPath problem in Cocoon?
 
 
 Hi Konstantin.
 I know that my stylesheet works without Cocoon, I ran it through the batch
 file, using saxon. Even if I just run it using XSL Transformation of XMLSpy,
 it works fine, and chooses the //p tags as it should.
 So I am sure the problem is with Cocoon, but I don't understand, if it's my
 problem giving cocoon some wrong parameters (I don't know how this could
 happen) or maybe it is Cocoon problem? Using //node-name is a common XPath
 expression, it should work.
 
 Maybe somebody knows what's wrong?
 Does nobody having problems with matching this kind of XPath expression in
 Cocoon?
 It is very important for me, so if somebody can give me a hint of where the
 problem lies, I would really appreciate this.
 
 Thank you very much for helping
 
 Anna
 


-
Please check that your question  has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

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




RE: Cocoon file upload

2002-12-18 Thread Geoff Howard
http://marc.theaimsgroup.com/?l=xml-cocoon-usersw=2r=1s=uploadq=b

 -Original Message-
 From: Siraj Shakil [mailto:[EMAIL PROTECTED]]
 Sent: Wednesday, December 18, 2002 9:50 AM
 To: [EMAIL PROTECTED]
 Subject: Cocoon file upload
 
 
 Hello Guys,
 
 How do u know the uploaded file name using Cocoon file
 upload mechanism? I only see that uploaded url is
 upload : and can see the upload file directory. Any
 suggestions?
 
 Thanks in advance.
 
 Best regards, Shakil
 
 __
 Do you Yahoo!?
 Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
 http://mailplus.yahoo.com
 
 -
 Please check that your question  has not already been answered in the
 FAQ before posting. http://xml.apache.org/cocoon/faq/index.html
 
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail:   [EMAIL PROTECTED]
 
 
 

-
Please check that your question  has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

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




Re: cvs2.1 xmlform sample broken?

2002-12-18 Thread Nicola Ken Barozzi


Thor Heinrichs-Wolpert wrote:

It looks happy enough now.
I did a
touch xml-cocoon2/src/blocks/samples/mocks/foo.txt
and it built happily enough.  I've run the example and it works again.


Good.

I've made changes to the build and it seems to work now without the 
hack. In the meantime I've also moved some code to blocks and renamed 
module.xml to project-info.xml, as decided on the list.

See if it still works ok, on my system it seems right.

Thanks for the help :-)

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


-
Please check that your question  has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

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



Re: XPath problem in Cocoon?

2002-12-18 Thread Joerg Heinicke
For me it looks like a problem with a default namespace. Is anywhere in 
the XML something like:

element xmlns=http://www.foo.com;
  pone of your paragraphs/p
/element

??

Then you must bind this namespace to a namespace-prefix in the XSLT:

xsl:stylesheet version=1.0
xmlns:xsl=http://www.w3.org/1999/XSL/Transform;
xmlns:foo=http://www.foo.com;

xsl:template match=/
  xsl:for-each select=foo:p
!-- does this work? --
  /xsl:for-each
/xsl:template

/xsl:stylesheet

Regards,

Joerg

Anna Afonchenko wrote:
Hi Konstantin.
I know that my stylesheet works without Cocoon, I ran it through the batch
file, using saxon. Even if I just run it using XSL Transformation of XMLSpy,
it works fine, and chooses the //p tags as it should.
So I am sure the problem is with Cocoon, but I don't understand, if it's my
problem giving cocoon some wrong parameters (I don't know how this could
happen) or maybe it is Cocoon problem? Using //node-name is a common XPath
expression, it should work.

Maybe somebody knows what's wrong?
Does nobody having problems with matching this kind of XPath expression in
Cocoon?
It is very important for me, so if somebody can give me a hint of where the
problem lies, I would really appreciate this.

Thank you very much for helping

Anna

- Original Message -
From: Konstantin Piroumian [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, December 18, 2002 3:17 PM
Subject: Re: XPath problem in Cocoon?


Anna,
(please avoid HTML emails)

Cocoon uses underlying XSLT engine to perform the transformation, so either
this is just an XSLT problem in your code or a problem of the Xalan or XSLTC
(which one is used).

You can simply check if your stylesheet works without Cocoon: run Xalan from
the command line with your XML as input and see what happens.

Konstantin

- Original Message -
From: Anna Afonchenko
To: cocoon-users
Sent: Wednesday, December 18, 2002 16:01
Subject: XPath problem in Cocoon?


Hi all.
Another question for today:
I wrote a small xsl that matches p nodes from the input and prints their
content.
I wrote it like this:
xsl:template match=/
xsl:for-each select=//p
xsl:textContent of this tag is /xsl:text
xsl:value-of select=./
/xsl:for-each
/xsl:template

Then I run this stylesheet through cocoon pipeline.
I get empty result, e.g. the for-each didn't match any p node in the input
xml file.
But there are p tags in the input.
Moreover, if I change the for-each statement to
xsl:for-each select=descendant::node()[name()='p']
It executes correctly!

Can anyone explain to me, why Cocoon doesn't match //node-name?
In XPath both //node-name and descendant::node()[name()='node-name'] have
the same meaning.
I dont want to use descendant::... style because I have this stylesheet get
the XPath expression to match from some external xml file, and it is really
a headache (if possible at all) to change all my //node-name expressions to
descendant::node()[name()='node-name'] style.

Please explain this mistery to me.

Thank you very much for help.
I know I am writing too many e-mails to the group these days, but since I am
very new to Cocoon, I get stuck every few minutes on something new.

Regards,
Anna


-
Please check that your question  has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

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


-
Please check that your question  has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

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





-
Please check that your question  has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

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




[HELP]Exception in ServerPagesGenerator.generate(), interclient201,esql

2002-12-18 Thread Juraj misovych

i have
-windows2000
-cocoon 204 , (203 ,the same errror)
-jdk1.3.1_06
-tomcat 4.1.12
-firebird server
-interclient 201

can sobody where can by a problem ???
BUG ? where ?? taglib,interclient??

i obtain this error:


---
Description:org.apache.cocoon.ProcessingException: Exception in 
ServerPagesGenerator.generate(): java.lang.RuntimeException: Error 
executing statement:   select * from USERS: 
interbase.interclient.InvalidOperationException: [interclient] Invalid 
operation to read past end of cursor.
See API reference for exception 
interbase.interclient.InvalidOperationException
---
An error occurred
The org.apache.cocoon.www.sitemap_xmap notifies that 
org.apache.cocoon.ProcessingException says:

Exception in ServerPagesGenerator.generate()

More precisely:

org.apache.cocoon.ProcessingException: Exception in 
ServerPagesGenerator.generate(): java.lang.RuntimeException: Error 
executing statement: select * from USERS : 
interbase.interclient.InvalidOperationException: [interclient] Invalid 
operation to read past end of cursor.
See API reference for exception 
interbase.interclient.InvalidOperationException

extra info
full exception chain stacktrace
Original exception : java.lang.RuntimeException: Error executing 
statement: select * from USERS : 
interbase.interclient.InvalidOperationException: [interclient] Invalid 
operation to read past end of cursor.
See API reference for exception 
interbase.interclient.InvalidOperationException
at 
org.apache.cocoon.www.tmp.esql_xsp.generate(C:\server\app\Tomcat_4.1\work\Standalone\localhost\cocoon\cocoon-files\org/apache/cocoon/www/tmp\esql_xsp.java:449)
at 
org.apache.cocoon.generation.ServerPagesGenerator.generate(ServerPagesGenerator.java:258)
at 
org.apache.cocoon.components.pipeline.CachingEventPipeline.process(CachingEventPipeline.java:250)
at 
org.apache.cocoon.components.pipeline.CachingStreamPipeline.process(CachingStreamPipeline.java:395)
at 
org.apache.cocoon.www.sitemap_xmap.matchN1098C(C:\server\app\Tomcat_4.1\work\Standalone\localhost\cocoon\cocoon-files\org/apache/cocoon/www\sitemap_xmap.java:11536)
at 
org.apache.cocoon.www.sitemap_xmap.process(C:\server\app\Tomcat_4.1\work\Standalone\localhost\cocoon\cocoon-files\org/apache/cocoon/www\sitemap_xmap.java:3754)
at 
org.apache.cocoon.www.sitemap_xmap.process(C:\server\app\Tomcat_4.1\work\Standalone\localhost\cocoon\cocoon-files\org/apache/cocoon/www\sitemap_xmap.java:3107)
at org.apache.cocoon.sitemap.Handler.process(Handler.java:227)
at org.apache.cocoon.sitemap.Manager.invoke(Manager.java:173)
at org.apache.cocoon.sitemap.SitemapManager.process(SitemapManager.java:152)
at org.apache.cocoon.Cocoon.process(Cocoon.java:579)
at org.apache.cocoon.servlet.CocoonServlet.service(CocoonServlet.java:1043)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
at 
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:260)
at 
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
at 
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at 
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at 
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
at 
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at 
org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2396)
at 
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)
at 
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
at 
org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:170)
at 
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
at 
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:172)
at 
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
at 
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at 
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174)
at 
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
at 

Use of SessionPropagatorAction

2002-12-18 Thread Malick Fall
Hi all,

I am a new Cocoon user trying to build a Web application.

Do you have some examples on how to use your SessionPropagatorAction.

I have an http service responsible for Authenticating my users.
http://WindowsBox:1010/login.asp

My sitemap looks like this:

map:match pattern=
map:act type=request
map:parameter name=parameters value=true/
map:parameter name=default.user value=foo/
map:parameter name=default.pwd value=bar/
map:generate
src=http://WindowsBox:1010/login.asp?userid={user}amp;pwd={pwd}/
/map:act
map:serialize type=xml/
/map:match


So I send the username and password to the Http service and get XML back w/
the user info if the Authentication was successful. Something like

userinfo
useridfoo/useridpasswordbar/password
address.../addressemail.../email
/userinfo

Otherwise you get an userinfo element with an error code/message in it
userinfo
errorcode123/errorcode
errormsgWrong username/password, try again./errormsg
/userinfo

At this point I need to store in the session the username, password,
sessionID and a flag that proves that the authentication was successful. It
cannot happen in an XSP because my Authentication service is HTTP, which
becomes a generator in my sitemap.

After my generator I would like to store /userinfo/userid and
userinfo/password in the session. So I can check is the user was
authenticated B4 letting them go through any other pipeline.

I figured SessionPropagatorAction should be the answer, but I cannot figure
out where and how to use it.

map:act type=session-propagator
  paramater name=user value={/userinfo/userid}
  paramater name=pwd value={/userinfo/password}
paramater name=sessionID value=???
 /map:act

Any help would be greatly appreciated.

Thanks, Cocoon *Really Rocks*

./Malick.
[EMAIL PROTECTED]


-
Please check that your question  has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

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




  1   2   >