Implementing FileExistSelector

2001-08-09 Thread Michael Homeijer

In a part of the sitemap I want to check if a requested file exists,
if it doesn't i want to return the contents of a default file.

Is this the way I should implement something like that
or are the easier methods? :

map:match pattern=annotation\*
  map:select type=fileexists
 map:parameter name=filename value=annotation\{1}/

 map:when test=fileexists
  map:generate src=annotation\{1}/
 /map:when
 map:otherwise
 map:generate src=annotation\default.xml/
  /map:otherwise
  /map:select
  map:transform src=annotation.xsl/
/map:match

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




HTTP request parameter

2001-08-09 Thread annemarie . hartvigsen

Hi,

what is required to get the http request parameter to work? I have

[...]
xsp:page language=java
  xmlns:xsp=http://www.apache.org/1999/XSP/Core;
  xmlns:esql=http://apache.org/cocoon/SQL/v2;
  xmlns:request=http://www.apache.org/1999/XSP/Request;  ---HERE

[...]

esql:query
  select name as reg_name,
 deviceID as reg_deviceID,
 description as reg_description,
 startTime as reg_startTime,
 endTime as reg_endTime
  from user, terminal, deviceType, registration
  where terminal.userID = request:get-parameter name=userID/
---HERE
and user.userID = terminal.userID
and deviceType.deviceType = terminal.deviceType
and registration.terminalID = terminal.terminalID;
/esql:query
[...]

As far as I have understood, I can then put 

?userID=123456 

at the end of the url, e.g. 
-
http://localhost/welcome.xml?userID=123456

and 123456 will be used. But it's not working, so I guess I'll have to add
something somewhere? I don't get any error messages, but I don't get any
data from the query either. The query works when I use

---
!ENTITY userID 123456 //(in the DTD)

[...]

and terminal.userID = userID; //(in the query)
---

I'm using Cocoon 1.8.2

/Anne Marie




-Original Message-
From: JEULIN Olivier [mailto:[EMAIL PROTECTED]]
Sent: 31. juli 2001 13:26
To: '[EMAIL PROTECTED]'
Subject: RE: Connecting database and XML pages


[...]

  esql:query
select b.ref as ref b.quantite as nb
from basket b
where b.id = request:get-parameter name=fragResultID/
!-- using a HTTP req. param. --
  /esql:query


[more ...]

-
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: SV: SV: Cocoon2 with OrionServer

2001-08-09 Thread java guru

HI Thanx for reply.,
  The problem with removing crimson jar from orion is
that orion is complaining at startup 'coz it need
parser to do its specific xml stuffand it needs
crimson..

anyone with success?

 --- Tomas Andersson [EMAIL PROTECTED]
wrote:  I still have crimson.jar in my orion folder
and
 Cocoon works fine, but
 my collegue with the same version of orion and
 cocoon had to remove
 crimson.
 
 
 -Ursprungligt meddelande-
 Från: java guru [mailto:[EMAIL PROTECTED]]
 Skickat: Wednesday, August 08, 2001 6:57 PM
 Till: [EMAIL PROTECTED]
 Ämne: Re: SV: Cocoon2 with OrionServer
 
 
 Hi.,
   I am preparing a doc on orion/cocoon setup..i
 tried
 ur procedure but still the cocoon endup with error
 'coz the parser is picked up from crimson.jar even
 the
 classpath is changed in manifest..
 
 Anyidea?
 
 
 thanx
  --- Tomas Andersson [EMAIL PROTECTED]
 wrote:  I have 2.0beta1 running on Orion 1.5.2,
 with
 the
  cocoon.war included in
  a .ear file.
  
  First you have to change the xerces and xalan
 files
  which are located in
  the %ORION_ROOT%
  Copy the xerces-x-x-x and xalan-x-x-x files from
  cocoon distribution,
  into %ORION_ROOT% and rename them to just
 xerces.jar
  and xalan.jar.
  
  Update manifest.mf in the orion.jar, change the
  classpath so that xalan
  and xerces is first in line:
  
  Manifest-Version: 1.0
  Main-Class: com.evermind.server.ApplicationServer
  Name: Orion Application Server
  Created-By: 1.2 (Sun Microsystems Inc.)
  Implementation-Vendor: Evermind
  Class-Path: xalan.jar xerces.jar ejb.jar jndi.jar
  jdbc.jar
  jta.jar jaxp.jar crimson.jar saxon.jar tools.jar
  jsse.jar jnet.jar
  jcert.jar 
  activation.jar mail.jar jaas.jar
  Implementation-Version: 1.0.0
  Implementation-Title: com.evermind.server
  
  Name: javax/servlet/
  Specification-Version: 2.3
  Implementation-Title: javax.servlet
  
  Name: javax/servlet/jsp/
  Specification-Version: 1.1
  Implementation-Title: javax.servlet.jsp
  
  Add a application.xml into META-INF folder in the
  .ear file.
  
  My server.xml looks like this:
  
  application name=Cocoon
  path=d:\MyDeploys\cocoon.ear/
  
  and my default-web-site looks like this:
  
   web-app application=Cocoon name=cocoon
  root=/cps /
  
  In case that I did remember everything you should
 be
  able to reach the
  cocoon at url
  
  http://localhost:port/cps/
  
  if using cps as context root.
  
  Good luck!
  
  /Tomas
  
  
  -Ursprungligt meddelande-
  Från: Berin Loritsch [mailto:[EMAIL PROTECTED]]
  Skickat: Wednesday, August 08, 2001 3:21 PM
  Till: [EMAIL PROTECTED]
  Ämne: Re: Cocoon2 with OrionServer
  
  
  Rajkumar, Joseph wrote:
   Hi Folks
   
   I would like to know if anybody is using
  Cocoon2
   with the OrionServer ( see
  http://www.orionserver.com ).
   I have had OrionServer working with
 Cocoon-1.8.2,
  but have
   not yet tried using Cocoon2.
  
  I've got someone working on that.  You should be
  able to do it
  anyway.
  
  
 

-
  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]
   
 
 =
 Thanks and have great day
 srini
 


 Do You Yahoo!?
 For regular News updates go to
 http://in.news.yahoo.com
 

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

=
Thanks and have great day
srini


Do You Yahoo!?
Send a newsletter, share photos  files, conduct polls, organize chat events. Visit 
http://in.groups.yahoo.com.

-
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 

[C2] JVM memory usage is growing and growing util OutOfMemory-Exception

2001-08-09 Thread C. Gaffga

Hi!

Im using Tomcat4.b5, JDK1.3.1 and Cocoon2.b2

The memory usage of the VM, cocoon is running on, is growing an growing with
each request. Aprox. 200K more by each request. This is going on until a
OutOfMemory-Eception occures and the VM is using about 500 to 600 MB of
memory.
During generating my XSP pages, i store large Objects in the
request-Atrributes to mak them available to other parts in the aggregate,
because the need so much time to calculate.

Is it possible that these objects are not released after the request had
been processed completly? How can I check, witch object allocate how mutch
of memory?

Thanks in advance.

Christoph Gaffga
[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: Implementing FileExistSelector

2001-08-09 Thread Giacomo Pati

Quoting Michael Homeijer [EMAIL PROTECTED]:

 In a part of the sitemap I want to check if a requested file exists,
 if it doesn't i want to return the contents of a default file.
 
 Is this the way I should implement something like that
 or are the easier methods? :
 
 map:match pattern=annotation\*
   map:select type=fileexists
  map:parameter name=filename value=annotation\{1}/
 
  map:when test=fileexists
   map:generate src=annotation\{1}/
  /map:when
  map:otherwise
  map:generate src=annotation\default.xml/
   /map:otherwise
   /map:select
   map:transform src=annotation.xsl/
 /map:match

This might be one approach. Another one could be with an Action like this:

  map:match pattern=annotation/*
map:act type=fileexists src=annotation/{1}
  map:parameter name=default value=annotation/default.xml/
 
  map:generate src={the-file}/
/map:act
map:transform src=annotation.xsl/
  /map:match

the mentioned Action will check for the file and return a Map containing 
the-file as the key and the filename as its value depending on the existance 
test (either the value of the source attribute or of the parameter default).

Giacomo

 
 -
 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: SV: SV: Cocoon2 with OrionServer

2001-08-09 Thread Marcelo F. Ochoa

java guru wrote:

 HI Thanx for reply.,
   The problem with removing crimson jar from orion is
 that orion is complaining at startup 'coz it need
 parser to do its specific xml stuffand it needs
 crimson..
 
 anyone with success?
 

   I don't know which version of Orion web server distributs Oracle, 
i'll check, but here its my summary list for working with OC4J and Cocoon 2.
   - Removes jaxp.jar, crimsom.jar and parser.jar from ORION_HOME.
   - Replaces xerces.jar and xalan.jar with the version of Cocoon2, 
renaming xerces.jar of orion distribution as xerces.jar.bak and copying 
Cocoon2's xerces_1_4_1.jar as ORION_HOME/xerces.jar for example.
   - Copy other libs from COCOON_HOME/lib to ORION_HOME/lib directory.
   - Copy cocoon.jar to ORION_HOME/lib or add this jar into the 
application directory WEB-INF/lib.
   - Makes .war and .ear files and copy .ear file to 
ORION_HOME/applications directory.
   - Edit ORION_HOME/config/server.xml and 
ORION_HOME/config/default-web-site.xml files.
   And thats, all.
   Best regards, Marcelo.

-- 
Marcelo F. Ochoa - [EMAIL PROTECTED]
Do you Know DB Prism? Look @ http://www.plenix.com/dbprism/
More info?
Chapter 21 of the book Professional XML Databases (Wrox Press 
http://www.wrox.com/)
Chapter 8 of the book Oracle  Open Source (O'Reilly 
http://www.oreilly.com/catalog/oracleopen/)
---
Lab. de Sistemas - Fac. de Cs. Exactas - UNICEN
Paraje Arroyo Seco - Campus Universitario
(7000) Tandil - Bs. AS. - Argentina
Te: +54-2293-30 Fax: +54-2293-31


-
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: SV: SV: Cocoon2 with OrionServer

2001-08-09 Thread java guru

Hi.,
  I am not sure if you are outlining procedure to use
c1 with orion..i am talking about using c2 with orion
1.5.2

Thanx anyway

 --- Marcelo F. Ochoa [EMAIL PROTECTED] wrote: 
java guru wrote:
 
  HI Thanx for reply.,
The problem with removing crimson jar from orion
 is
  that orion is complaining at startup 'coz it need
  parser to do its specific xml stuffand it
 needs
  crimson..
  
  anyone with success?
  
 
I don't know which version of Orion web server
 distributs Oracle, 
 i'll check, but here its my summary list for working
 with OC4J and Cocoon 2.
- Removes jaxp.jar, crimsom.jar and parser.jar
 from ORION_HOME.
- Replaces xerces.jar and xalan.jar with the
 version of Cocoon2, 
 renaming xerces.jar of orion distribution as
 xerces.jar.bak and copying 
 Cocoon2's xerces_1_4_1.jar as ORION_HOME/xerces.jar
 for example.
- Copy other libs from COCOON_HOME/lib to
 ORION_HOME/lib directory.
- Copy cocoon.jar to ORION_HOME/lib or add this
 jar into the 
 application directory WEB-INF/lib.
- Makes .war and .ear files and copy .ear file to
 
 ORION_HOME/applications directory.
- Edit ORION_HOME/config/server.xml and 
 ORION_HOME/config/default-web-site.xml files.
And thats, all.
Best regards, Marcelo.
 
 -- 
 Marcelo F. Ochoa - [EMAIL PROTECTED]
 Do you Know DB Prism? Look @
 http://www.plenix.com/dbprism/
 More info?
 Chapter 21 of the book Professional XML Databases
 (Wrox Press 
 http://www.wrox.com/)
 Chapter 8 of the book Oracle  Open Source
 (O'Reilly 
 http://www.oreilly.com/catalog/oracleopen/)
 ---
 Lab. de Sistemas - Fac. de Cs. Exactas - UNICEN
 Paraje Arroyo Seco - Campus Universitario
 (7000) Tandil - Bs. AS. - Argentina
 Te: +54-2293-30 Fax: +54-2293-31
 
 

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

=
Thanks and have great day
srini


Do You Yahoo!?
Send a newsletter, share photos  files, conduct polls, organize chat events. Visit 
http://in.groups.yahoo.com.

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




esql logicsheet, insert, update and delete, examples

2001-08-09 Thread annemarie . hartvigsen

Hi,

does anybody have any examples where you insert, update and delete records
in databases, using xsp and esql logicsheet?

/AM

-
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: SV: SV: Cocoon2 with OrionServer

2001-08-09 Thread Marcelo F. Ochoa

java guru wrote:

 Hi.,
   I am not sure if you are outlining procedure to use
 c1 with orion..i am talking about using c2 with orion
 1.5.2
 
 Thanx anyway
  Me too, I am using Cocoon 2b1 and Orion Oracle 9iAS 1.0.2.2 Container for J2EE.

   Best regards, Marcelo.

-- 
Marcelo F. Ochoa - [EMAIL PROTECTED]
Do you Know DB Prism? Look @ http://www.plenix.com/dbprism/
More info?
Chapter 21 of the book Professional XML Databases (Wrox Press 
http://www.wrox.com/)
Chapter 8 of the book Oracle  Open Source (O'Reilly 
http://www.oreilly.com/catalog/oracleopen/)
---
Lab. de Sistemas - Fac. de Cs. Exactas - UNICEN
Paraje Arroyo Seco - Campus Universitario
(7000) Tandil - Bs. AS. - Argentina
Te: +54-2293-30 Fax: +54-2293-31


-
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: HTTP request parameter

2001-08-09 Thread Christian Haul

On 09.Aug.2001 -- 01:17 PM, [EMAIL PROTECTED] wrote:
 Hi,
 
 what is required to get the http request parameter to work? I have
 [...]
 xsp:page language=java
   xmlns:xsp=http://www.apache.org/1999/XSP/Core;
   xmlns:esql=http://apache.org/cocoon/SQL/v2;
   xmlns:request=http://www.apache.org/1999/XSP/Request;  ---HERE
 

 I'm using Cocoon 1.8.2

I'm not familiar with C1 but the above looks a lot like C2 syntax. In
C1 you need AFAIK processing instructions to apply taglibs. Should be
in the examples  xsp docs.

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/faqs.html

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




Re: How to access attribute in Java?

2001-08-09 Thread Christian Haul

On 09.Aug.2001 -- 02:57 PM, Martin Benda wrote:
 Is it possible to access the value of an attribute inside of xsp:logic to
 use
 it in the Java Code?
 
 For example
 
 xsl:template match=timer-util:verify-user
 xsp:logic
 String driver = xsp:contentxsl:value-of
 select=@driver//xsp:content
 ...
 /xsp:logic
 /xsl:template
 
 When I look inside the code cocoon produces I find the following...
 
 ...
 String driver = this.characters(oracle.jdbc.driver.OracleDriver);
 ...
 
 ... and of course this won't work, but is there any workaround?

The use of the xsp:content/ tags as signals that the following is to
be outputted to the processing pipeline, what is obviously wrong
here. Just replace xsp:content/ with quotes.

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/faqs.html

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




RE: esql logicsheet, insert, update and delete, examples

2001-08-09 Thread JEULIN Olivier

I'll send you an example in a few minutes (I'm not sure the rest of the
mailing list would be interested)

 does anybody have any examples where you insert, update and 
 delete records
 in databases, using xsp and esql logicsheet?

-
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: esql logicsheet, insert, update and delete, examples

2001-08-09 Thread Hubert NEOtyk Iwaniuk


- Original Message - 
From: JEULIN Olivier [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, August 09, 2001 3:43 PM
Subject: RE: esql logicsheet, insert, update and delete, examples


 I'll send you an example in a few minutes (I'm not sure the rest of the
 mailing list would be interested)

I would

 
  does anybody have any examples where you insert, update and 
  delete records
  in databases, using xsp and esql logicsheet?
 
 -
 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]
 
 


---
Ausgehende Mail ist zertifiziert virenfrei.
Uberpruft durch AVG Antivirus System (http://www.grisoft.com/de).
Version: 6.0.265 / Virendatenbank: 137 - Erstellungsdatum: 2001-07-18


-
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: esql logicsheet, insert, update and delete, examples

2001-08-09 Thread JEULIN Olivier

  I'll send you an example in a few minutes (I'm not sure the 
 rest of the
  mailing list would be interested)
 
 I would

OK, then:
this an old file I made to test something in the xml fragment I read from
the DB, and I've changed a few things between the working version and this
one.
It's a kind of draft, so don't take it too seriously
Anyway, the queries were OK when I first tested this file, and that's what
you're looking for.

Olivier


?xml version=1.0 encoding=iso-8859-1?
?cocoon-process type=xinclude?
?cocoon-process type=xsp?
?xml-logicsheet href=xsp/fragmentation-xsp.xsl/?
?cocoon-process type=xslt?
?xml-stylesheet href=xsl/page.xsl type=text/xsl?
xsp:page
xmlns:xsp=http://www.apache.org/1999/XSP/Core;
xmlns:auth=http://ulim.cocoonhost.com/auth;
xmlns:request=http://www.apache.org/1999/XSP/Request;
xmlns:session=http://www.apache.org/1999/XSP/Session;
xmlns:foo=http://localhost/foo;
xmlns:common=http://localhost/common;
xmlns:fragmentation=http://localhost/fragmentation;
xmlns:esql=http://apache.org/cocoon/SQL/v2;
xmlns:util=http://www.apache.org/1999/XSP/Util;
xmlns:xinclude=http://www.w3.org/1999/XML/xinclude;

xsp:structure
xsp:includelocalhost.basket.Basket/xsp:include
/xsp:structure

xsp:logic 
public Basket basket;
/xsp:logic

foo:page
include xinclude:parse=xml
xinclude:href=authentication-header.xml /

xsp:attribute name=xml:langsession:get-attribute
name='lang' //xsp:attribute
xsp:attribute
name=foo:descriptionxsp:expr(Boolean)session:get-attribute
name='description' //xsp:expr/xsp:attribute
xsp:attribute
name=foo:promotionxsp:expr(Boolean)session:get-attribute
name='promotion' //xsp:expr/xsp:attribute

foo:frag-page


xsp:logic
if (request:get-parameter name=fragID/ != null)
{   
if (request:get-parameter name=quantity/
!= null ![CDATA[]]
request:get-parameter
name=product/ != null ![CDATA[]]
request:get-parameter
name=price/ != null ![CDATA[]]
request:get-parameter
name=promo/ != null ) {
try {
if
(Integer.parseInt((String)request:get-parameter name=quantity/)  0) {
// nouvelle commande de ce
produit
if
(session:get-attribute name=basket/ == null) {
basket = new
Basket(5);
} else {
basket =
(Basket)session:get-attribute name=basket/;
}

float promo;
try {
promo =
Float.parseFloat((String)request:get-parameter name=promo/);
} catch
(NumberFormatException exc) {
promo =
Float.parseFloat((String)request:get-parameter name=price/);
}
basket.addProduct(

Integer.parseInt((String)request:get-parameter name=fragID/),

(String)request:get-parameter name=product/,

Integer.parseInt((String)request:get-parameter name=quantity/),

Float.parseFloat((String)request:get-parameter name=price/),
promo
);

session:set-attribute
name='basket'xsp:exprbasket/xsp:expr/session:set-attribute;
!--
esql:connection

esql:poolfoo/esql:pool

esql:execute-query

esql:query

replace into basket

(user,idtitle, reference, quantity)

values ('session:get-attribute name=user /',

xsp:exprInteger.parseInt((String)request:get-parameter
name=fragID/)/xsp:expr,

'request:get-parameter name=product/',

request:get-parameter name=quantity/)

/esql:query

/esql:execute-query
/esql:connection
--
} else {
// supprime la commande de
ce produit
!--
 

Re: esql and UnsupportedEncodingException - patch proposal

2001-08-09 Thread Arnaud Bienvenu

I applied your patch instead of mine; it is smarter and does the job. Would
some Cocoon Guru apply it to CVS ? What is the procedure to ask for it ?
Don't you like it ?

Here is Michael's patch again (using cocoon's coding style) :

Index: ./src/org/apache/cocoon/components/language/markup/xsp/java/esql.xsl
===
RCS file: 
/home/cvspublic/xml-cocoon2/src/org/apache/cocoon/components/language/markup/xsp/java/esql.xsl,v
retrieving revision 1.16
diff -u -r1.16 esql.xsl
--- ./src/org/apache/cocoon/components/language/markup/xsp/java/esql.xsl
2001/08/06 15:38:57 1.16
+++ ./src/org/apache/cocoon/components/language/markup/xsp/java/esql.xsl
+2001/08/09 15:26:48
@@ -636,6 +636,8 @@
   /xsl:otherwise
 /xsl:choose
   } catch (Exception _esql_exception_xsl:value-of select=generate-id(.)/_2) {}
+} catch(java.io.UnsupportedEncodingException e) {
+  throw new RuntimeException(e.toString());
 }
 if (_esql_queries.empty()) {
   _esql_query = null;


-- 
Arnaud Bienvenu
http://www.generasound.com/

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




C2: Connection Pool

2001-08-09 Thread Martin Benda

How to access the connection pool out of java? When I try to
access my connection pool with the help of esql it works fine, but
when I try to access the pool out of java I always get an exception.

xsp:logic
  private DataSourceComponent datasource;

  public void compose(ComponentManager manager) {
   ComponentSelector selector =
(ComponentSelector)manager.lookup(Roles.DB_CONNECTION);
   this.datasource =
(DataSourceComponent)selector.select([DBpoolName]);
  }

  Connection con;

  try {
con = datasource.getConnection();
  ...
/xsp:logic

I try to access the connection poll like discribed on the website of C2, but
I always get an
expception
org.apache.cocoon.components.language.LanguageException: Error compiling
login_xsp:
Line 192, column 35:  '}' expected.
Line 194, column 4:  Statement expected.
Line 206, column 4:  Type expected.

How can I access the pool the right way?

I am using Cocoon2b2 and tomcat 3.2.3

thanks,
Martin


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




newbie question: (XML-XSLT) cached - session logic - browser??

2001-08-09 Thread Karl Oie

Hi, im pretty new to cocoon2 so i need some advice about the best aproach
for my problem;

I got a quite large XML file which i use a XSL stylesheet to extract only
parts of, but the XML file might change so i set this up as the generator.

map:match pattern=toc.html
map:generate src=largefile.xml/
map:transform src=toc.xsl/

... perform logic on the result based on sessions ...

map:serialize type=html/
/map:match

Then based on the the user's session state i want to perform logic on the
extract, to hide and show elements (this is a session based toc).

What can i use to do this, a XSP, JSP, write a new
generator/transformer/serializer ?

Is it possible to place session handling in a custom serializer? is this a
job for a transformer, and will i then have to implement it myself and is it
then possible to add session handling?

Should i create a custom generator, if so how to implement caching and
session handling?

I'm quite good at java, but i'm new to cocoon and need some pointers in the
right direction.

in advance thanks!

mvh Karl


-
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: esql and UnsupportedEncodingException - patch proposal

2001-08-09 Thread Arnaud Bienvenu

Oops, I found Michael's patch has a drawback : if you apply it and then you
do not use the encoding attribute (i.e. esql:get-columns/), then you have
an error :
Exception java.io.UnsupportedEncodingException is never thrown in the body
of the corresponding try statement.

So finally the solution I posted at the beginning of this thread may be
better.

-
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: HTTP request parameter

2001-08-09 Thread Christopher Painter-Wakefield


Anne Marie,

try
esql:query
  select name as reg_name,
 deviceID as reg_deviceID,
 description as reg_description,
 startTime as reg_startTime,
 endTime as reg_endTime
  from user, terminal, deviceType, registration
  where terminal.userID =
  esql:parameter type=int
   request:get-parameter name=userID/
  /esql:parameter
and user.userID = terminal.userID
and deviceType.deviceType = terminal.deviceType
and registration.terminalID = terminal.terminalID;
/esql:query

Replace int with long or string, as necessary to match your field
type.

-Christopher




Please respond to [EMAIL PROTECTED]

To:   [EMAIL PROTECTED]
cc:

Subject:  HTTP request parameter


Hi,

what is required to get the http request parameter to work? I have

[...]
xsp:page language=java
  xmlns:xsp=http://www.apache.org/1999/XSP/Core;
  xmlns:esql=http://apache.org/cocoon/SQL/v2;
  xmlns:request=http://www.apache.org/1999/XSP/Request;  ---HERE

[...]

esql:query
  select name as reg_name,
 deviceID as reg_deviceID,
 description as reg_description,
 startTime as reg_startTime,
 endTime as reg_endTime
  from user, terminal, deviceType, registration
  where terminal.userID = request:get-parameter name=userID/
---HERE
and user.userID = terminal.userID
and deviceType.deviceType = terminal.deviceType
and registration.terminalID = terminal.terminalID;
/esql:query
[...]

As far as I have understood, I can then put

?userID=123456

at the end of the url, e.g.
-
http://localhost/welcome.xml?userID=123456

and 123456 will be used. But it's not working, so I guess I'll have to add
something somewhere? I don't get any error messages, but I don't get any
data from the query either. The query works when I use

---
!ENTITY userID 123456 //(in the DTD)

[...]

and terminal.userID = userID; //(in the query)
---

I'm using Cocoon 1.8.2

/Anne Marie





-
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: rutime illegal state exception with mysql

2001-08-09 Thread java guru

Nah...
  i am using tomcat 3.2..positive

 --- Berin Loritsch [EMAIL PROTECTED] wrote: 
java guru wrote:
  
  Hi.,
Following is the exception i have with
  c2+tomcat+mysql...
  
  The sql page runs ok in the beginning...but gave
 this
  one after being idle for a while...
  
  any ideas?
  
  Thanks for ur time
  *
  java.lang.RuntimeException: Could not get the
  datasource java.lang.IllegalStateException: You
 cannot
  select a Component from a disposed
 ComponentSelector
 
 You're running Tomcat 4.0 aren't you?
 
 This is a servlet 2.3 issue--can someone with
 experience
 create some Event Listeners so that the Cocoon
 object is
 recreated when the servlet is brought back to life?
 

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

=
Thanks and have great day
srini


Do You Yahoo!?
Send a newsletter, share photos  files, conduct polls, organize chat events. Visit 
http://in.groups.yahoo.com.

-
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: newbie question: (XML-XSLT) cached - session logic - browser??

2001-08-09 Thread forge


Just create an XSP page,
with a template matching the root element of your xml page.
Then do some if-then-else based on your session.
In each 'if' body you do something like this:

  if (some_session_based_expression)
  {
xsl:call-template name=henk/
  }
  else if ()


The template 'henk' is inserted in the place of the call.
If it just consists of content, it looks like this:

xsl:template name=henk
  xsp:content
!-- xsl code that applies templates to the parts you want --
  /xsp:content
/xsl:template

This way you get 1 producer/generator, which can produce all the 
different pages you want (that is, sections of your XML document)
based on some viariables in the session.


I use this technique to validate users:

The XML document:

nsp:auth group=users
  success
!-- data you want to show when the user is logged
 in and belongs to that group --
  /success
  fail
nsp:login-form/ !-- or some other xml code.. --
  /fail
/nsp:auth

The xsp page:

xsl:template match=nsp:auth
  xsp:logic
if (userInGroup(xsl:value-of select=@group/))
{
xsp:content
xsl:apply-templates select=success/
/xsp:content
}
else
{
xsp:content
xsl:apply-templates select=fail/
/xsp:content
}
  /xsp:logic
 
/xsl:template


The UserInGroup checks the session for a user object, standard code..

Hope this helps,

Kenney Westerhof

On Thu, 9 Aug 2001, Karl Oie wrote:

 Hi, im pretty new to cocoon2 so i need some advice about the best aproach
 for my problem;
 
 I got a quite large XML file which i use a XSL stylesheet to extract only
 parts of, but the XML file might change so i set this up as the generator.
 
 map:match pattern=toc.html
   map:generate src=largefile.xml/
   map:transform src=toc.xsl/
 
   ... perform logic on the result based on sessions ...
 
   map:serialize type=html/
 /map:match
 
 Then based on the the user's session state i want to perform logic on the
 extract, to hide and show elements (this is a session based toc).
 
 What can i use to do this, a XSP, JSP, write a new
 generator/transformer/serializer ?
 
 Is it possible to place session handling in a custom serializer? is this a
 job for a transformer, and will i then have to implement it myself and is it
 then possible to add session handling?
 
 Should i create a custom generator, if so how to implement caching and
 session handling?
 
 I'm quite good at java, but i'm new to cocoon and need some pointers in the
 right direction.
 
 in advance thanks!
 
 mvh Karl
 
 
 -
 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: newbie question: (XML-XSLT) cached - session logic - browser??

2001-08-09 Thread Karl Oie

i think i understand, but won't this put a lot of processing on the server?
the toc.xsl takes about 3 minutes to generate. if i apply the logic in the
XSP page the page will have to process the entire XML document each time?

mvh karl



-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: 9. august 2001 18:15
To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Subject: Re: newbie question: (XML-XSLT) cached - session logic -
browser??



Just create an XSP page,
with a template matching the root element of your xml page.
Then do some if-then-else based on your session.
In each 'if' body you do something like this:

  if (some_session_based_expression)
  {
xsl:call-template name=henk/
  }
  else if ()


The template 'henk' is inserted in the place of the call.
If it just consists of content, it looks like this:

xsl:template name=henk
  xsp:content
!-- xsl code that applies templates to the parts you want --
  /xsp:content
/xsl:template

This way you get 1 producer/generator, which can produce all the
different pages you want (that is, sections of your XML document)
based on some viariables in the session.


I use this technique to validate users:

The XML document:

nsp:auth group=users
  success
!-- data you want to show when the user is logged
 in and belongs to that group --
  /success
  fail
nsp:login-form/ !-- or some other xml code.. --
  /fail
/nsp:auth

The xsp page:

xsl:template match=nsp:auth
  xsp:logic
if (userInGroup(xsl:value-of select=@group/))
{
xsp:content
xsl:apply-templates select=success/
/xsp:content
}
else
{
xsp:content
xsl:apply-templates select=fail/
/xsp:content
}
  /xsp:logic

/xsl:template


The UserInGroup checks the session for a user object, standard code..

Hope this helps,

Kenney Westerhof

On Thu, 9 Aug 2001, Karl Oie wrote:

 Hi, im pretty new to cocoon2 so i need some advice about the best aproach
 for my problem;

 I got a quite large XML file which i use a XSL stylesheet to extract only
 parts of, but the XML file might change so i set this up as the generator.

 map:match pattern=toc.html
   map:generate src=largefile.xml/
   map:transform src=toc.xsl/

   ... perform logic on the result based on sessions ...

   map:serialize type=html/
 /map:match

 Then based on the the user's session state i want to perform logic on the
 extract, to hide and show elements (this is a session based toc).

 What can i use to do this, a XSP, JSP, write a new
 generator/transformer/serializer ?

 Is it possible to place session handling in a custom serializer? is this a
 job for a transformer, and will i then have to implement it myself and is
it
 then possible to add session handling?

 Should i create a custom generator, if so how to implement caching and
 session handling?

 I'm quite good at java, but i'm new to cocoon and need some pointers in
the
 right direction.

 in advance thanks!

 mvh Karl


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




[C2] JVM memory usage is growing and growing util OutOfMemory-Exception

2001-08-09 Thread C. Gaffga

I have still the same Problem, Cocoon consumes all my memory over a short
period of time.
I did a few checks, so I could see that all instances of my Java Classes
(some need very much memory) a released correctly. I overwrote the finalize
method for that, and printed something to stdout, to see if they are
released.

So, I think it's a Problem of Cocoon. How can I disable the cache, to check
wether that's the reason.
Has anybody an Idea what's going on here? If we wan't to release our site
like this, we need a script to restart tomcat every five minutes!! no way!

I hope somebody can help

Christoph


 Hi!

 Im using Tomcat4.b5, JDK1.3.1 and Cocoon2.b2 on SuSeLinux 7.1

 The memory usage of the VM, cocoon is running on, is growing and growing
with
 each request. Aprox. 200K more by each request. This is going on until a
 OutOfMemory-Eception occures and the VM is using about 500 to 600 MB of
 memory.
 During generating my XSP pages, i store large Objects in the
 request-Atrributes to mak them available to other parts in the aggregate,
 because the need so much time to calculate.

 Is it possible that these objects are not released after the request had
 been processed completly? How can I check, witch object allocate how mutch
 of memory?

 Thanks in advance.

 Christoph Gaffga
 [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]




FW: newbie question: (XML-XSLT) cached - session logic - browser??

2001-08-09 Thread Karl Oie

Thank you very much, i will try this now (just have to read about XSP and
sessions first :-)...

Just a final question about C2 as it seems you know about it's inner
working. The class that gets created as a cache for my largefile.xml
document. does it contain my entire document? (since i could delete the
original file...) is it keept in memory? I would have to buy some more ram
chips i guess ;-)


mvh karl


On Thu, 9 Aug 2001, Karl Oie wrote:

 i think i understand, but won't this put a lot of processing on the
server?
 the toc.xsl takes about 3 minutes to generate. if i apply the logic in the
 XSP page the page will have to process the entire XML document each time?

Well not exactly.
The entire document gets processed ONLY when you ask the page for
the first time.
A class is generated then, consisting of your toc.xsl applied to
the original document.
If your xsp file was empty, the result would be a java-file which produces
your XML document as SAX events. You COULD delete your xml file once
the java file is generated, because it is not needed anymore (but you
shouldn't because cocoon depends on the file to be there ;)

So basically your xml document is replaced by code that fires SAX
events to the contenthandler (the first stylesheet in your pipeline).

Therefore, everytime your page gets requested the cached class file
gets called.

Your xml page will not be entirely passed through the pipeline,
because not all the code that fires the SAX events get called.

I hope you understand..
You might want to try this out with a small xml file, consisting
of only 2 tags, and a simple if-then-else statement depending
on a query parameter 'section=one' or 'two'.
Check the generated source file, it should be
in tomcats 'work' dir under
$TOMCAT_HOME/work/localhost%F8080/[servlet-zone]/org/apache/www/..._xml.java
that should clarify it for you (search for the 'generate' function).

There is another way to accomplish this. This is done as follows:
let your XSP page add an XML tag in the result, for instance
if ()
{ 
  xsp:content
some-tag-one
  /xsp:content
}
else 
 !-- some other tag --

and let your stylesheet (NOT toc.xsl :)) check for that tag,
and then process some part of your input xml file.
This way, the document WILL get parsed EVERY time, ENTIRELY.
THis is the slow and ugly way.

So use XSP and it will be fast ;)

(btw: i've coded my own cocoon clone with XSP which is a lot faster
than cocoon, simply because it is not as modular as cocoon. That's
why I understand cocoon so well :))

Hope this helps, if not, feel free to ask.

 
 mvh karl
 
 -Original Message-
 From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
 Sent: 9. august 2001 18:15
 To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
 Subject: Re: newbie question: (XML-XSLT) cached - session logic -
 browser??
 
 
 
 Just create an XSP page,
 with a template matching the root element of your xml page.
 Then do some if-then-else based on your session.
 In each 'if' body you do something like this:
 
   if (some_session_based_expression)
   {
   xsl:call-template name=henk/
   }
   else if ()
 
 
 The template 'henk' is inserted in the place of the call.
 If it just consists of content, it looks like this:
 
 xsl:template name=henk
   xsp:content
 !-- xsl code that applies templates to the parts you want --
   /xsp:content
 /xsl:template
 
 This way you get 1 producer/generator, which can produce all the
 different pages you want (that is, sections of your XML document)
 based on some viariables in the session.
 
 
 I use this technique to validate users:
 
 The XML document:
 
   nsp:auth group=users
   success
 !-- data you want to show when the user is logged
  in and belongs to that group --
   /success
   fail
 nsp:login-form/ !-- or some other xml code.. --
   /f
ail
 /nsp:auth

 The xsp page:

 xsl:template match=nsp:auth
   xsp:logic
 if (userInGroup(xsl:value-of select=@group/))
 {
   xsp:content
   xsl:apply-templates select=success/
 /xsp:content
 }
 else
 {
   xsp:content
 xsl:apply-templates select=fail/
 /xsp:content
 }
   /xsp:logic

 /xsl:template


 The UserInGroup checks the session for a user object, standard code..

 Hope this helps,

   Kenney Westerhof

 On Thu, 9 Aug 2001, Karl Oie wrote:

  Hi, im pretty new to cocoon2 so i need some advice about the best
aproach
  for my problem;
 
  I got a quite large XML file which i use a XSL stylesheet to extract
only
  parts of, but the XML file might change so i set this up as the
generator.
 
  map:match pattern=toc.html
  map:generate src=largefile.xml/
  map:transform src=toc.xsl/
 
  ... perform logic on the result based on sessions ...
 
  map:serialize type=html/
  /map:match
 
  Then based on the the user's session state i want to perform logic on
the
  extract, to hide and show elements (this is 

Re: esql and UnsupportedEncodingException - patch proposal

2001-08-09 Thread Enke Michael

Arnaud Bienvenu wrote:
 
 Oops, I found Michael's patch has a drawback : if you apply it and then you
 do not use the encoding attribute (i.e. esql:get-columns/), then you have
 an error :
 Exception java.io.UnsupportedEncodingException is never thrown in the body
 of the corresponding try statement.
 
 So finally the solution I posted at the beginning of this thread may be
 better.
 
 -
 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]


Yes, thats right, shame on me.
But the solution: Don't catch UnsupportedEncodingException but only
Exception.
Than it is working. Here ones more the patch:

Index:
./src/org/apache/cocoon/components/language/markup/xsp/java/esql.xsl
===
RCS file:
/home/cvspublic/xml-cocoon2/src/org/apache/cocoon/components/language/markup/xsp/java/esql.xsl,v
retrieving revision 1.16
diff -u -r1.16 esql.xsl
---
./src/org/apache/cocoon/components/language/markup/xsp/java/esql.xsl   
2001/08/06 15:38:57 1.16
+++
./src/org/apache/cocoon/components/language/markup/xsp/java/esql.xsl   
2001/08/09 15:26:48
@@ -636,6 +636,8 @@
   /xsl:otherwise
 /xsl:choose
   } catch (Exception _esql_exception_xsl:value-of
select=generate-id(.)/_2) {}
+} catch(Exception e) {
+  throw new RuntimeException(e.toString());
 }
 if (_esql_queries.empty()) {
   _esql_query = null;

-
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: Replacing \n with BR - cocoon pb ?

2001-08-09 Thread Christopher Painter-Wakefield


What about doing the replacements in your SELECT statement to create
well-formed XML, then using the esql:get-xml ... to retrieve it?  In
Oracle, it would look like:

SELECT 'mytext' || REPLACE(mytextfield, CHR(10), 'BR/') || '/mytext
FROM 

I would guess most RDBMS have a similar capability.

-Christopher




Please respond to [EMAIL PROTECTED]

To:   [EMAIL PROTECTED]
cc:

Subject:  Replacing \n with BR - cocoon pb ?



Hi folks !

I have text in a database with \n characters in it.
I want to produce HTML and keep LF in my presentation.
So I have to convert \n to BR

I can't replace with  and  characters because they can be confusing
for the parser , am I right ?
In order to see if my template is ok, I tried it but I have a
StackOverFlowError ! (replacing \n with BR )
Any help is appreciated

Thanks

Sébastien






Here is what I did :

xsl:template name=remplaceCaracDansChaine
xsl:param name=chaineEntrante/!--Input String--
xsl:param name=caracEntrant/!--what I want to be replaced--
xsl:param name=caracSortant/!--the new piece of string--
xsl:choose
xsl:when test=contains($chaineEntrante,caracEntrant)
xsl:value-of
select=concat(substring-before
($chaineEntrante,$caracEntrant),$caracSortant)/
xsl:call-template name=remplaceCaracDansChaine
xsl:with-param name=chaineEntrante
select=substring-after($chaineEntrante,$caracEntrant)/
xsl:with-param name=caracEntrant select=$caracEntrant/
xsl:with-param name=caracSortant select=$caracSortant/
/xsl:call-template
/xsl:when
xsl:otherwise
xsl:value-of select=$chaineEntrante/
/xsl:otherwise
/xsl:choose
/xsl:template

Then, I call it like that :
xsl:variable name=monTextexsl:value-of
select=/page/rowfiche/texte//xsl:variable !--value coming from my
XML--
xsl:variable name=texteBR!--the destination variable with modified
text--
xsl:call-template name=remplaceCaracDansChaine
xsl:with-param name=chaineEntrante select=string($monTexte)/
xsl:with-param name=caracEntrant select=n/
xsl:with-param name=caracSortant select=BR/!--I can't use
BR because of  and  characters--
/xsl:call-template
/xsl:variable

xsl:value-of select=$texteBR/!--print the transformed string--


-
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: Can the sitemap pass parameters to XSP, like it passes them to XSL?

2001-08-09 Thread Arnaud Bienvenu

Tibi,

You can get the parameter with this function :
parameters.getParameter(lang, unknown);
(unkown is the default value)

If you want to insert it outside java code within your xsp, use xsp:expr :
xsp:exprparameters.getParameter(lang, unknown)/xsp:expr

If somebody knows a better way, please tell us :-)
-- 
Arnaud Bienvenu
http://www.generasound.com/

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