Re: XSP/Java - simple? problem

2003-06-11 Thread Andreas Hartmann
Hi Derek,

Derek Hohls wrote:

Hi

Can someone explain what is wrong with
the following code:
  labels show=true
 
  xsp:attribute name=labelxsp:exprfGraphPtLabel/xsp:expr/xsp:attribute
  
  xsp:logic
  if ((fGraphPtLabel != null) amp;amp; (fGraphPtLabel.equals(name))) {  
  /xsp:logic
xsp:attribute name=rotate14/xsp:attribute
  xsp:logic
  } else {
  /xsp:logic
xsp:attribute name=rotate1/xsp:attribute
  xsp:logic
  }
  /xsp:logic 

Gives an output of:

  labels show=true label=null rotate=14 rotate=1

ie. if the fGraphPtLabel is null, the rotate should be equal to 1
and not 14 as well?!
it seems that your java code is not interpreted as such, and
the if condition is not added to the Java code ...
At a first glance it looks OK - did you take a look at the
generated Java source?
Andreas



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


Re: using pipeline matched parameters in XSP

2003-06-06 Thread Andreas Hartmann
Steven Noels wrote:

On 5/06/2003 19:20 Andreas Hartmann wrote:

I don't know if the util logicsheet works for this
kind of parameters, you could try it:
xsp-util:get-sitemap-parameter name=1 /

But I wouldn't recommend this solution, even if it works.
Why that? Just curious - since I added that tag.
Of course the get-sitemap-parameter tag itself is very useful.
But when using the wildcard number as parameter key, the XSP
depends on the match pattern - I could imagine that is hard
to debug for someone who changes the pattern without being
familiar with the XSP.
OK, maybe it's just my personal perference that I usually want
to see from outside which parameters are used by a component.
Sorry if you felt offended - it was not against your tag but
against its misuse :)
Andreas



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


Re: internal pipeline

2003-06-05 Thread Andreas Hartmann
Hi Ali,

Ali Mesbah wrote:

Hi all,
I have a problem and don't know if it is a bug in Cocoon or if I'm doing
something wrong. 

What I have is a pipeline which transforms an XML (source) file into an XSLT
(target) stylesheet:
map:match pattern=xms/test
  map:generate src=xms/resources/combined.xml/
  map:transform src=xms/styles/Meta_output.xsl/
  map:serialize type=xml/
/map:match
now I'd like to use the output as the source of another pipeline:

map:match pattern=view/*
  map:generate src=xms/resources/{1}.xml/
  map:transform src=cocoon:/xms/test/
  map:serialize type=html/
/map:match
I don't get any errors but the HTML output of the view pipeline is not the
expected (I have checked the output of the first pipeline and that is correct. I
assume it has something to do with the way I use cocoon:/... as the source of
the second transformer). Any ideas?
Your pipelines look OK (if I didn't miss anything). You're using
the cocoon: protocol correctly. I also tried this kind of stylesheet
generation (using XSP) and it worked very well. So I guess your
problem is somewhere in the last transformation step.
You can try to set the log level to DEBUG and look at the sitemap
log to see if the correct steps are executed.
The next debugging step could be to save the output of your first
pipeline as an XSLT file and to use this directly without the
cocoon: protocol.
HTH,
Andreas


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


Re: internal pipeline

2003-06-05 Thread Andreas Hartmann
Ali Mesbah wrote:

[...]

You can try to set the log level to DEBUG and look at the sitemap
log to see if the correct steps are executed.
No. There is a major difference between the log information when the xms/test
pipeline is called directly and when it is called by the second pipeline through
the Cocoon: protocol. 
I even added a LOG Transformer after the first pipeline; when using Cocoon:
protocol, this log file remains empty:
([setup]  [Thu Jun 05 11:59:01 CEST 2003] --)

while when called directly it is filled by all the right steps.
This is strange ...

The next debugging step could be to save the output of your first
pipeline as an XSLT file and to use this directly without the
cocoon: protocol.
Did that too. And indeed when I save the output of the first pipeline and use it
as a normal source for the second (view) pipeline it goes as wished. 

So I think my assumption was correct that it has to do with the use of the
Cocoon: protocol as the src of a transformer. Have you ever by the way used it in
this way too (Cocoon: as the src of XSLT (not XSP) via pipelines)? 
Yes, what I meant is that I used an XSP to generate XSLT that was used
in a transformation step, e.g., somethink like:
map:match pattern=my-xslt
  map:generate type=xsp src=xslt.xsp/
  map:serialize type=xml/
/map:match
map:match pattern=page
  map:generate src=page.xml/
  map:transform src=cocoon:/my-xslt/
  map:serialize/
/map:match
This worked perfectly, at least with Cocoon 2.1 M1
(I used it to prototype a transformer).
Sorry I can't help you, the only thing I could suggest is
to try it with 2.1-M1 or later if you're using 2.0.?.
Andreas



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


Re: commandline executes matching pipeline three times

2003-06-05 Thread Andreas Hartmann
Geert Van Damme wrote:

Hi,

I'm trying to run Cocoon from the command line, but it seems that the
matching pipeline for the requested URI is executed three times instead
of just one.
Look at the Cocoon Wiki
(http://wiki.cocoondev.org/Wiki.jsp?page=CommandLine):
snip
In order to follow links and rewrite URLs, Cocoon must generate pages 
multiple times:

* once to extract links from the page, using the links view
* once to check the mime type for URL rewriting
* once for getting page contents
/snip

Did anyone experience the same problem ?

I'm running Cocoon2.0.4 using a very simple example which does work
(meaning pipeline processed only once) when running Cocoon as a webapp.
Following match is executed three times in stand alone mode :

map:match pattern=test
  map:generate src=welcome/welcome.xhtml/
  map:serialize/
   /map:match
I'm running following ant task to run the program :

  java classname=org.apache.cocoon.Main fork=true
failonerror=true
arg value=-c./src/webapps/cocoon /
arg value=-C./src/webapps/cocoon/WEB-INF/cocoon.xconf
/
arg value=/test /
classpath refid=batch.classpath /
/java
The log contains following output three times (with more log output
inbetween):
   [java] REQUEST: /test

   [java] CONTEXT PATH: null
   [java] SERVLET PATH: /test
   [java] PATH INFO: null
   ...
   ...
   [java] METHOD: get
   [java] CONTENT LENGTH: -1
   [java] PROTOCOL: cli
   [java] SCHEME: cli
   [java] AUTH TYPE: null
   [java] CURRENT ACTIVE REQUESTS: 1
   [java] REQUEST PARAMETERS:
   [java] PARAM: 'accept' VALUES: '[text/html, */*]'
   [java] PARAM: 'user-agent' VALUES: '[Apache Cocoon 2.0.4]'
   [java] HEADER PARAMETERS:
   [java] SESSION ATTRIBUTES:

Is there anything I miss here ? Any options I need to set ?

Thanks,
Geert


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


Re: XSP debugging

2003-06-04 Thread Andreas Hartmann
morten svanæs wrote:

Hi,
I'm wondering if there's someway to get the correct linenumber from
a xsp stacktrace, when I get a error it's always on some very high number.
The number is correct. You get the line number of the generated
Java file (look in your tomcat/work directory to find the source).
Andreas



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


Re: map:redirecto-to after map:transform/map:generate?

2003-06-04 Thread Andreas Hartmann
Peter Klotz wrote:

So how can one read a file from the filesystem after a transformation?
You can write a transformer / serializer that reads a file and
generates the appropriate SAX events. I don't know if such a
component already exists.
And why does the redirect not work?
There are some threads in the lists about this issue.

Andreas



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


Re: map:redirecto-to after map:transform/map:generate?

2003-06-04 Thread Andreas Hartmann
Andreas Hartmann wrote:

Peter Klotz wrote:

So how can one read a file from the filesystem after a transformation?


You can write a transformer / serializer that reads a file and
generates the appropriate SAX events. I don't know if such a
component already exists.
Maybe you could use a stylesheet and the document function:

xsl:param name=source/

xsl:template match=/
  xsl:copy-of select=document($source)/*/
/xsl:template
I think that should work.

Andreas



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


Re: map:redirecto-to after map:transform/map:generate?

2003-06-04 Thread Andreas Hartmann
Geoff Howard wrote:

[...]

xsl:template match=/
  xsl:copy-of select=document($source)/*/
/xsl:template
I think that should work.
It may, but I'd not recommend it.
Agreed. I should have mentioned this :)

Andreas



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


Re: Using Path expression in Map Action type

2003-06-04 Thread Andreas Hartmann
Hi Shane,

Shane McEneaney wrote:

map:match pattern=get*
map:act type=locale/
map:act type=session-validator
  map:parameter name=descriptor
value=descriptors/crs-params.xml/
  map:act type={../1}
   ..
The code above fails and I have found no documentation to suggest if there
is a way of doing it.
this way it won't work. The sitemap is compiled to a Java
program (tomcat/work/.../sitemap_xmap.java). AFAIK the action
references are created at compile time.
But you could use the ParameterSelector to implement
such sitemap logic:
http://cocoon.apache.org/2.1/userdocs/selectors/parameter-selector.html
Of course, you will have to add a snippet for each possible
{../1} value. But I guess this won't be a problem as you have to
define your action types as well.
HTH,
Andreas


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


CLI problems (ComponentSelector, cocoon protocol)

2003-06-03 Thread Andreas Hartmann
Hi list,

I'm running the Main class of Cocoon 2.0.4 from an Ant buildfile
on Windows XP.
The following problems occur:

- The ComponentSelector does not find default components
  (could not find component for hint []). If I add type
  attributes to all component references in the sitemap,
  everything is fine.
- The cocoon: protocol does not work properly (I forgot the
  error message, but I can reproduce them if this helps).
- One page produces a broken link. The debug messages look
  OK (apart from the broken link one ...). The log files
  don't contain any exceptions, only success messages for
  all transformation steps.
In Tomcat, everything works fine.

Has anyone experienced similar problems?
Could it help to update to a newer snapshot?
Or should I try to use the batchfiles from the source
distribution instead of the Ant project?
Thanks in advance!
Andreas


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


Re: CLI problems (ComponentSelector, cocoon protocol)

2003-06-03 Thread Andreas Hartmann
Upayavira wrote:

I'd suggest trying the CLI from 2.1. It has much greater functionality.
OK, I could try that. But I guess it isn't possible to use the
Main class from 2.1 for a 2.0.4 site, is it?
And, when I've summoned up the guts to make my first commit, it'll handle broken 
links much better and be more configurable as to what you can do with a page once 
you've generated it.

If you're interested in this, let me know and I'll tell you when I've committed it. I'd 
appreciate some help testing it!
Actually, at the moment all I need is the functionality to generate
static pages, and I won't have the time to test additional features.
But I will follow the topic on the list - the CLI is a great feature!
Maybe the Forrest guys are interested in more flexibility? I heard
that they would like to move some functionality from Ant to Cocoon.
(FYI, I've certainly had the cocoon: protocol working on sites I've got).
OK, good to know :)

Thanks for your help!

Andreas


The following problems occur:

- The ComponentSelector does not find default components
  (could not find component for hint []). If I add type
  attributes to all component references in the sitemap,
  everything is fine.
- The cocoon: protocol does not work properly (I forgot the
  error message, but I can reproduce them if this helps).
- One page produces a broken link. The debug messages look
  OK (apart from the broken link one ...). The log files
  don't contain any exceptions, only success messages for
  all transformation steps.
In Tomcat, everything works fine.

Has anyone experienced similar problems?
Could it help to update to a newer snapshot?
Or should I try to use the batchfiles from the source
distribution instead of the Ant project?
Thanks in advance!
Andreas


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



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


Re: What DTD's do you use for a plain site?

2002-09-29 Thread Andreas Hartmann

Justin,

 What Doctypes are people using for general information to be displayed 
 at HTML?
 
 I'm doing a very simple site which will be mostly static HTML. The data 
 is basically intended for presentation only, so there isn't much of a 
 datatype I need to model, the only reason I'm going for cocoon is to 
 swap out look and feel easily.
 
 So far my experience with Cocoon has been with data I could come up with 
 a logical XML dialect for. But for presentation orientated data I find 
 myself just using html, which I know I shouldn't.
 
 Any suggestions? I'm about to check out DocBook, but is that maybe 
 overkill?

What about the Forrest documentation format?
You can find the DTD at
http://xml.apache.org/forrest/document-v11.dtdx.html

I'm using this doctype for the cocooncenter articles.
It is suited especially for technical documentation.

Andreas


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




I'm looking for a company working with Cocoon!

2002-09-10 Thread Andreas Hartmann


Hi Cocoon users,

I'm about to finish my degree in computer science and
want to start my career as a web application developer,
preferably in Germany, Austria, Switzerland or the U.S.

I got a first glance at Cocoon when I developed a prototype
of an intranet application for my current employer. Amazed
by the elegance of web publishing based on XML and Java,
I originated the website http://www.cocooncenter.org - maybe
some of you already visited it. It would be great if the task
of application development was combined with website
development, requirements engineering, and usability analyses.

If you're looking for an enthusiastic and Cocoon-experienced
co-worker or employee, I'd like to get in contact with you!

Greetings from Germany,
Andreas Hartmann

   www.cocooncenter.org
   Your Guide to Apache Cocoon



BEGIN:VCARD
VERSION:2.1
FN:Andreas Hartmann
EMAIL;INTERNET:[EMAIL PROTECTED]
TEL:0381 1289289
ADR;PREF:Grubenstr. 13 A;;;Rostock;Germany;18055;
ADR;WORK:;;Grubenstr. 13 A;Rostock;Germany;18055;
END:VCARD



-
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: I'm looking for a company working with Cocoon!

2002-09-10 Thread Andreas Hartmann


Hi Conrad,

How are you?  Congratulations on getting close to your CS degree.

By the way, I added your name to my Acknowledgements for the Cocoon 2
book and sent that to the publisher.  I said your web site was a source
of inspiration for some of examples.

Thanks! Sometimes I need such positive feedback, especially when there's
not much traffic in the cocooncenter forum :)

It still continues to be a very popular site with new users.

Unfortunately, I didn't have much time to work on the site the last
few months (I had to write my mastersthesis). But I will probably add
some new content soon.

I will keep an eye out for jobs in the US that use Cocoon and Java/XML
and forward it to your attention.

This would be great!

Greetings,
Andreas


Conrad

Original Message:
-
From: Andreas Hartmann [EMAIL PROTECTED]
Date: Tue, 10 Sep 2002 14:00:29 +0200
To: [EMAIL PROTECTED]
Subject: I'm looking for a company working with Cocoon!



Hi Cocoon users,

I'm about to finish my degree in computer science and
want to start my career as a web application developer,
preferably in Germany, Austria, Switzerland or the U.S.

I got a first glance at Cocoon when I developed a prototype
of an intranet application for my current employer. Amazed
by the elegance of web publishing based on XML and Java,
I originated the website http://www.cocooncenter.org - maybe
some of you already visited it. It would be great if the task
of application development was combined with website
development, requirements engineering, and usability analyses.

If you're looking for an enthusiastic and Cocoon-experienced
co-worker or employee, I'd like to get in contact with you!

Greetings from Germany,
Andreas Hartmann

   www.cocooncenter.org
   Your Guide to Apache Cocoon




mail2web - Check your email from the web at
http://mail2web.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: XSL question

2002-03-28 Thread Andreas Hartmann



*** REPLY SEPARATOR  ***

On 26.03.2002 at 15:47 Argyn Kuketayev wrote:

 As I've said
 before, you can use an action to get params from whereever
 you need then
 expose them to sitemap (using returning map in an action).
 Then you can
 simply set those params in your trasformer call:

 map:transform
  map:param name=yours value={1} /
 /map:transform

 --
 Konstantin Piroumian
 [EMAIL PROTECTED]

can you give a complete example of how to do that?

I have a similar issue, I need to pass parameters from the request into the
stylesheet.


Hi Argyn,

have a look at 
http://www.cocooncenter.org/cc/documents/resources/request-params/index.html.

Greetings,
Andreas

-
Please check that your question has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faqs.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/faqs.html

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




Re: Simple XSL problem, but NEED HELP!

2002-03-28 Thread Andreas Hartmann



Hi,

*** REPLY SEPARATOR  ***

On 28.03.2002 at 09:50 Hahn Kurt (CHA) wrote:

I really start losing it, I'm trying to do something very simple for
hours,
and it just wouldn't work. With an XML document like this:
page (root element)
 content
rowset
  row
loj_pt_odj /
obj_numero_gctext/obj_numero_gc
obj_soustypetext/obj_soustype
obj_concattitregc1text /obj_concattitregc1
obj_concattitregc2 /
/row
.../rowset
. /content


I'm trying to do some simple transformations. This:
xsl:template match=/
  listeAffaires
xsl:value-of select=//content/
 /listeAffaires
/xsl:template
gives me everything in the original document, and that's OK.

This is strange, it shouldn't return anything but the value of the content tag.

However, I
replace content with some other element, like
xsl:value-of select=//row/
it gives me just an empty tag, although, according to my XSL sources, the
operator // can be used to reference as many levels down in the hierarchy
as necessary. Can anybody help me out here?


At least in your example the row tag has no value, so it is
absolutely correct that nothing is returned. If you use xsl:value-of,
you will only get the value of the matched tag.

Greetings,
Andreas


-
Please check that your question has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faqs.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/faqs.html

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




Re: breadcrumb navigation

2002-03-25 Thread Andreas Hartmann

Hi Charles,

Hello List!
 Has anyone figured out a good way to generate breadcrumb navigation
links using XSL and Cocoon?  Like the ones at the top of Yahoo! pages. 
We plan on doing this and I don't want to reinvent the wheel.  I'd
rather not do it with sessions or cookies . . .

I included the breadcrumb stylesheet and the sitemap that I use for
cocooncenter.org. It's not documented, but maybe it helps.

Greetings,
Andreas




Charles




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

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




?xml version=1.0?

xsl:stylesheet
  xmlns:xsl=http://www.w3.org/1999/XSL/Transform; version='1.0'
  xmlns:xlink=http://www.w3.org/1999/xlink;

xsl:param name=base-path/
xsl:param name=document-root/
xsl:param name=uri/
  
xsl:template name=breadcrumb
  
!--  img src={$base-path}/images/breadcrumb-arrow.gif/#160;#160; --
  xsl:if test=$uri != 'home/index.html'
a href={$base-path}/documents/home/index.htmlHome/a
  /xsl:if
  xsl:call-template name=breadcrumb-section
xsl:with-param name=uri-before select='/'/
xsl:with-param name=uri-remaining select=$uri/
  /xsl:call-template
/xsl:template

xsl:template name=breadcrumb-section
  xsl:param name=title/
  xsl:param name=uri-before/!-- starting with / --
  xsl:param name=uri-remaining/ !-- not starting with / --
  
  xsl:variable name=uri-current select=substring-before($uri-remaining, '/')/
  xsl:variable name=uri-next select=substring-after($uri-remaining, '/')/
  
  xsl:variable name=document-uri select=concat(
$document-root,
$uri-before,
$uri-current, '/', 'index.xml'
  )/
  xsl:if test=$uri != 'home/index.html'
#160;img src={$base-path}/images/breadcrumb-arrow.gif/#160;
  /xsl:if

  xsl:choose
xsl:when test=contains($uri-next, '/')

  a href={$base-path}/documents{$uri-before}{$uri-current}/index.html
xsl:value-of select=document($document-uri)/document/header/title/
  /a
  xsl:call-template name=breadcrumb-section
xsl:with-param name=uri-before select=concat($uri-before, $uri-current, '/')/
xsl:with-param name=uri-remaining select=$uri-next/
  /xsl:call-template
  
/xsl:when

xsl:otherwise
  strong
xsl:value-of select=document($document-uri)/document/header/title/
  /strong
/xsl:otherwise

  /xsl:choose
  
/xsl:template

/xsl:stylesheet

?xml version=1.0?

xsl:stylesheet
  xmlns:xsl=http://www.w3.org/1999/XSL/Transform; version='1.0'
  xmlns:xlink=http://www.w3.org/1999/xlink;

xsl:param name=base-path/
xsl:param name=document-root/
xsl:param name=uri/
  
xsl:template name=breadcrumb
  
!--  img src={$base-path}/images/breadcrumb-arrow.gif/#160;#160; --
  xsl:if test=$uri != 'home/index.html'
a href={$base-path}/documents/home/index.htmlHome/a
  /xsl:if
  xsl:call-template name=breadcrumb-section
xsl:with-param name=uri-before select='/'/
xsl:with-param name=uri-remaining select=$uri/
  /xsl:call-template
/xsl:template

xsl:template name=breadcrumb-section
  xsl:param name=title/
  xsl:param name=uri-before/!-- starting with / --
  xsl:param name=uri-remaining/ !-- not starting with / --
  
  xsl:variable name=uri-current select=substring-before($uri-remaining, '/')/
  xsl:variable name=uri-next select=substring-after($uri-remaining, '/')/
  
  xsl:variable name=document-uri select=concat(
$document-root,
$uri-before,
$uri-current, '/', 'index.xml'
  )/
  xsl:if test=$uri != 'home/index.html'
#160;img src={$base-path}/images/breadcrumb-arrow.gif/#160;
  /xsl:if

  xsl:choose
xsl:when test=contains($uri-next, '/')

  a href={$base-path}/documents{$uri-before}{$uri-current}/index.html
xsl:value-of select=document($document-uri)/document/header/title/
  /a
  xsl:call-template name=breadcrumb-section
xsl:with-param name=uri-before select=concat($uri-before, $uri-current, '/')/
xsl:with-param name=uri-remaining select=$uri-next/
  /xsl:call-template
  
/xsl:when

xsl:otherwise
  strong
xsl:value-of select=document($document-uri)/document/header/title/
  /strong
/xsl:otherwise

  /xsl:choose
  
/xsl:template

/xsl:stylesheet

?xml version=1.0?

xsl:stylesheet
  xmlns:xsl=http://www.w3.org/1999/XSL/Transform; version='1.0'
  xmlns:xlink=http://www.w3.org/1999/xlink;

xsl:import href=mainmenu.xsl/
xsl:import href=breadcrumb.xsl/
xsl:import href=document.xsl/
xsl:import href=menu.xsl/
xsl:import href=comment.xsl/

xsl:param name=base-path/
xsl:param name=text/
  
xsl:template match=/
  html
head
  xsl:if test=document/header/title

Re: Help on sitemap

2002-03-14 Thread Andreas Hartmann
Title: Help on sitemap




Hi,
*** REPLY SEPARATOR 
***On 14.03.2002 at 14:10 ÂÞÃù/eNet/¼¼Êõ·þÎñÊÂÒµ²¿/ϵͳ²¿/×ܼà 
wrote:

  Hello All,  I hava a question for 
  sitemap  how 
  can i write a sitmap:  
  if i request http://site/test.xml  
  it will transform by default.xsl  
  if i request http://site/test.xml?sytle=test.xsl 
  it will transform by test.xsl 
Have a look athttp://www.cocooncenter.org/cc/documents/resources/request-params/requestselector.html,
I think this is exactly what you want.
Greetings,Andreas




Re: Help on sitemap

2002-03-14 Thread Andreas Hartmann

Hi Yury,


What about using a RequestParamAction?

Greetings,
Andreas

2Andreas:
My example just more for undestand of cocoons action's work. (May be :) )


OK, this can't be bad :)

Greetings,
Andreas


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

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




cocooncenter.de is now cocooncenter.org

2002-03-12 Thread Andreas Hartmann



Hi Cocoon users!

First, I want to thank you for the positive feedback and 
suggestions
that helped meto improve the cocooncenter site. Of 
course, special
thanks for the contributions!

I decided to "upgrade" to an international domain, looking 
forward
to see how the site will evolve during the next 
time.
Of course, cocooncenter.de will still be 
available.

Greetings,
Andreas



Re: cocooncenter.de is now cocooncenter.org

2002-03-12 Thread Andreas Hartmann



Hi Konstantin,

  
  Hi!
  
  I have a small tutorial on logicsheet creation. It consists 
  of 2 simple logicsheets and step-by-step instructions on how to create and 
  install them in C2. Feel free to place it on your site if you think it'll be 
  useful.
  
Thank you very much!
I just published the tutorial.

Greetings,
Andreas

  
  
  
  Regards,
   Konstantin Piroumian
  
- Original Message - 
From: 
Andreas 
Hartmann 
To: [EMAIL PROTECTED] 

Sent: Tuesday, March 12, 2002 3:09 
PM
Subject: cocooncenter.de is now 
cocooncenter.org

Hi Cocoon users!

First, I want to thank you for the positive feedback and 
suggestions
that helped meto improve the cocooncenter site. Of 
course, special
thanks for the contributions!

I decided to "upgrade" to an international domain, looking 
forward
to see how the site will evolve during the next 
time.
Of course, cocooncenter.de will still be 
available.

Greetings,
Andreas



RE: Some Design Help, please

2002-03-07 Thread Andreas Hartmann


Hi Sreedhar,


I am trying to fit bonebreaker into a new folder structure to learn some
site map fundas, and I am getting the following error:
   org.apache.cocoon.ResourceNotFoundException:
   No pipeline matched request: gvs//home/home.section

That might be a problem with your URI prefix.
Could you post a snippet from your main sitemap?

Greetings,
Andreas


The Bonebreaker application itself works perfectly. I wonder why it is
trying to find a match for gvs//home/home.section instead of
gvs/home/home.section? This is probably a frequently made newbie faux
paus
with a stock answer, perhaps?

Differences between Bonebreaker and MyApplication:

My directory Structure is quite different from that of Bonebreaker;
however,
I am using only the files that came with Bonebreaker, but relocated
according to my desired directory structure.

--
Bonebreaker Folder Structure

Bonebreaker
| css
|  | default.css
|
| documents
|  |   cc
|  |   home.xml
|
|  |   company
|  | home.xml
|
|  |   dh
|  |   home.xml
|
|  |   fr
|  |   home.xml
|
|  |   home
|  |   home.xml
|
|  |   links
|  |   home.xml
| stylesheets
   |   bike.xsl
   |   menu.xsl
   |   menupage.xsl
   |   page.xsl
   |   section.xsl

--

My Application Folder Structure

GVS
| content
| control
   | config
   | toc.xml

   | home
   | home.xml

| view
   | xsl
   | html
   | bike.xsl
   | menu.xsl
   | menupage.xsl
   | page.xsl
   | section.xsl

--

--
Pipeline in Bonebreaker Sitemap:

map:pipeline
   !-- == homepage ==  --
   map:match pattern=
   map:redirect-to session=false uri=bonebreaker/home/home.section/
   /map:match
   !-- == pages == --
   map:match pattern=*/*.**
   map:act type=request
   map:parameter name=parameters value=true/
   map:generate src=documents/{../1}/{../2}.xml{requestQuery}/
   map:transform type=xslt src=stylesheets/{../3}.xsl
   map:parameter name=section value={1}/
   map:parameter name=toc-file 
value=../documents/toc.xml/
   map:parameter name=base-url 
value=/cocoon/bonebreaker/
   /map:transform
   map:transform type=xslt src=stylesheets/menupage.xsl
   map:parameter name=section value={../1}/
   map:parameter name=request-url 
value={../2}.{../3}/
   map:parameter name=toc-file 
value=../documents/toc.xml/
   map:parameter name=css-stylesheet 
value=default.css/
   map:parameter name=base-url 
value=/cocoon/bonebreaker/
   /map:transform
   map:serialize/
   /map:act
   /map:match
   !-- == css stylesheets == --
   map:match pattern=*.css
   map:read src=css/{1}.css mime-type=text/css/
   /map:match
/map:pipeline
--

Pipeline in MyApplication Sitemap (All matchers look like the one for home
below, only with home replaced by something else):

map:pipeline
   !-- home/*.** --
   map:match pattern=home/*.**
   map:select type=request
   map:parameter name=parameters value=true/
   map:generate src=control/home/{../1}.xml{requestQuery}/
   !-- Setup Transformation #1 --
   map:transform type=xslt src=view/xsl/html/{../2}.xsl
   map:parameter name=section value=home/
   map:parameter name=toc-file 
value=/control/config/toc.xml/
   map:parameter name=base-url value=/cocoon/gvs/
   /map:transform

   !-- Setup Transformation #2 --
   map:transform type=xslt src=view/xsl/html/menupage.xsl
   map:parameter name=section value=home/
   map:parameter name=request-url 
value={../1}.{../2}/
   map:parameter name=toc-file 
value=/control/config/toc.xml/
   map:parameter name=css-stylesheet 
value=default.css/
   map:parameter name=base-url 

RE: Newbies: New Tutorial about Request Parameters

2002-02-27 Thread Andreas Hartmann
Title: Message


*** REPLY SEPARATOR ***On 26.02.2002 
at 15:35 Stephen Ng wrote:

  Andreas,
  
  This is great stuff!!! Thank 
  you!
  
  
Thanks! I'm currently writing 
alittle article about using DocBook,
because that was what I started 
with and it took me quite a lot of
time to get it 
work.

Furthermore, a FAQ about 
installation problems, error messages
etc. was planned, 
but I'm afraid this 
topictoo extensive andchanges too fast.
Maybe I'll start a 
FAQwith general questions from the mailing list.

Greetings,
Andreas


  
  
  Stephen 
Ng
  Lumigent
  

-Original Message-From: Andreas 
Hartmann [mailto:[EMAIL PROTECTED]] Sent: Friday, February 22, 
2002 1:05 PMTo: [EMAIL PROTECTED]Subject: 
Newbies: New Tutorial about Request Parameters
Hi Cocoon users,

Icreated a little tutorial on using request 
parameters.
You can find it at
http://www.cocooncenter.de/cc/documents/resources/request-params/index.html.

If anyonewants topublishother uses 
forrequest parameters
- or anything else - just contact me at [EMAIL PROTECTED] ..

Greetings,
Andreas



Re: Newbies: New Tutorial about Request Parameters

2002-02-27 Thread Andreas Hartmann

Bud,

*** REPLY SEPARATOR  ***

On 27.02.2002 at 12:27 Bud Gibson wrote:

Being a newbie, I would say the biggest single positive change you could
make would be to put a link to an easily searchable mail list archive on
the cocoon install page and again as the main link in the mailing lists
page.  The one that is featured now is a text archive.  Vadim Gritsenko
pointed me to this much better one.

http://marc.theaimsgroup.com/?l=xml-cocoon-users

I don't like this one because I don't like white text on dark background at
all. Nevertheless, it's a good archive.
BTW - I'm a little bit confused, which install page do you mean?
Are you talking about cocooncenter at all?
And what about the archive at Real Time? It's searchable too.



If cocoon were actually stable, a FAQ would be good, but might well be a
waste of time at  this point.

Yeah, I want to spend as much time as possible on long-lasting
articles.

I would continue the efforts to get a
bulletproof installation and use all of the irritating newbie questions
on the list to help me figure out where people go wrong the most
frequently. Fix the instructions to remove those problems. Now that
tomcat seems to have stabilised in the libraries it includes (minimal),
you won't have the rug pulled out from under you so frequently when they
change.

That is a good idea, but if I started to provide installation instructions,
I have to answer installation questions to stay credible. And, unfortunately,
I don't have the time to do that ... what about you? :)

Greetings,
Andreas


The books people keep mentioning are also probably a good idea.  Books
and much more developed working examples are keeping the struts project
moving forward at a nice pace.  I sense that cocoon is now about where
struts was 6 months to a year ago.

All in all, I would say that cocoon has advanced sufficiently since the
1.0 days that I am considering using it as a web platform for the second
half of a database course.

Bud

Andreas Hartmann wrote:


 *** REPLY SEPARATOR ***

 On 26.02.2002 at 15:35 Stephen Ng wrote:

 Andreas,



 This is great stuff!!! Thank you!





 Thanks! I'm currently writing a little article about using DocBook,

 because that was what I started with and it took me quite a lot of

 time to get it work.



 Furthermore, a FAQ about installation problems, error messages

 etc. was planned, but I'm afraid this topic too extensive and changes
 too fast.

 Maybe I'll start a FAQ with general questions from the mailing list.



 Greetings,

 Andreas







 Stephen Ng

 Lumigent

 -Original Message-
 *From:* Andreas Hartmann [mailto:[EMAIL PROTECTED]]
 *Sent:* Friday, February 22, 2002 1:05 PM
 *To:* [EMAIL PROTECTED]
 *Subject:* Newbies: New Tutorial about Request Parameters

 Hi Cocoon users,



 I created a little tutorial on using request parameters.

 You can find it at


http://www.cocooncenter.de/cc/documents/resources/request-params/index.html
  .



 If anyone wants to publish other uses for request parameters

 - or anything else - just contact me at [EMAIL PROTECTED]
 mailto:[EMAIL PROTECTED] ..



 Greetings,

 Andreas





-
Please check that your question has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faqs.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/faqs.html

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




Re: How To Mount My WebApp (powered by cocoon)

2002-02-26 Thread Andreas Hartmann


Hi Kevin,


*** REPLY SEPARATOR  ***

On 26.02.2002 at 10:24 [EMAIL PROTECTED] wrote:

Another note: I'm very new to cocoon.  I felt that I should just mount a
sub sitemap in the cocoon deployment (as you stated previously):

  map:match pattern=/bredex/**
map:mount uri-prefix=/bredex src=/bredex/
check-reload=yes/
  /map:match

And then deploy my webApp war file as context /bredex.  This didn't really
work out for me and I thought that I misconfigured C2.  Now that I think
about it, I didn't use Tomcat4's deployment manager so the problem may lie
there in that tomcat may not be able to find that deployed context


More detail:

deploy cocoon.war
deploy bredex.war (without cocoon resources inside)

bredex.war contains xsl/classes that generate xml (from xml-rpc) and I want
to use C2 framework for processing


I guess you use a XML-RPC servlet?
Then you could configure your bredex/web.xml to map requests to this servlet
and access the servlet URI with a ServerPagesGenerator from your Cocoon
subsitemap. That's the only way I could imagine how it works.

Or did you write your own generator for XML-RPC?

Greetings,
Andreas







Andreas

HartmannTo:
[EMAIL PROTECTED]

user@cocoonce   cc:

nter.de Subject: Re: How To Mount My
WebApp (powered by cocoon)


02/26/2002

09:56 AM

Please respond

to

cocoon-users










Hi Kevin,


Hello Andreas,  I don't think I communicated what I want to do very
effectively.

If I set a new Context in tomcat, that just sets up an alias/file mapping
(no knowlege of my classes, jars, and other resources)...I want to deploy
multiple application WAR files (without cocoon.war/jars inside) and deploy
one instance of cocoon(war) to support them all.

Could you explain this a little more in detail?
For instance, I use a news and a forum WebApp that I access from
Cocoon (something like map:generate src=/news/{1}) as XML sources.

Or do you want to mount subsitemaps in different directorys?
That's no problem at all, just look at the sitemap documentation.

Do I need to configure the dependency in web.xml?  Anyone have any
references they can point me to?  This is common right?

I must confess that I don't know exactly how this should work.
How do you want to use your resources in Cocoon? Not as XML sources?

Greetings,
Andreas








Andreas

HartmannTo:
[EMAIL PROTECTED]

t-rex@dinobas   cc:

e.deSubject: Re: How To Mount My
WebApp (powered by cocoon)


02/25/2002

04:06 PM

Please respond

to

cocoon-users










Two additions ...

*** REPLY SEPARATOR  ***

On 25.02.2002 at 22:47 Andreas Hartmann wrote:

*** REPLY SEPARATOR  ***

On 25.02.2002 at 15:20 [EMAIL PROTECTED] wrote:

Can someone point me to a document describing how to mount my own
WebApps
(powered by cocoon).  I want to deploy several, but not under the cocoon
heirarchy.


Just add a context entry to your tomcat/server.xml file:
It's located at (tomcat-path)/conf/server.xml.


!-- Intranet Context --
Context path=/intranet docBase=/intranet debug=0
 reloadable=true crossContext=true/


path=/intranet means: every URI starting with /intranet
(e.g., http://localhost:8080/intranet/index.html is mapped to the Intranet
WebApp.

docBase=/intranet points to the file system path.

Greetings,
Andreas


-
Please check that your question has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faqs.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/faqs.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/faqs.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/faqs.html

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

Newbies: New Tutorial about Request Parameters

2002-02-22 Thread Andreas Hartmann



Hi Cocoon users,

Icreated a little tutorial on using request 
parameters.
You can find it at
http://www.cocooncenter.de/cc/documents/resources/request-params/index.html.

If anyonewants topublishother uses 
forrequest parameters
- or anything else - just contact me at [EMAIL PROTECTED] .

Greetings,
Andreas



www.cocooncenter.de is online!

2002-02-17 Thread Andreas Hartmann



Hi cocoon users,

I finally created a little site around my 
tutorial.
Maybe you can take the time to have a look at www.cocooncenter.de.

I wouldbe pleased with any comments and 
suggestions
and will try to answer your questions in the discussion 
board.

Greetings,
Andreas



Re: HowTo Cocoon pages

2002-02-06 Thread Andreas Hartmann



Hi Michal,

*** REPLY SEPARATOR  ***

On 06.02.2002 at 15:42 DURDINA Michal wrote:

Hello Cocoon users,

I have just completed few tutorial pages along with examples about
developing applications in Cocoon2. The location is
http://durdo.miesto.sk/Cocoon2HowTo/index.html.


I also want to create a tutorial / information / discussion board site about cocoon.
Are you interested in joining this site? There is only one tutorial online yet:
http://www.cocooncenter.de/cocooncenter/tutorials/navigation/tutorial.html

You could use some webspace on www.cocooncenter.de (still redirecting to my other
site).

Do you publish your tutorial as plain HTML? (I found a br tag without a slash,
so it doesn't seem to be Cocoon :) ). My webspace features Perl, PHP and SSI
if you need it.

Greetings,
Andreas



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

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




My Cocoon Tutorial is Online!

2002-01-17 Thread Andreas Hartmann



Hi folks,

I'm about to create a website about Cocoon and started today 
with a little tutorial.
It is directed to newbies (actually, I'm a newbie too ...) and 
describes a possibility
to create a simple hierarchic site with a 
navigation menu.

The tutorial can be found at
http://www.cocooncenter.de/cocooncenter/tutorials/navigation/tutorial.html.

I would be verypleasedwith any comments, also 
regarding spelling and grammar.
The site will be extended soon (it even will get a real layout 
:-) ).
It will probably contain some more tutorials, tipsand a 
user forum.

If somebody wants to contribute to the site - just contact 
me!

Greetings,
Andreas



RE: How to call an external Servlet?

2002-01-14 Thread Andreas Hartmann


Hi Lukas,

thanks for your answer, but ... [see below]

*** REPLY SEPARATOR  ***

On 14.01.2002 at 11:59 lucas wrote:

just type the name of the external servlet in your sitemap pipeline,
adding
the parameters.
in example, if you want to call a servlet called 'outserv' and give it two
parameters, 'X' and 'Y', you can do something like this:

map:match pattern=outserv
 map:act type=request
 map:parameter name=parameters value=true/
 map:generate
src=http://www.something.com/outserv?X={X}amp;Y={Y}; /
/map:act
 map:serialize type=html/
/map:match


Here, you submit the parameters given to cocoon to the external servet with
the GET method. I dont't know how to do it directly with POST method, but

This is exactly my problem. With GET everything works fine,
but I couldn't find a way to pass parameters by POST.
I don't want to set the parameters in the sitemap, I want to forward
the parameters from an HTML form (it's a message board servlet).

this one works fine if GET method is available.
beware to use 'amp;' instead of ''



-Mensaje original-
De: Andreas Hartmann [mailto:[EMAIL PROTECTED]]
Enviado el: domingo, 13 de enero de 2002 18:37
Para: [EMAIL PROTECTED]
Asunto: How to call an external Servlet?


Hi folks,

I want to process the output of an external servlet through C2.
The servlet gets FORM-parameters via GET and POST.
How can I invoke the servlet?

Thanks in advance,
Andreas


-
Please check that your question has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faqs.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/faqs.html

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




RE: How to call an external Servlet?

2002-01-14 Thread Andreas Hartmann

Hi Aaron,

*** REPLY SEPARATOR  ***

On 14.01.2002 at 09:37 SANSONE, AARON M [Non-Pharmacia/1000] wrote:

Andreas,

Just a random thought but:

I believe that if you use the request-parameter action, you can actually
retrieve the query string as a sitemap parameter.  Then you could use that
string as your GET parameter set (which would forward all parameters that
were passed in).  Check the source code for
org.apache.cocoon.acting.RequestParamAction to see how it works.

That would be my next approach, if I didn't find any other answer.
But I had to change the servlet - so that it only implements doGet() - and
I wanted to avoid this, because future versions of the servlet shall run
without changes.

Thanks,
Andreas

 If your
issue is security around using the GET method, then I would suggest writing
a stylesheet that took the query string and placed it in a hidden formfield
then use javascript to automatically submit the form.  (An ugly hack...)


JavaScript is out of the question :)

HTH,

Aaron


Just a theory here, but you could write your own action to extract the
request query and


Could you give me some more info about this?
I already tried to do it with an action, without any success ...

-Original Message-
From: Andreas Hartmann [mailto:[EMAIL PROTECTED]]
Sent: Monday, January 14, 2002 7:22 AM
To: [EMAIL PROTECTED]
Subject: RE: How to call an external Servlet?



Hi Lukas,

thanks for your answer, but ... [see below]

*** REPLY SEPARATOR  ***

On 14.01.2002 at 11:59 lucas wrote:

just type the name of the external servlet in your sitemap pipeline,
adding
the parameters.
in example, if you want to call a servlet called 'outserv' and give it two
parameters, 'X' and 'Y', you can do something like this:

map:match pattern=outserv
 map:act type=request
 map:parameter name=parameters value=true/
 map:generate
src=http://www.something.com/outserv?X={X}amp;Y={Y}; /
/map:act
 map:serialize type=html/
/map:match


Here, you submit the parameters given to cocoon to the external servet
with
the GET method. I dont't know how to do it directly with POST method, but

This is exactly my problem. With GET everything works fine,
but I couldn't find a way to pass parameters by POST.
I don't want to set the parameters in the sitemap, I want to forward
the parameters from an HTML form (it's a message board servlet).

this one works fine if GET method is available.
beware to use 'amp;' instead of ''



-Mensaje original-
De: Andreas Hartmann [mailto:[EMAIL PROTECTED]]
Enviado el: domingo, 13 de enero de 2002 18:37
Para: [EMAIL PROTECTED]
Asunto: How to call an external Servlet?


Hi folks,

I want to process the output of an external servlet through C2.
The servlet gets FORM-parameters via GET and POST.
How can I invoke the servlet?

Thanks in advance,
Andreas


-
Please check that your question has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faqs.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/faqs.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/faqs.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/faqs.html

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




How to call an external Servlet?

2002-01-13 Thread Andreas Hartmann



Hi folks,

I want to process the output of an external servlet through 
C2.
The servlet gets FORM-parameters via GET and 
POST.
How can I invoke the servlet?

Thanks in advance,
Andreas



How to use RequestDispatcher?

2002-01-09 Thread Andreas Hartmann



Hi,

I want to process the output of a servlet through 
Cocoon.
Because I have to pass parameters with POST, I try to 
use
RequestDispatcher.include(request, response):

 xsp:logic { 
RequestDispatcher dispatcher = 
request.getRequestDispatcher("/myservletdir/myservlet"); 
dispatcher.include(request, response); return; 
} /xsp:logic
But I get the following Exception:
Method getRequestDispatcher(java.lang.String) not found in interface 
org.apache.cocoon.environment.Request

Is there an easy way to create an HttpServletRequest that I can use?
BTW, is this the correct approach at all?

Greetings and thanks in advance!
Andreas



Send Parameters to Generator with POST

2001-12-09 Thread Andreas Hartmann



Hi all,

I want to use a servlet (discussion forum) from another Tomcat 
context inside Cocoon 2.
The servlet produces XML data that shall be transformed inside 
Cocoon.
Hereis asnippet from my sitemap that passes parameters to the 
servletat theend ofthe URL:

 map:actions 
default="request"  map:action 
name="request" 
src="org.apache.cocoon.acting.RequestParamAction"/ 
/map:actions
...
 map:match 
pattern="forum/main/postMsg" map:act 
type="request" 
map:parameter name="parameters" 
value="true"/ map:generate 
src="http://cocoon:8080/forum/main/postMsg{requestQuery}"/ 
map:transform 
src="stylesheets/forum/xslt/menupage_postmsg.xsl"/ 
map:serialize/ 
/map:act /map:match 

This far everything is working fine. But the discussion forum 
alsocontains
forms that pass data using thePOST request method.
How can I pass these data to the servlet so that doPost() is called?

Thanks in advance,
Andreas



Re: Send Parameters to Generator with POST

2001-12-09 Thread Andreas Hartmann

Hi Bernhard,

thanks for your help, but I still have some trouble ...

If the forum servlet is in the same servlet engine:
I think you may try:
xsp, and use of RequstDispatcher.include(),
Pass in include() the original request

I tried to use something like:

javax.servlet.RequestDispatcher dispatcher =
  ((org.apache.cocoon.environment.http.HttpRequest) 
request).getRequestDispatcher(forum/main/postMsg);
dispatcher.include(request, response);

But this won't compile, because org.apache.cocoon.environment.http.HttpRequest
is does not implement javax.servlet.ServletRequest.
What can I do instead? Do I have to build my own javax.servlet.ServletRequest object?

BTW - is this the right approach to this problem?
How is the result of the response included in this XSP page?

, I don't know if the orginal
request still has the post info, may be you have
to create a new request. If you are using a Servlet 2.3 you may use
HttpServletRequestWrapper
Try reading the serlvet spec,
see componentents/jsp java source file how to use the include().

Which file do you mean?
I looked in cocoon.components.jsp.JSPEngineImpl, but didn't find anything ...

Bye,
Andreas


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

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




Send Parameters to Generator with POST

2001-12-07 Thread Andreas Hartmann



Hi all,

I want to use a servlet (discussion forum) from another Tomcat 
context inside Cocoon 2.
The servlet produces XML data that shall be transformed inside 
Cocoon.
Hereis asnippet from my sitemap that passes parameters to the 
servletat theend ofthe URL:

 map:actions 
default="request"  map:action 
name="request" 
src="org.apache.cocoon.acting.RequestParamAction"/ 
/map:actions
...
 map:match 
pattern="forum/main/postMsg" map:act 
type="request" 
map:parameter name="parameters" 
value="true"/ map:generate 
src="http://cocoon:8080/forum/main/postMsg{requestQuery}"/ 
map:transform 
src="stylesheets/forum/xslt/menupage_postmsg.xsl"/ 
map:serialize/ 
/map:act /map:match 

This far everything is working fine. But the discussion forum 
alsocontains
forms that pass data using thePOST request method.
How can I pass these data to the servlet so that doPost() is called?

Thanks in advance,
Andreas



RE: C2, DocBook - TransformerException in document()

2001-11-12 Thread Andreas Hartmann




Hi Erik,

On 12.11.2001 at 14:56 Erik Stunkat 
wrote:

  Hi
  
  what I 
  did:
  
  change the includes in 
  docbook.xsl to the same folder:
  
  xsl:include 
  href="../VERSION"/xsl:include 
  href="param.xsl"/xsl:include 
  href="lib.xsl"/xsl:include href="l10n.xsl"/xsl:include 
  href="common.xsl"/xsl:include 
  href="labels.xsl"/xsl:include 
  href="titles.xsl"/xsl:include 
  href="subtitles.xsl"/xsl:include 
  href="gentext.xsl"/xsl:include 
  href="autotoc.xsl"/
  
  and copy the files into the 
  same folder. Works fine.
  
  erik 
  stunkat
Thanks - but 
I'm sorry, it didn't solve my problem ...

Greetings,
Andreas

  

-Original Message-From: Andreas Hartmann 
[mailto:[EMAIL PROTECTED]]Sent: Monday, November 12, 2001 2:41 
PMTo: [EMAIL PROTECTED]Subject: C2, DocBook 
- TransformerException in document()
Hi Cocoon-Community!

I use
- Cocoon2
- DocBook 4.1.2
- Norm Walsh's XSL Stylesheets 1.46 (CVS Version from 
2001-11-11)

When I try to transform a simple article, I get the 
following message:

Error in TraxTransformer: file://intranet3/stylesheets/docbook-xsl-1.46-cvs/html/../common/l10n.xsl; 
Line 79; Column 15; ; SystemID: file://intranet3/stylesheets/docbook-xsl-1.46-cvs/html/../common/l10n.xsl; 
Line#: 79; Column#: 15javax.xml.transform.TransformerException: Can not 
load requested doc: intranet3at 
org.apache.xalan.templates.FuncDocument.warn(FuncDocument.java:462)
[...]

/intranet3 is my Cocoon base directory.
The errorseems to occurwhenthe stylesheettries 
to receive the current XSL document with document():

[l19n.xsl line 19] xsl:param name="l10n.xml" 
select="document('../common/l10n.xml')"/[l19n.xsl line 79] 
xsl:choose[l19n.xsl line 80] xsl:when 
test="$l10n.xml/l:i18n/l:l10n[@language=$adjusted.language]"
Here's my sitemap:

[snip]
 map:match 
pattern="projekte/intranet.html" 
map:generate 
src="documents/projects/intranet/intranet.xml"/ 
map:transform type="xslt" 
src="stylesheets/documents/docbook-import.xsl"/ 
map:serialize/ 
/map:match
[/snip]

I use docbook-import.xsl to import docbook.xsl:

xsl:import href="file:///intranet3/stylesheets/docbook-xsl-1.46-cvs/html/docbook.xsl"/

Can anyone help me?

Thanks in advance!

Greetings,
Andreas



RE: C2, DocBook - TransformerException in document()

2001-11-12 Thread Andreas Hartmann


On 12.11.2001 at 15:29 Andreas Hartmann wrote:

  
  Hi Erik,
  
  On 12.11.2001 at 14:56 Erik Stunkat 
  wrote:
  
Hi

what I 
did:

change the includes in 
docbook.xsl to the same folder:

xsl:include 
href="../VERSION"/xsl:include 
href="param.xsl"/xsl:include 
href="lib.xsl"/xsl:include 
href="l10n.xsl"/xsl:include 
href="common.xsl"/xsl:include 
href="labels.xsl"/xsl:include 
href="titles.xsl"/xsl:include 
href="subtitles.xsl"/xsl:include 
href="gentext.xsl"/xsl:include 
href="autotoc.xsl"/

and copy the files into the 
same folder. Works fine.

erik 
stunkat
  Thanks - 
  but I'm sorry, it didn't solve my problem ...
  
  Greetings,
  Andreas
  
  
OK, downloading C2RC2 solved the 
problem.
I was using C2B2 before.

But the CVS Version of Norman's XSL 
Stylesheets is a little buggy,
so I had to do some little 
hacks.

Greetings,
Andreas


  

  
  -Original Message-From: Andreas Hartmann 
  [mailto:[EMAIL PROTECTED]]Sent: Monday, November 12, 2001 2:41 
  PMTo: [EMAIL PROTECTED]Subject: C2, 
  DocBook - TransformerException in document()
  Hi Cocoon-Community!
  
  I use
  - Cocoon2
  - DocBook 4.1.2
  - Norm Walsh's XSL Stylesheets 1.46 (CVS Version from 
  2001-11-11)
  
  When I try to transform a simple article, I get the 
  following message:
  
  Error in TraxTransformer: file://intranet3/stylesheets/docbook-xsl-1.46-cvs/html/../common/l10n.xsl; 
  Line 79; Column 15; ; SystemID: file://intranet3/stylesheets/docbook-xsl-1.46-cvs/html/../common/l10n.xsl; 
  Line#: 79; Column#: 15javax.xml.transform.TransformerException: Can 
  not load requested doc: intranet3at 
  org.apache.xalan.templates.FuncDocument.warn(FuncDocument.java:462)
  [...]
  
  /intranet3 is my Cocoon base directory.
  The errorseems to occurwhenthe 
  stylesheettries to receive the current XSL document with 
  document():
  
  [l19n.xsl line 19] xsl:param name="l10n.xml" 
  select="document('../common/l10n.xml')"/[l19n.xsl line 79] 
  xsl:choose[l19n.xsl line 80] xsl:when 
  test="$l10n.xml/l:i18n/l:l10n[@language=$adjusted.language]"
  Here's my sitemap:
  
  [snip]
   map:match 
  pattern="projekte/intranet.html" 
  map:generate 
  src="documents/projects/intranet/intranet.xml"/ 
  map:transform type="xslt" 
  src="stylesheets/documents/docbook-import.xsl"/ 
  map:serialize/ 
  /map:match
  [/snip]
  
  I use docbook-import.xsl to import docbook.xsl:
  
  xsl:import href="file:///intranet3/stylesheets/docbook-xsl-1.46-cvs/html/docbook.xsl"/
  
  Can anyone help me?
  
  Thanks in advance!
  
  Greetings,
  Andreas