Re: how to hand over parameter to an url?

2002-08-22 Thread KOZLOV Roman

Am I in a time loop? It's the fifth copy of the same mail.

Roman

Jens Grote wrote:

 hi,

 i tried it, but it did not work. the prob is, i cannot find out where the
 parameters have a problem. it just happens nothing.

 searching for the key 'servlet' is no good idea. nearly every email contains
 it.

 greetings

 jens

  Did you use the request action in the pipeline you tried?  I think you
  need that in order for {requestQuery} to have any value.  Make sure you
  change {1} to {../1} once you use the action.
 
 
  map:match pattern=*.jsp type=wildcard
map:act type=request
  map:parameter name=parameters value=true/
 
map:generate
  src=http://localhost:8080/not-cocoon/mydir/{../1}.jsp{requestQuery};
type=html
/map:generate
map:serialize/
/map:act
  /map:match
 
 
  You might try searching the mailing list for servlet. I seem to remember
  this issue being discussed some months ago.
 
  -Original Message-
  From: Jens Grote [mailto:[EMAIL PROTECTED]]
  Sent: Wednesday, August 21, 2002 6:03 AM
  To: [EMAIL PROTECTED]
  Subject: Re: how to hand over parameter to an url?
 
 
  sorry, but that doesn't work.
 
  maybe i should explain my prob a little bit more precisely. the url i want
  to reach per link is:
 
  http://localhost:8080/cocoon/newly/Create.jsp?:coded=872898000
 
  map:match pattern=*.jsp type=wildcard
  map:generate
  src=http://localhost:8080/other-servlet/mydir/{1}.jsp;
  type=html
  /map:generate
  map:serialize/
  /map:match
 
  my sidemap entry tries to reach another servlet than cocoon, the
  'other-servlet' servlet. this other-servlet generate out of a jsp page a
  html page
  (independent of cocoon), handles it over to cocoon and cocoon handels it
  over to
  tomcat. it works fine, if i the *.jsp page i request through the client do
  not
  need any parameters. in this case the response is resource not found.
 
  in other, if i use javascript and form, the requested output is not shown
  (the response is empty).
 
  your solution doesn't work in any of this two cases.
 
  greetings
 
  jens
 
 
   I guess the following sitemap would work,,,
  
  
   map:match pattern=*.jsp type=wildcard
map:generate
  
   src=http://localhost:8080/not-cocoon/mydir/{1}.jsp{requestQuery};
type=html
/map:generate
map:serialize/
/map:match
  
  
   Kavitha
  
  
  
  
   --- Jens Grote [EMAIL PROTECTED] wrote:  hi,
   
i have a webpage, where one link opens a new
webpage. this link is a url
with a parameter including.
   
it seems, that cocoon cut the parameter off. the
page can not be shown. (the
parameter is something like a session number.)
   
my sidemap entry is:
   
   
map:match pattern=*.jsp type=wildcard
map:generate
src=http://localhost:8080/not-cocoon/mydir/{1}.jsp;
type=html
/map:generate
map:serialize/
/map:match
   
the .jsp sides are generated into xml by an other
servlet. therefore i need
the whole url.
   
can i hand over dynamic parameters?
   
i tried something like this:
   
map:parameter name=* value={2}/
in the generator tag, but it doesn't work.
   
error message is 'resource not found' strange to
say.
   
thanks and greets
   
jens
   
   
   
--
GMX - Die Kommunikationsplattform im Internet.
http://www.gmx.net
   
   
   
   -
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]
   
  
   
   Want to sell your car? advertise on Yahoo Autos Classifieds. It's Free!!
  visit http://in.autos.yahoo.com
  
   -
   Please check that your question  has not already been answered in the
   FAQ before posting. http://xml.apache.org/cocoon/faq/index.html
  
   To unsubscribe, e-mail: [EMAIL PROTECTED]
   For additional commands, e-mail:   [EMAIL PROTECTED]
  
 
  --
  GMX - Die Kommunikationsplattform im Internet.
  http://www.gmx.net
 
 
  -
  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]
 

 --
 GMX - Die Kommunikationsplattform im Internet.
 http://www.gmx.net

 -
 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 

The Sitemap is null, this should never be!

2002-08-21 Thread KOZLOV Roman

Hi,
There was a thread concerning the same problem but it was blocked.
After some memory consuming work Cocoon crashes. To get it work again I
have to restart Tomcat.
Just after crash the java.exe process of Tomcat uses about 17 K of
memory.
JVM has the following setting:
CATALINA_OPTS= -Xmx256M
Amount of system memory at the crash time:
used - about 435 M
total - about 1500M
physical - 524M
My configuration is Cocoon 2.0.3,  JDK 1.4, Tomcat 4.0.4., Win NT 4.0 SP
6a.

Could, somebody help to clarify the meaning/reason of this crash and how
to avoid it. The exception is the following:
Cocoon 2 - Internal server error


type fatal
message The Sitemap is null, this should never be!
description java.lang.RuntimeException: The Sitemap is null, this should
never be!
sender org.apache.cocoon.servlet.CocoonServlet
source Cocoon servlet
request-uri
/cocoon/
path-info
stack-trace

java.lang.RuntimeException: The Sitemap is null, this should never be!
 at org.apache.cocoon.sitemap.Handler.checkSanity(Handler.java:249)
 at org.apache.cocoon.sitemap.Handler.process(Handler.java:219)
 at org.apache.cocoon.sitemap.Manager.invoke(Manager.java:179)
 at
org.apache.cocoon.sitemap.SitemapManager.process(SitemapManager.java:154)

 at org.apache.cocoon.Cocoon.process(Cocoon.java:575)
 at
org.apache.cocoon.servlet.CocoonServlet.service(CocoonServlet.java:999)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
 at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)

 at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)

 at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:243)

 at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)

 at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)

 at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
 at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:190)

 at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)

 at
org.apache.catalina.valves.CertificatesValve.invoke(CertificatesValve.java:246)

 at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)

 at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)

 at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
 at
org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2347)

 at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)

 at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)

 at
org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:170)

 at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)

 at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:170)

 at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)

 at
org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:468)

 at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)

 at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)

 at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
 at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174)

 at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)

 at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)

 at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
 at
org.apache.catalina.connector.http.HttpProcessor.process(HttpProcessor.java:1027)

 at
org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java:1125)

 at java.lang.Thread.run(Thread.java:536)

--

Thank you in advance,
Roman


-
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: AW: Xindice - Pipeline to db

2002-08-21 Thread KOZLOV Roman

Hi,

praktikant wrote:

 how can I write for example this

 http://localhost:8080/cocoon/xmldb/dvd/mi2.xml
 http://localhost:8080/cocoon/xmldb/dvd/mi2.xml

 http://localhost:8080/cocoon/xmldb/dvd/?xpath=//dvd/film
 http://localhost:8080/cocoon/xmldb/dvd/?xpath=//dvd/film

 http://localhost:8080/cocoon/xmldb/dvd/?xpath=//dvd/film[contains(cover,'mi2
 ')
 http://localhost:8080/cocoon/xmldb/dvd/?xpath=//dvd/film[contains(cover,'mi
 2') ]

 into the sitemap.xmap?

What for? If you want to get your XML data from Xindice db, then you just add to
your sitemap a matcher with an appropriate generator source. For example:
map:match pattern=dvd/**
map:generate src=cocoon:/xmldb/dvd/{1}/
map:serialize type=xml/
/map:match

Then you can get XML data by URL's you have pointed above.

Note, that the sitemap has to contain also the matcher for xmldb/** (default
cocoon's sitemap contains it already):
   map:match pattern=xmldb/**
map:match type=request-parameter pattern=xpath
 map:generate src=xmldb:xindice://localhost:4080/{../1}#{1}/
 map:serialize type=xml/
/map:match

map:generate src=xmldb:xindice://localhost:4080/{1}/
map:serialize type=xml/
   /map:match


By the way, did you read this:
http://cocooncenter.de/cc/documents/resources/xindice/index.html

Best regards,
Roman




 thanks

 -Ursprüngliche Nachricht-
 Von:praktikant [mailto:[EMAIL PROTECTED]]
 Gesendet am:Mittwoch, 21. August 2002 08:52
 An: [EMAIL PROTECTED]
 Betreff:Xindice - Pipeline to db

 Hi,
 now I can use Xindice in Cocoon.
 I've had a wrong idea from using Xindice.

 Thanks Roman! :o)
 
 But I haven't found something about a pipeline to Xindice.
 How can I build a pipeline to Xindice?
 How can I write back to Xindice?
 How to use XUpdate?
 Has someone simple examples for it?
 
 My db is on .../xindice/db/dvd
 The resources named
 mi.xml
 mi2.xml
 mib.xml
 mib2.xml

map:pipeline
 map:match pattern=dvd/mi2 type=wildcard
  map:generate src=xmldb/xpath/dvd/mi2.xml
 type=serverpages/
  map:transform src=dvd/film.xsl type=xslt/
  map:serialize type=xml/
 /map:match
/map:pipeline

 Sorry, but no idea how to use XUpdate. :-(

 I use WIN2k, Tomcat 4.0.4, Cocoon 2.0.3 (Java 1.3.x), Xindice 1.0,
 Java SDK
 1.3.1_04


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

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

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

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


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

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




Re: AW: Xindice - Pipeline to db

2002-08-21 Thread KOZLOV Roman

Just one mistake:

KOZLOV Roman wrote:

 Hi,

 praktikant wrote:

  how can I write for example this
 
  http://localhost:8080/cocoon/xmldb/dvd/mi2.xml
  http://localhost:8080/cocoon/xmldb/dvd/mi2.xml
 
  http://localhost:8080/cocoon/xmldb/dvd/?xpath=//dvd/film
  http://localhost:8080/cocoon/xmldb/dvd/?xpath=//dvd/film
 
  http://localhost:8080/cocoon/xmldb/dvd/?xpath=//dvd/film[contains(cover,'mi2
  ')
  http://localhost:8080/cocoon/xmldb/dvd/?xpath=//dvd/film[contains(cover,'mi
  2') ]
 
  into the sitemap.xmap?

 What for? If you want to get your XML data from Xindice db, then you just add to
 your sitemap a matcher with an appropriate generator source. For example:
 map:match pattern=dvd/**
 map:generate src=cocoon:/xmldb/dvd/{1}/
 map:serialize type=xml/
 /map:match

 Then you can get XML data by URL's you have pointed above.

without /xmldb substring, for example http://localhost:8080/cocoon/dvd/mi2.xml

Roman



 Note, that the sitemap has to contain also the matcher for xmldb/** (default
 cocoon's sitemap contains it already):
map:match pattern=xmldb/**
 map:match type=request-parameter pattern=xpath
  map:generate src=xmldb:xindice://localhost:4080/{../1}#{1}/
  map:serialize type=xml/
 /map:match

 map:generate src=xmldb:xindice://localhost:4080/{1}/
 map:serialize type=xml/
/map:match

 By the way, did you read this:
 http://cocooncenter.de/cc/documents/resources/xindice/index.html

 Best regards,
 Roman

 
 
  thanks
 
  -Ursprüngliche Nachricht-
  Von:praktikant [mailto:[EMAIL PROTECTED]]
  Gesendet am:Mittwoch, 21. August 2002 08:52
  An: [EMAIL PROTECTED]
  Betreff:Xindice - Pipeline to db
 
  Hi,
  now I can use Xindice in Cocoon.
  I've had a wrong idea from using Xindice.
 
  Thanks Roman! :o)
  
  But I haven't found something about a pipeline to Xindice.
  How can I build a pipeline to Xindice?
  How can I write back to Xindice?
  How to use XUpdate?
  Has someone simple examples for it?
  
  My db is on .../xindice/db/dvd
  The resources named
  mi.xml
  mi2.xml
  mib.xml
  mib2.xml
 
 map:pipeline
  map:match pattern=dvd/mi2 type=wildcard
   map:generate src=xmldb/xpath/dvd/mi2.xml
  type=serverpages/
   map:transform src=dvd/film.xsl type=xslt/
   map:serialize type=xml/
  /map:match
 /map:pipeline
 
  Sorry, but no idea how to use XUpdate. :-(
 
  I use WIN2k, Tomcat 4.0.4, Cocoon 2.0.3 (Java 1.3.x), Xindice 1.0,
  Java SDK
  1.3.1_04
 
 
  -
  Please check that your question  has not already been answered in
  the
  FAQ before posting.
  http://xml.apache.org/cocoon/faq/index.html
 
  To unsubscribe, e-mail:
  [EMAIL PROTECTED]
  For additional commands, e-mail:
  [EMAIL PROTECTED]
 
  -
  Please check that your question  has not already been answered in the
  FAQ before posting. http://xml.apache.org/cocoon/faq/index.html
 
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail:   [EMAIL PROTECTED]

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

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


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

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




Help, please

2002-08-21 Thread KOZLOV Roman

Please, help.
Anybody knows what does the exception The Sitemap is null, this should
never be! mean and what are reasons of it?

Thank you in advance,
Roman


-
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: embedding image-stream in pdf

2002-08-20 Thread KOZLOV Roman

Hi Frank,

There was a problem with images URL's in generated pdf. The matter is that
relative URL's don't work. You have to put complete absolute URL's (like
http://host... etc.).
I've used host matcher in the following pipeline to get full path to images as
a parameter in XSLT:

map:match pattern=print_lubricant.pdf
  map:match type=host pattern=*
  map:generate src=some_source.xml/
  map:transform src=stylesheets/lubricant2fo.xsl
  map:parameter name=filePath
value=http://{../1}{context}/mount/ome-db/ome-dbl/img/
  /map:transform
  /map:match
  map:serialize type=fo2pdf/
/map:match

Roman

Przybilla, Frank wrote:

 Dear All,

 I have the following scenario and I want to know
 if this can be solved with fop:

 There is a servlet which can produce images (png, jpeg, etc.) as ouput
 streams
 which are not materialized to files.
 How can this servlet  be used to embed these images in a pdf file with fop?
 I have already tried it with fo:external-graphic scrc=url-to-servlet
 /. So I want
 to use it the same way  as in  a HTML-Scenario where it works fine with img
 src=url-to-servlet/.

 But with fop it doesn't work.

 Can anyone tell me, if this is generally be possible with fop or which
 alternatives exists?

 Thanks in advance

 Frank.

 
 ---
 Frank Przybilla @x-modules
 (Dipl.-Inform.)
 maxess systemhaus gmbh
 Europaallee 3-5 Phone:  +49 (0) 631.303-2500
 67657 KaiserslauternFax:+49 (0) 631.303-2501
 E-Mail: mailto:[EMAIL PROTECTED]
 Germany www:http://www.maxess.de
 
 --

 -
 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: embedding image-stream in pdf

2002-08-20 Thread KOZLOV Roman



Sorry, the sitemap snippet is wrong (forgot request action to get {context}) . The 
right one is the following:

 map:match pattern=print_lubricant.pdf
   map:match type=host pattern=*
 map:act type=request
   map:generate src=some_source.xml/
   map:transform src=stylesheets/lubricant2fo.xsl
   map:parameter name=filePath 
value=http://{../1}{context}/mount/ome-db/ome-dbl/img/
   /map:transform
 /map:act
   /map:match
   map:serialize type=fo2pdf/
 /map:match

Roman

KOZLOV Roman wrote:
 
 Hi Frank,
 
 There was a problem with images URL's in generated pdf. The matter is that
 relative URL's don't work. You have to put complete absolute URL's (like
 http://host... etc.).
 I've used host matcher in the following pipeline to get full path to images as
 a parameter in XSLT:
 
 map:match pattern=print_lubricant.pdf
   map:match type=host pattern=*
   map:generate src=some_source.xml/
   map:transform src=stylesheets/lubricant2fo.xsl
   map:parameter name=filePath
 value=http://{../1}{context}/mount/ome-db/ome-dbl/img/
   /map:transform
   /map:match
   map:serialize type=fo2pdf/
 /map:match
 
 Roman
 
 Przybilla, Frank wrote:
 
  Dear All,
 
  I have the following scenario and I want to know
  if this can be solved with fop:
 
  There is a servlet which can produce images (png, jpeg, etc.) as ouput
  streams
  which are not materialized to files.
  How can this servlet  be used to embed these images in a pdf file with fop?
  I have already tried it with fo:external-graphic scrc=url-to-servlet
  /. So I want
  to use it the same way  as in  a HTML-Scenario where it works fine with img
  src=url-to-servlet/.
 
  But with fop it doesn't work.
 
  Can anyone tell me, if this is generally be possible with fop or which
  alternatives exists?
 
  Thanks in advance
 
  Frank.
 
  
  ---
  Frank Przybilla @x-modules
  (Dipl.-Inform.)
  maxess systemhaus gmbh
  Europaallee 3-5 Phone:  +49 (0) 631.303-2500
  67657 KaiserslauternFax:+49 (0) 631.303-2501
  E-Mail: mailto:[EMAIL PROTECTED]
  Germany www:http://www.maxess.de
  
  --
 
  -
  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]

Przybilla, Frank wrote:

 Dear All,

 I have the following scenario and I want to know
 if this can be solved with fop:

 There is a servlet which can produce images (png, jpeg, etc.) as ouput
 streams
 which are not materialized to files.
 How can this servlet  be used to embed these images in a pdf file with fop?
 I have already tried it with fo:external-graphic scrc=url-to-servlet
 /. So I want
 to use it the same way  as in  a HTML-Scenario where it works fine with img
 src=url-to-servlet/.

 But with fop it doesn't work.

 Can anyone tell me, if this is generally be possible with fop or which
 alternatives exists?

 Thanks in advance

 Frank.

 
 ---
 Frank Przybilla @x-modules
 (Dipl.-Inform.)
 maxess systemhaus gmbh
 Europaallee 3-5 Phone:  +49 (0) 631.303-2500
 67657 KaiserslauternFax:+49 (0) 631.303-2501
 E-Mail: mailto:[EMAIL PROTECTED]
 Germany www:http://www.maxess.de
 
 --

 -
 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: AW: embedding image-stream in pdf

2002-08-20 Thread KOZLOV Roman

So, if your servlet will produce proper HTML response then it should work.

Roman

Przybilla, Frank wrote:

 Hi Roman,

 I don't know if I got it right what you mean.

 What I want to in fop, maybe in conjunction with cocoon, is the following:

 fo:external-graphic src=http://localhost:8080/image-servlet/, where the
 servlet is
 producing an image stream. I don't want to store the image as a file and
 then acess it.

 Frank

 -Ursprungliche Nachricht-
 Von: KOZLOV Roman [mailto:[EMAIL PROTECTED]]
 Gesendet: Dienstag, 20. August 2002 09:03
 An: [EMAIL PROTECTED]
 Betreff: Re: embedding image-stream in pdf

 Sorry, the sitemap snippet is wrong (forgot request action to get
 {context}) . The right one is the following:

  map:match pattern=print_lubricant.pdf
map:match type=host pattern=*
  map:act type=request
map:generate src=some_source.xml/
map:transform src=stylesheets/lubricant2fo.xsl
map:parameter name=filePath
 value=http://{../1}{context}/mount/ome-db/ome-dbl/img/
/map:transform
  /map:act
/map:match
map:serialize type=fo2pdf/
  /map:match

 Roman

 KOZLOV Roman wrote:
 
  Hi Frank,
 
  There was a problem with images URL's in generated pdf. The matter is that
  relative URL's don't work. You have to put complete absolute URL's (like
  http://host... etc.).
  I've used host matcher in the following pipeline to get full path to
 images as
  a parameter in XSLT:
 
  map:match pattern=print_lubricant.pdf
map:match type=host pattern=*
map:generate src=some_source.xml/
map:transform src=stylesheets/lubricant2fo.xsl
map:parameter name=filePath
  value=http://{../1}{context}/mount/ome-db/ome-dbl/img/
/map:transform
/map:match
map:serialize type=fo2pdf/
  /map:match
 
  Roman
 
  Przybilla, Frank wrote:
 
   Dear All,
  
   I have the following scenario and I want to know
   if this can be solved with fop:
  
   There is a servlet which can produce images (png, jpeg, etc.) as ouput
   streams
   which are not materialized to files.
   How can this servlet  be used to embed these images in a pdf file with
 fop?
   I have already tried it with fo:external-graphic
 scrc=url-to-servlet
   /. So I want
   to use it the same way  as in  a HTML-Scenario where it works fine with
 img
   src=url-to-servlet/.
  
   But with fop it doesn't work.
  
   Can anyone tell me, if this is generally be possible with fop or which
   alternatives exists?
  
   Thanks in advance
  
   Frank.
  
  
 
   ---
   Frank Przybilla @x-modules
   (Dipl.-Inform.)
   maxess systemhaus gmbh
   Europaallee 3-5 Phone:  +49 (0) 631.303-2500
   67657 KaiserslauternFax:+49 (0) 631.303-2501
   E-Mail: mailto:[EMAIL PROTECTED]
   Germany www:http://www.maxess.de
  
 
   --
  
   -
   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]

 Przybilla, Frank wrote:

  Dear All,
 
  I have the following scenario and I want to know
  if this can be solved with fop:
 
  There is a servlet which can produce images (png, jpeg, etc.) as ouput
  streams
  which are not materialized to files.
  How can this servlet  be used to embed these images in a pdf file with
 fop?
  I have already tried it with fo:external-graphic scrc=url-to-servlet
  /. So I want
  to use it the same way  as in  a HTML-Scenario where it works fine with
 img
  src=url-to-servlet/.
 
  But with fop it doesn't work.
 
  Can anyone tell me, if this is generally be possible with fop or which
  alternatives exists?
 
  Thanks in advance
 
  Frank.
 
 
 
  ---
  Frank Przybilla @x-modules
  (Dipl.-Inform.)
  maxess systemhaus gmbh
  Europaallee 3-5 Phone:  +49 (0) 631.303-2500
  67657 KaiserslauternFax:+49 (0) 631.303-2501
  E-Mail: mailto:[EMAIL PROTECTED]
  Germany www:http://www.maxess.de
 
 
  --
 
  -
  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

Re: xsl variable and sunshine getxml

2002-08-20 Thread KOZLOV Roman

Why not xsl:variable?

Roman

Barbara Post wrote:

 c2.0.3..

 I am surprised that :

 sunshine:getxml context=MyContext path=/root/lkfmPageTitle/ works
 while :

 variable name=foo
 sunshine:getxml context=MyContext path=/root/lkfmPageTitle/
 /variable
 xsl:value-of select=$foo/

 does not...

 I need to pass the value to a template (of an imported reused
 stylesheet...).

 Thanks...

 Babs

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

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


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

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




Re: Cocoon and Xindice

2002-08-19 Thread KOZLOV Roman

Hi,
What source do you mean? The snippet you have sent is a result of xpath query
on Xindice database (with xpath value //person[contains(fname,'John')] on the
/db/addressbook collection).
What do you mean by xml code to get xml data? Xindice data are retrieved by
URL's with or without xpath parameter. Then the result xml could be processed
in a pipeline.
Roman

praktikant wrote:

 I want to get some xml data out of a xml database.
 I have written some xml code to get the xml data, but I get only the source
 code.

 Output of the browser:

 ?xml version=1.0 encoding=UTF-8 ?
 collection:results query=//person[contains(fname,'John')] resources=1
 xmlns:collection=http://apache.org/cocoon/xmldb/1.0;
 collection:result docid=address1
 person src:col=/db/addressbook src:key=address1
 xmlns:src=http://xml.apache.org/xindice/Query;
 fnameJohn/fname
 lnameSmith/lname
 phone type=work563-456-7890/phone
 phone type=home534-567-8901/phone
 email type=home[EMAIL PROTECTED]/email
 email type=work[EMAIL PROTECTED]/email
 address type=home34 S. Colon St./address
 address type=work9967 W. Shrimp Ave./address
 /person
 /collection:result
 /collection:results

 -
 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: AW: Cocoon and Xindice

2002-08-19 Thread KOZLOV Roman

There is no difference. You have to transform your xml source to what you
want.
Roman

praktikant wrote:

 Hi,

 that's the point. I do not have the xml-data. I only get the uninterpreted
 xml source.

 -Ursprüngliche Nachricht-
 Von:kavitha ramesh [mailto:[EMAIL PROTECTED]]
 Gesendet am:Montag, 19. August 2002 13:37
 An: [EMAIL PROTECTED]
 Betreff:Re: Cocoon and Xindice

 Hi,

 You have written that you get the xml data in the
 browser.If you need a html file in the browser, you
 have to use a stylesheet and your sitemap should be as
 follows:

 map:pipeline
 map:match pattern=db_test
 map:generate src=db_test.xml/
 map:transform src=db_test.xsl/
 map:serialize/
 /map:match
 /map:pipeline

 You should have a stylesheet db_test.xsl!

 Kavitha


 
 Want to sell your car? advertise on Yahoo Autos Classifieds. It's
 Free!!
visit http://in.autos.yahoo.com


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

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

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

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


-
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: AW: AW: Cocoon and Xindice

2002-08-19 Thread KOZLOV Roman



praktikant wrote:

 Sorry, my english isn't very good. :(
 My problem is that I get no response from my database when I use Cocoon.

Your xml-source is a typical response from Xindice.

 And I want to have the xml data from my xml database.

You have it within collection:result element of Xindice response. You just have
to transform this response to get the content of collection:result element(s).


 But the browser shows me only the procedure that I have written to speak
 with the database

What do you mean by the procedure you have written to \speak\ with the
database. How do you try to get data from the db. Do you use URL request or
something else?

What is your pipeline?

Roman



 I hope these explain it.

 -Ursprüngliche Nachricht-
 Von:KOZLOV Roman [mailto:[EMAIL PROTECTED]]
 Gesendet am:Montag, 19. August 2002 14:38
 An: [EMAIL PROTECTED]
 Betreff:Re: AW: Cocoon and Xindice

 There is no difference. You have to transform your xml source to
 what you
 want.
 Roman

 praktikant wrote:

  Hi,
 
  that's the point. I do not have the xml-data. I only get the
 uninterpreted
  xml source.
 
  -Ursprüngliche Nachricht-
  Von:kavitha ramesh [mailto:[EMAIL PROTECTED]]
  Gesendet am:Montag, 19. August 2002 13:37
  An: [EMAIL PROTECTED]
  Betreff:Re: Cocoon and Xindice
 
  Hi,
 
  You have written that you get the xml data in the
  browser.If you need a html file in the browser, you
  have to use a stylesheet and your sitemap should be as
  follows:
 
  map:pipeline
  map:match pattern=db_test
  map:generate src=db_test.xml/
  map:transform src=db_test.xsl/
  map:serialize/
  /map:match
  /map:pipeline
 
  You should have a stylesheet db_test.xsl!
 
  Kavitha
 
 
 
 
  Want to sell your car? advertise on Yahoo Autos
 Classifieds. It's
  Free!!
 visit http://in.autos.yahoo.com
 
 
 
 -
  Please check that your question  has not already been
 answered in
  the
  FAQ before posting.
  http://xml.apache.org/cocoon/faq/index.html
 
  To unsubscribe, e-mail:
  [EMAIL PROTECTED]
  For additional commands, e-mail:
  [EMAIL PROTECTED]
 
 
 -
  Please check that your question  has not already been answered in
 the
  FAQ before posting.
 http://xml.apache.org/cocoon/faq/index.html
 
  To unsubscribe, e-mail:
 [EMAIL PROTECTED]
  For additional commands, e-mail:
 [EMAIL PROTECTED]


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

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

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

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


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

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




Re: How to translate?

2002-08-15 Thread KOZLOV Roman

Hi Albert,

Albert Cervera Areny wrote:

 Hi,
   the thread is quite old... but anyway, I've tried to make the stylesheet
 (please tell me if it is right, by the way how could I avoid that
 xmlns:i18n in each generated tag?).
 I don't understand some things. I create a messages.xml file which looks
 like (I'd prefer not to use simple keys but the original text, I don't
 think I can find a name for each element in the site):

 catalogue i18n:lang=ca
   message key=maybe a very very long textmaybe a very very long
 text/message
 /catalogue

 That's right. This is the file in the same language as the site. Then I
 make a couple of copies of it and name it messages_ca.xml (the original
 language) and messages_es.xml (because I want to translate it into
 spanish). I translate this file:

 catalogue i18n:lang=es
   message key=maybe a very very long texttranslation of the
 text/message
 /catalogue

 And now what? You said I don't need anything else but in the sitemap I
 need to tell only one dictionary... Do I need to merge both files into one
 dictionary?

No.

 How do I tell through the sitemap which language to use?

I use locale request parameter (there are other ways AFAIK). For example, if I
request something like ...?...locale=fr then i18n transformer takes translations
from messages_fr.xml.

Roman


 I suppose you only create one messages file for the hole site merging
 multiple messages files... and you refresh it with another stylesheet..
 am I right?

 Well... can't think of more questions right now ;)

 Thanks in advance!

  From: Albert Cervera Areny [mailto:[EMAIL PROTECTED]]
 
  Hi,
  I've been looking at the i18n transformer in the
  documentation web page,
  however I can't see how it works in production. I got the idea that it
  works let's say like gettext as you mark which parts you want
  to translate
  and generate a file with those messages if so... how can I do that
  easily? I've been looking throw those convert and merge xsl
  files but they
  don't seem to generate it. I was able to create a file to
  translate into
  one new language from the simple_dict.xml example but how may
  I create it
  from scratch?
 
  Seems that your are looking for my text2messages.xsl that I have on my
  harddrive at home ;). But I don't think that you'll have problems in
  creating such a stylesheet yourself if you are familiar with XSLT. You
  just have to generate message key=text/message elements from the
  all 'i18n:text' and all the attributes that are listed in 'i18n:attr'
  attribute. If you don't hurry then I'll send my stylesheet to you
  tomorrow.
 
 
  These two files, messages and dictionary, are the ones that
  make me not to
  understand the hole process.
 
  The process is this:
- you create a content file and mark some parts of it by 'i18n:text'
  and 'i18n:attr'
- run a stylesheet that generates you an empty dictionary file
- you add your translations to that dictionary (say message_de.xml)  -
  place it in the message catalog (say in the 'translations'
  directory)
- enjoy
 
 
  Could someone clarify those aspects or point me to a better resource?
 
  I think that I'm the best resource to ask about i18n. Tell me if you
  have any problems with it.
 
  Konstantin
 
 
  Thanks in advance!
  --
  Albert Cervera Areny
  Dept. Informàtica Sedifa, S.L.
 
 
 
  -
  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]

 --
 Albert Cervera Areny
 Dept. Informàtica Sedifa, S.L.

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




i18n:attr processing problem (ArrayIndexOutOfBoundsException)

2002-08-14 Thread KOZLOV Roman

Hi,

It seems that there is a bug in the i18n transformer.
1. Configuration: JDK1.4, Cocoon 2.0.3, Tomcat 4.0.4
2. Bug description:
- I've pipeline like xml - i18n transformer - serializer;
- XML source contains an element like
input i18n:attr=value value=somekey type=reset/
Note: order of attributes is significant.
- Such a pipeline crashes with the
java.lang.ArrayIndexOutOfBoundsException :

Original exception : java.lang.ArrayIndexOutOfBoundsException
at java.lang.System.arraycopy(Native Method)
at
org.xml.sax.helpers.AttributesImpl.removeAttribute(AttributesImpl.java:439)

at
org.apache.cocoon.transformation.I18nTransformer.translateAttributes(I18nTransformer.java:1146)

at
org.apache.cocoon.transformation.I18nTransformer.startElement(I18nTransformer.java:868)

. . .

3. The same problem is occured when an element with i18n:attr is created
during xsl transformation, but with reversing order of attributes, for
example:
input type=reset value=somekey i18n:attr=value/
because after xsl transformation attributes in its result are appeared
in reversed order

4. WORKAROUND: for XML (first case) - set i18n:attr as the last
attribute of an element;
for XSL (second case) - set i18n:attr as the first attribute of an
element.

Best regards,
Roman




-
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: Could not read resource file

2002-08-12 Thread KOZLOV Roman

Hi Albert,

Is it ok that in the first your mail some lines are cutted:
map:parameter name=document value=cocoon://
. . .
map:parameter name=instruccions value={../i

By the way could you, please, explain me, where the parameters {../ID} and {../nom} 
are from, because I used Cocoon 2.0.1 only.

Thank you in advance,
  Roman


Albert Cervera Areny wrote:

 It's strange but, when using this pipe it works ok too. It's not what I
 need though.

 map:match pattern=dins-facturacio
   map:generate src=docs/facturacio.xml/
 map:transform src=stylesheets/facturacio-db.xsl
 map:parameter name=usuari value={../ID}/
   /map:transform
   map:transform type=sql
 map:parameter name=use-connection value=cocoon/
   /map:transform
   map:transform src=stylesheets/facturacio.xsl
 map:parameter name=usuari value={../ID}/
 map:parameter name=nom value={../nom}/
   /map:transform
   map:serialize/
 /map:match

 Is there a limit in the number of transforms? Why should it give an error
 with the generator anyway?

  Hi I've got the following in sitemap.xmap:
 
  map:match pattern=dins-facturacio
map:generate src=docs/dins.xml/
map:transform src=stylesheets/dins.xsl
  map:parameter name=document value=cocoon://
  map:parameter name=usuari value={../ID}/
  map:parameter name=nom value={../nom}/
  map:parameter name=instruccions value={../i
/map:transform
map:transform type=xinclude/
map:transform src=stylesheets/facturacio-db.xsl
  map:parameter name=usuari value={../ID}/
/map:transform
map:transform type=sql
  map:parameter name=use-connection value=cocoon/
/map:transform
map:transform src=stylesheets/facturacio.xsl
  map:parameter name=usuari value={../ID}/
  map:parameter name=nom value={../nom}/
/map:transform
map:serialize/
  /map:match
 
  The first transform is needed (doesn't depend on me) and then I include
  the xml file that shuld go inside the html generated by dins.xsl.
  Then the xml file included by xinclude is has to be processed by sql
  tranform and this result by facturacio.xsl (I had to do it that way
  because a call to cocoon://facturacio.xml from dins.xsl didn't enable
  facturacio-db.xsl to see the {../ID} value).
 
  Well.. the problem is that the sql transform gives an error if inside
  facturacio-db.xsl I put a matcher to copy all nodes that I don't have to
  modify (to leave the html file as is). However, it works well if I take
  the output after db-facturacio.xsl, save it as XML and create another
  pipe like this one:
 
map:generate src=docs/result.xml/
map:transform type=sql
  map:parameter name=use-connection value=cocoon/
/map:transform
map:transform src=stylesheets/facturacio.xsl
  map:parameter name=usuari value={../ID}/
  map:parameter name=nom value={../nom}/
/map:transform
map:serialize/
 
  Any Ideas??
 
  Thanks!
 
 
  The error generated by sql transformer is:
  -Message:
  Could not read resource
  file:/var/lib/tomcat/webapps/usuaris/docs/dins.xml
 
  -Description:
  description org.apache.cocoon.ProcessingException: Could not read
  resource file:/var/lib/tomcat/webapps/usuaris/docs/dins.xml:
  java.lang.RuntimeException: java.lang.RuntimeException:
  java.lang.NullPointerException
 
  -Sender:
  sender org.apache.cocoon.servlet.CocoonServlet
 
  -Stack Trace:
 
  org.apache.cocoon.ProcessingException: Could not read resource
  file:/var/lib/tomcat/webapps/usuaris/docs/dins.xml:
  java.lang.RuntimeException: java.lang.RuntimeException:
  java.lang.NullPointerException
  at
  org.apache.cocoon.generation.FileGenerator.generate(FileGenerator.java:155)
  at
  
org.apache.cocoon.components.pipeline.AbstractEventPipeline.process(AbstractEventPipeline.java:166)
  at
  
org.apache.cocoon.components.pipeline.AbstractStreamPipeline.process(AbstractStreamPipeline.java:192)
  at
  
org.apache.cocoon.www.sitemap_xmap.matchN102B9(/var/cache/tomcat/DEFAULT/usuaris/cocoon-files/org/apache/cocoon/www/sitemap_xmap.java:3142)
  at
  
org.apache.cocoon.www.sitemap_xmap.process(/var/cache/tomcat/DEFAULT/usuaris/cocoon-files/org/apache/cocoon/www/sitemap_xmap.java:1632)
  at
  
org.apache.cocoon.www.sitemap_xmap.process(/var/cache/tomcat/DEFAULT/usuaris/cocoon-files/org/apache/cocoon/www/sitemap_xmap.java:1516)
  at org.apache.cocoon.sitemap.Handler.process(Handler.java:222)
  at org.apache.cocoon.sitemap.Manager.invoke(Manager.java:179)
  at
  org.apache.cocoon.sitemap.SitemapManager.process(SitemapManager.java:154)
  at org.apache.cocoon.Cocoon.process(Cocoon.java:575)
  at
  org.apache.cocoon.servlet.CocoonServlet.service(CocoonServlet.java:998)
  at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
  at
  org.apache.tomcat.facade.ServletHandler.doService(ServletHandler.java:484)
  at org.apache.tomcat.core.Handler.invoke(Handler.java:322)
  at org.apache.tomcat.core.Handler.service(Handler.java:235)
  at
  

Re: Could not read resource file

2002-08-12 Thread KOZLOV Roman

Hi Albert,

In your argh.xml I can see the following values of some src attributes:

src=marc!
 o_scroll_r2_c2.png

src=marc!
 o_scroll_r6_c4.png

src=t!
 it_clientes.jpg

It seems that they could be a reason of the problem.

Roman

Albert Cervera Areny wrote:

  Albert,
 
  one at a time...
  comment out the SQL Transformer step and the following ones (remember to
  put an XML serializer instead of the default one): let's see what the
  SQL Transformer gets as input.
 
  Best regards,

 Buf.. that's a pretty big well formed xml file...

 
  -
 Luca Morandini
 GIS Consultant
[EMAIL PROTECTED]
  http://utenti.tripod.it/lmorandini/index.html
  -
 
 
  -Original Message-
  From: Albert Cervera Areny [mailto:[EMAIL PROTECTED]]
  Sent: Monday, August 12, 2002 6:12 PM
  To: [EMAIL PROTECTED]
  Subject: Re: Could not read resource file
 
 
 
   Hi Albert,
  
   Is it ok that in the first your mail some lines are cutted:
   map:parameter name=document value=cocoon://
   map:parameter name=instruccions value={../i
 
  Sorry, I didn't realize it was a matter copy and paste:
  cocoon://trad-facturacio has no longer sense and now is
  docs/facturacio.xml
 
  map:match pattern=dins-facturacio
map:generate src=docs/dins.xml/
map:transform src=stylesheets/dins.xsl
  map:parameter name=document value=cocoon://trad-facturacio/
  map:parameter name=usuari value={../ID}/
  map:parameter name=nom value={../nom}/
  map:parameter name=instruccions value={../instruccions}/
/map:transform
map:transform type=xinclude/
map:transform src=stylesheets/facturacio-db.xsl
  map:parameter name=usuari value={../ID}/
/map:transform
map:transform type=sql
  map:parameter name=use-connection value=cocoon/
/map:transform
map:transform src=stylesheets/facturacio.xsl
  map:parameter name=usuari value={../ID}/
  map:parameter name=nom value={../nom}/
/map:transform
map:serialize/
  /map:match
 
  
   By the way could you, please, explain me, where the parameters
  {../ID} and {../nom} are from, because I used Cocoon 2.0.1 only.
  It hasn't much to do with cocoon but with sun-rise authentication
  actions... When a user authenticates you can access some stored that
  from him/her in this case the ID, name and instructions for a program.
 
  As I said I used to call facturacio.xml through
  cocoon://trad-facturacio but I made some changes. to process the
  facturacio.xml with a XSL file I need to give those values (ID,
  name...) to the xsl transformer and with a call like cocoon://...
  those values are not available.
  That's why I decided to xinclude the file one file inside the other
  and process both but just ignoring the tags not useful to me...
  however as you see I keep on having problems with it.
  If someone knew how to access the ID value of sun-rise then it could
  be another solution too.
 
 
  
   Thank you in advance,
 Roman
  
  
   Albert Cervera Areny wrote:
  
   It's strange but, when using this pipe it works ok too. It's not
  what I need though.
  
   map:match pattern=dins-facturacio
 map:generate src=docs/facturacio.xml/
   map:transform src=stylesheets/facturacio-db.xsl
   map:parameter name=usuari value={../ID}/
 /map:transform
 map:transform type=sql
   map:parameter name=use-connection value=cocoon/
 /map:transform
 map:transform src=stylesheets/facturacio.xsl
   map:parameter name=usuari value={../ID}/
   map:parameter name=nom value={../nom}/
 /map:transform
 map:serialize/
   /map:match
  
   Is there a limit in the number of transforms? Why should it give an
  error with the generator anyway?
  
Hi I've got the following in sitemap.xmap:
   
map:match pattern=dins-facturacio
  map:generate src=docs/dins.xml/
  map:transform src=stylesheets/dins.xsl
map:parameter name=document value=cocoon://
map:parameter name=usuari value={../ID}/
map:parameter name=nom value={../nom}/
map:parameter name=instruccions value={../i
  /map:transform
  map:transform type=xinclude/
  map:transform src=stylesheets/facturacio-db.xsl
map:parameter name=usuari value={../ID}/
  /map:transform
  map:transform type=sql
map:parameter name=use-connection value=cocoon/
  /map:transform
  map:transform src=stylesheets/facturacio.xsl
map:parameter name=usuari value={../ID}/
map:parameter name=nom value={../nom}/
  /map:transform
  map:serialize/
/map:match
   
The first transform is needed (doesn't depend on me) and then I
   include the xml file that shuld go inside the html generated by
  dins.xsl. Then the xml file included by xinclude is has to be
  processed by sql tranform and this result by facturacio.xsl (I had
  to do it that way because 

Re: UTF-8

2002-08-09 Thread KOZLOV Roman

Hi,

1) What do you get without xsl processing, I mean what is in XML output of your xsp? 
Is it contain proper text?
2) Try xsl:value-of select=data disable-output-escaping=yes/ instead of 
xsl:value-of select=data/ in
your xsl.

Roman

 By the way, my name is Roman.

[EMAIL PROTECTED] wrote:

 HI KoZ
 I am attaching the class file the xsp and the xsl as well please have alook
 and tell me where I am wrong
 (See attached file: UOM_Catalogue.xsp)(See attached file:
 UOM_Catalogue.xsl)(See attached file: testing.java)

 Regards
 Sidharth Ghai
 Vmoksha Technologies
 VI th Floor, Corporate Towers 'C'
 Diamond District
 Kodihally
 Banglore


 KOZLOV Roman
 r-kozlov@openca   To: [EMAIL PROTECTED]
 scade.com cc:
Subject: Re: UTF-8
 08/08/2002 07:25
 PM
 Please respond
 to cocoon-users



 Hi Siddharth,

 There are escaped symbols (like ien;) in Cocoon's result. This is the
 reason of
 the different presentation. So it is necessary find the reason of escaping.
 It
 will be great to see your xsp (if you use it) code which you use to
 retrieve
 data.
 There is a mail in the list archive concerned the same problem:
 http://marc.theaimsgroup.com/?l=xml-cocoon-usersm=102348865427773w=2

 I'm not sure that it'll  help but there is some info in the list archive
 also :
 http://marc.theaimsgroup.com/?l=xml-cocoon-usersm=101232288807933w=2
 http://marc.theaimsgroup.com/?l=xml-cocoon-usersm=100815928226594w=2

 Roman

 [EMAIL PROTECTED] wrote:

  Hi Guys
  I am attaching these two files with out put from a jsp and cocoon
  Please help
 
  (See attached file: CocoonHtml.txt)(See attached file: jsphtml.txt)
  Regards
  Sidharth Ghai
  Vmoksha Technologies
  VI th Floor, Corporate Towers 'C'
  Diamond District
  Kodihally
  Banglore
 
 
  kavitha ramesh
  kavitha_igd@ya   To:
 [EMAIL PROTECTED]
  hoo.co.incc:
Subject: Re: UTF-8
  08/08/2002
  04:40 PM
  Please respond
  to cocoon-users
 
 
 
  Hi Siddharth,
 
  I had an XML file messages_zh.xml which has the
  messages  in chinese.I opened a chinese text editor
  and entered the text in chinese.My XML file looks
  like:
 
  ?xml version=1.0 encoding=GB2312?
  catalogue xml:lang=zh
  message key=welcometext
  »¶Ó­ÄãʹÓÃÎÒÃǵķþÎñ£(this are chinese characters)
  /message
  /catalogue
 
  And when I restarted the server my browser displayed
  chinese message,,,
 
  I dont know whether my example is useful for you,,,
 
  Kavitha.
 
   --- [EMAIL PROTECTED] wrote:  Hello All
   I am doing the following
   1) I have a Unicode database in PostgreSQl
   2) I am inputting some data other than english in
   the database.
   3) I am trying to retrieve the data back through
   cocoon2.0.3. AN d getting
   the HTML as
   head
   META http-equiv=Content-Type content=text/html;
   charset=ISO-8859-1
   /head
   But the data which was entered is coming like this
  
à ¥�à ¤¸s
  
  
à ¤¦à ¥�à ¤ªà ¤¨à ¥�à ¤�
  
  
  
  
  
   4) I am trying to do the same thing with JSP and am
   getting the data
   correct on my page like this.Though the HTML in both
   the cases is same I
   can not understand why the hell Browser is not
   interpreting my Unicode in
   case of Cocoon.
  
   I am getting in case of Jsp like this
   head
   META http-equiv=Content-Type content=text/html;
   charset=ISO-8859-1
   /head
   Please help me as I am trapped in this for two days
   and am not getting what
   is wrong with cocoon
  
   Regards
   Sidharth Ghai
   Vmoksha Technologies
   VI th Floor, Corporate Towers 'C'
   Diamond District
   Kodihally
   Banglore
 
  
  Want to sell your car? advertise on Yahoo Autos Classifieds. It's Free!!
 visit http://in.autos.yahoo.com
 
  -
  Please check that your question  has not already been answered in the
  FAQ before posting. http://xml.apache.org/cocoon/faq/index.html
 
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail:   [EMAIL PROTECTED]
 
 
 
   Name: CocoonHtml.txt
 CocoonHtml.txtType: Plain Text (text/plain)
   Encoding: base64
 
Name: jsphtml.txt
 jsphtml.txtType: Plain Text (text/plain)
Encoding: base64
 
 
 
  -
  Please check that your question  has

Re: Keeping HTMLSerializer from altering markup?

2002-08-09 Thread KOZLOV Roman

Hi,

Just a question, if XHTML is XML then is it possible to use XML serializer?
If not, why?

Roman

Vadim Gritsenko wrote:

  From: Justin Fagnani-Bell [mailto:[EMAIL PROTECTED]]
 
  Hi list,
 
I have a page with a form generated by Cocoon. There's a textarea in
  the form where you can edit some xml (possibly xhtml). Because the
 form
  is an HTML form I'm using an HTMLSerializer. But I want to keep the
  serializer from altering the markup in the textarea, because if it's
  xhtml content it will turn br/'s into br's. Then when the text is
  saved and you visit the form again, or view the page the text is on, I
  get a parsing error.
 
  My xml fil looks somethng like this:
 
  node name=test title=Test
 text name=content
   p
 Here's some text that will get messed up by HTMLSerializer
 br/
 Then I'll get an error.
   /p
 /text
  /node
 
  I use an xslt template to turn this into my form that looks likt this:
 
  xsl:template match=text
 textarea name=@namexsl:copy-of select=* |
 text()//textarea
  /xsl:template
 
  I've tried a few things with no luck so far. I added a
  xmlns=http://www.w3.org/1999/xhtml; attribute to the text element
  hoping that HTMLSerializer would then leave it alone, but my
 stylesheet
  won't copy the text now.

 xsl:template match=x:text xmlns:x=http://www.w3.org/1999/xhtml;
   textarea name=@namexsl:copy-of select=* | text()//textarea
 /xsl:template

 But it won't help you.

 Try xhtml serializer, it comes with default sitemap.

 Vadim

  I tried copying the xml serializer component in
  map:serializers, renaming it xhtml and changing the mime-type to
  text/html, but the browser wouldn't render it.
 
  (Along a similar line, I was trying to use jTidy to turn html into
  xhtml, in case the user didn't enter well-formed xml. But I'm dealing
  with html fragments and jTidy kept wraping everything in htmlbody,
  etc...)
 
  Any ideas?
 
  Thanks,
 Justin
 =

 -
 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: Problems with SQLTransformer

2002-08-09 Thread KOZLOV Roman

Hi,

Could you try to add to your xsl a template for the root node like this:
xsl:template match=/
xsl:apply-templates/
/xsl:template

or just modify the template for rowset like this:
xsl:template match=/rowset
xsl:apply-templates/
/xsl:template

Roman

Albert Cervera Areny wrote:

 Hi,

 This is what I receive after the SQLTransform when I look it through the
 browser (option view source code)

 ?xml version=1.0 encoding=UTF-8?
 rowset
 row
 id081778/id
 role/
 nomname/nom
 passwdpaswd/passwd
 programaprogname/programa
 /row
 /rowset

 After the XSLTransform, the browser gives an error (because no initial tag
 in the xml file) and if I look at the source code of the page I see:

 ?xml version=1.0 encoding=UTF-8?

 081778namepassdprogname

 About the usuaris.xsl it is quite simple:

 ?xml version=1.0 encoding=iso-8859-1?

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

 xsl:template match=rowset
 xsl:apply-templates/
 /xsl:template

 xsl:template match=row
 authentication
 IDxsl:value-of select=id//ID
 rolexsl:value-of select=role//role
 data
 xsl:copy-of select=nom/
 xsl:copy-of select=programa/
 xsl:copy-of select=instruccions/
 /data
 /authentication
 /xsl:template
 /xsl:stylesheet

  Your step a) makes it sound like this has nothing to do with SQL
  transformer - that's the step that works unless I misunderstand you.
  When you say you see only data and no xml tags in the browser that
  sounds like a common non-problem I see all the time.  A few questions:
  1) Are the tags there when you do View Source in your browser?
  2) When in e) you say modifications have no effect do you mean that if
  you literally re-arrange or remove items from the final output those
  changes are not reflected?

 I mean that if instead of the above code I put the following for usuaris.xsl:
 ?xml version=1.0 encoding=iso-8859-1?

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

 Or

 ?xml version=1.0 encoding=iso-8859-1?

 xsl:stylesheet version=1.0
 xmlns:xsl=http://www.w3.org/1999/XSL/Transform;
 xsl:template match=rowset
hello
 /xsl:template
 /xsl:stylesheet

 The output is exactly the same!

  3) Have you ensured that any namespaces in use are not the problem? (the
  xsl is looking for foo but is finding ns:foo ?)
 
  Geoff Howard
 
  -Original Message-
  From: Albert Cervera Areny [mailto:[EMAIL PROTECTED]]
  Sent: Friday, August 09, 2002 10:01 AM
  To: [EMAIL PROTECTED]
  Subject: Problems with SQLTransformer
 
 
  Hi,
I start a new thread about it because the problem deserves
  this and I'm
  desperate ;-)
 
  map:generate src=docs/consulta.xml/
  map:transform type=sql
map:parameter name=use-connection value=cocoon/
  /map:transform
  map:transform src=stylesheets/usuaris.xsl/
  map:serialize type=xml/
 
  Looking at the source code of the generated xml with the browser I see
  only data no xml tags. Only the initial one: ?xml 
  I've been making some changes and it seems like after the
  SQLTransform I
  can't put a XSLTransform. I've tried the following things:
 a) Take off the XSL transform and the result is correct.
  The data I get
  can be processed with xalan and usuaris.xsl and I get a new
  well formed
  XML file.
 b) Change the name of usuaris.xsl (just in case I was modifing the
  wrong one) and it gives an error as cocoon can't find the file.
 c) Leave usuaris.xsl empty and It gives an error.
 d) Only leave the initial and final xsl:stylesheet tags
  and the output
  is the same.
 e) Various modifications in the xsl file but does not seem
  to affect to
  the output unless it is bad formed, then it gives an error.
  So the file
  is processed but incorrectly?
 
  I don't know if it might be a bug or I'm really doing something very
  wrong, but it should be pretty stright forward, shouldn't it?
 
  Well... thanks for your patience ;-)
 
 
   Thanks! It worked without problems!
  
   But of  course I couldn't wait until having another problem ;-) The
  thing is that I'm trying to make this work:
  
   sitemap.xmap:
  
   map:generate src=docs/usuaris.xml/
   map:transform src=stylesheets/usuaris.xsl
   map:parameter name=use-request-parameters value=true/
   /map:transform
   map:transform type=sql
   map:parameter name=use-connection value=cocoon/
   /map:transform
   map:transform src=stylesheets/usuaris.xsl/
   map:serialize type=xml/
  
   While debugging I commented the last transform and data arrives as I
  expect. In fact, I save the xml generated file with the browser and
  process it with xalan using the usuaris.xsl and it works!
  But if I use
   this transform in the sitemap I get all the fields returned
  but without
   any XML tags. (It should return as xalan all the 

Workaround against i18n(2.0.1) bug (divided buffered keys)

2002-07-02 Thread KOZLOV Roman

Hello,

It's just concerning i18n transformer in Cocoon 2.0.1.
There is known bug of i18n related to untranslated-text because of
keys divided by parser.
It seems that using concat function for concatenation of empty string
and a key in construction like
i18n:textxsl:value-of select=concat('',LABEL)//i18n:text
helps to avoid such a key dividing.

Could someone, who is more familiar with these issues confirm that this
workaround could help to avoid the bug or it just decrease probability
of keys dividing?

Thank you in advance,
Roman


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




SUMMARY: Re: Workaround against i18n(2.0.1) bug (divided buffered keys)

2002-07-02 Thread KOZLOV Roman

Konstantin, thank you for the reply.

Problem: bug of i18n in Cocoon 2.0.1 related to untranslated-text because of
keys divided by parser.
Suggested workaround (not confirmed):
It seems that using concat function for concatenation of empty string and a
key in construction like i18n:textxsl:value-of
select=concat('',LABEL)//i18n:text helps to avoid such a key dividing.

Solution: upgrade of Cocoon 2.0.1 up to fixed CVS version (see below).

Piroumian Konstantin wrote:

  From: Piroumian Konstantin [mailto:[EMAIL PROTECTED]]
   From: KOZLOV Roman [mailto:[EMAIL PROTECTED]]
 ...
   Could someone, who is more familiar with these issues confirm
   that this
   workaround could help to avoid the bug or it just decrease
  probability
   of keys dividing?
 
  Just get the newer version. There were some other changes
  since 2.0, but you
  can use the CVS revision history to get the needed version.
  (I'd point you
  to the needed version, but have problems accessing CVS currently).

 Here is the link to the fixed version:
 http://63.251.56.143/viewcvs.cgi/xml-cocoon2/src/java/org/apache/cocoon/tran
 sformation/I18nTransformer.java?rev=1.12content-type=text/vnd.viewcvs-marku
 p

 
  Konstantin
 
  
   Thank you in advance,
   Roman
  


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

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




cocoon xternal parametrization

2002-07-01 Thread KOZLOV Roman

Hello,

Is it possible to externally parametrize sitemap ?

Problem is : there is external (to cocoon application) storage of xml
and non-xml data located in same filesystem. Currently it's referenced
in sitemap by
specifying relative path (from sitemap.xmap file to storage) and the
references are quite numerous. So it is not flexible in case the storage
location
changes.
The final goal is to customize application settings without interfering
the sitemap.xmap file, changing one line in some other file
(xml/property/any
other). So, is there a way to specify parameter to sitemap externally to
use it like {1} or {STORAGE_PATH}etc. Via properties of cocoon , via
sitemap/xconf
file details?

Thank You in advance



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




SUMMARY: Re: cocoon xternal parametrization

2002-07-01 Thread KOZLOV Roman

Unfortunately it's not applicable to c2.0.1 I am using (for stability
reasons).

Christian Haul wrote:

 On 01.Jul.2002 -- 02:16 PM, KOZLOV Roman wrote:
  Hello,
 
  Is it possible to externally parametrize sitemap ?
 
  Problem is : there is external (to cocoon application) storage of xml
  and non-xml data located in same filesystem. Currently it's referenced
  in sitemap by
  specifying relative path (from sitemap.xmap file to storage) and the
  references are quite numerous. So it is not flexible in case the storage
  location
  changes.
  The final goal is to customize application settings without interfering
  the sitemap.xmap file, changing one line in some other file
  (xml/property/any
  other). So, is there a way to specify parameter to sitemap externally to
  use it like {1} or {STORAGE_PATH}etc. Via properties of cocoon , via
  sitemap/xconf
  file details?

 In CVS HEAD there's support for using InputModules directly from
 sitemap(*) using a rather similar syntax {module-name:parameter} You
 could now implement a component implementing the
 o.a.c.c.modules.InputModule interface to access these parameters.
 This interface is very simple and implementing it should be trivial.

 (*) only with the interpreted sitemap aka treeprocessor

 In 2.0.[23] InputModules exists in the scratchpad area, but the
 sitemap syntax mentioned is not available.

 Chris.

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

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

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

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


-
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: null pointer passed as base exception

2002-06-28 Thread KOZLOV Roman

Hello Leona,

Where do you define {1}, {3} and {4} in your pipeline?
IMO it should be like this:

map:match pattern=matrix
  map:generate src=gs.xml/
  map:transform src=gs.xsl
  map:parameter name=use-request-parameters value=true/
  map:parameter name=pagename value=matrix/
  map:parameter name=playerID value=123/
  /map:transform
  map:transform src=default-html.xsl/
  map:serialize type=html/
/map:match

Here you say to transformer to use request parameters by setting
use-request-parameters to true.
Then in your xsl you can get parameters' values by means of the following
top-level elements:
xsl:param name=dealID/
xsl:param name=matrixfiledefault_value/xsl:param
...
and then you can use them as variables, like $dealID.

PS: It seems that in this case you need not lines with extra pagename and
playerID definition in your sitemap.

Best regards,
Roman

Leona Slepetis wrote:

 Hi All,

 I have part of  a pipeline that looks like this:

 map:match pattern=matrix
   map:generate src=gs.xml/
   map:transform src=gs.xsl
 map:parameter name=pagename value=matrix/
 map:parameter name=dealID value={1}/
 map:parameter name=playerID value=123/
 map:parameter name=matrixfile value={3}/
 map:parameter name=projectname value={4}/
   /map:transform
   map:transform src=default-html.xsl/
   map:serialize type=html/
 /map:match

 In gs.xml I have:

 application
   page name=matrix/
 !-- some other stuff that doesn't matter in this example --
 /application

 In gs.xsl I have:

   xsl:template match=application
 xsl:if test=not($pagename)
   xsl:apply-templates select=page[@name='default']/
 /xsl:if
 xsl:if test=$pagename
   xsl:apply-templates select=page[@name=$pagename]/
 /xsl:if
   /xsl:template

 And default-html.xsl has:

   xsl:template match=page
 html
   head
 titletitle/title
   /head
   body
 xsl:apply-templates/
   /body
 /html
   /xsl:template

 I get to it by calling
 http://localhost:8080/GS/matrix?dealID=1001playerID=matrixfile=file:///D:/
 matrix.xmlprojectname=new

 When I run it, the following error occurs:
 Could not read resource file:/D:/tomcat/webapps/GS/gs.xml

 org.apache.cocoon.ProcessingException: Could not read resource
 file:/D:/tomcat/webapps/GorillaStation/gs.xml: java.lang.RuntimeException:
 java.lang.IllegalArgumentException: Null pointer passed as base

 One thing I notice is that playerID is not set to the value '123'. Why is
 this?
 The other thing is that if I take outmap:parameter name=pagename
 value=matrix/  from the pipeline it works
 according to the default logic in xsl:application.

 There doesn't appear to be anything wrong with gs.xml; it was working under
 C1.
 Other pipeline segments using the parameter pagename work just fine, such
 as:

 map:match pattern=summary
   map:generate src=gs.xml/
   map:transform src=gs.xsl
 map:parameter name=pagename value=summary/
   /map:transform
   map:transform src=default-html.xsl/
   map:serialize type=html/
 /map:match

 Can anyone give me a clue as to what is wrong?

 Thanks very much,
 Leona

 -
 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: (possible context problem) after moving application out from Cocoon tree

2002-06-27 Thread KOZLOV Roman

Hi Andrei,

Try cocoon:// (to get access via root sitemap) or cocoon:/ (for current sitemap) 
instead of context://.

Roman

Andrei Svirida wrote:

 Hello Cocooners,

 I have a following problem : i had a cocoon application running at Cocoon 
Deployment Root/testapp and
 everything worked fine.

 After moving the application to c:\testapp i updated the entry in my
 main sitemap.xmap to
 
 map:match pattern=mmservicearea/**
   map:mount reload-method=synchron check-reload=yes  
src=file:///c:/testapp uri-prefix=mmservicearea//
 /map:match
 ---

 Now i get an error
 ---
 java.lang.RuntimeException: testapp/docs/forms/login-form.xml could not be found. 
(possible context problem)
 ---

 I have some form validation code in my application wich uses
 form descriptor in c:\testapp\docs\forms\form1.xml
 and i reference to this descriptor with
 --
 map:parameter name=descriptor value=context://testapp/docs/forms/form1.xml/
 --.

 Its obvious that this code causes the error.

 Is there some way to solve this problem other then saying:
 --
 map:parameter name=descriptor value=file:c://testapp/docs/forms/form1.xml/
 -- ?

 I would greatly appreciate any tip

 --
 Andrei Svirida, Projekte  Entwicklung
 MIDRAY GmbH - a debitel company
 Phone:  +49.221.8884 435
 Fax:+49.221.8884 455

 http://www.midray.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: set up pipeline for pdf file

2002-06-25 Thread KOZLOV Roman

Hi,

IMHO, this should work without serializer (for already prepared pdf). It
is necessary just to check path
to the source. What is appeared in a browser? What is in log files?

Roman

Abhishek Goel wrote:

 hi,
  i think for this you have to use FOPserializer and then you should define that 
serializer in your
 pipeline.
 Hope this will work.
 Regards
 Abhishek Goel

 Philipp BÃñem wrote:

  hi,
 
  does anyone know, how to define a pipline for opening pdf s beeing stored
  under cocoon.
 
  i want enable people to upload files to my server, under cocoon.
 
  problem is, that i cant find a hint how to open files, within my cocoon
  directory, that are not xml, or similar.
 
  i tried it with the pipeline:
 
  map:match pattern=upload-dir/hello.pdf
  map:read mime-type=application/pdf 
src=upload-dir/hello.pdf/
  /map:match
 
  which doesnt work.
 
  -
  Please check that your question  has not already been answered in the
  FAQ before posting. http://xml.apache.org/cocoon/faq/index.html
 
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail:   [EMAIL PROTECTED]

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

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

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

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




XMLizable from DOM example needed

2002-06-21 Thread KOZLOV Roman

Hi,

Could somebody share an example of XMLizable object implementation
initialized by org.w3c.dom.Document for xsp.

Thank you in advance.

Roman


-
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: Parameters, their stack and cocoon: protocol....

2002-06-18 Thread KOZLOV Roman

Hi,

What is {2} in this case? It seems that you can use {1} because there is one *
only.

Roman

Per Kreipke wrote:

 This is a two part question.

 - If I call another pipeline with an XSP file using the cocoon: protocol, it
 doesn't seem as if the caller's sitemap parameters are available to any XSP
 the called pipeline. Is that true? E.g.

   !-- Callee --
   map:match pattern=config
  map:generate src=config.xsp /
  map:serialize type=xml /
   /map:match

   !-- Caller --
   map:match pattern=*/foo
 map:generate src=cocoon:/config
   map:parameter name=client value={2} /
 /map:generate
   /map:match

 in config.xsp, I can't get the value of {client} through
 parameters.getParameter(client).

 - corollary: is the stack of parameters available to XSP file? Or is there a
 way of getting the parent of the parameters?

 Per

 -
 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: Character encoding problems with XSP/ESQL

2002-06-13 Thread KOZLOV Roman

Hi Andrew,

Did you set encodingiso-8859-1/encoding for serverpages generator also? Do you
also use some transformers?

Roman

Andrew Savory wrote:

 Hi,

 I'm having problems convincing Cocoon to display unusual characters (such
 as smart quotes, apostrophes) properly, despite having tried everything
 suggested on the list in recent weeks to fix this.

 My setup:

 - Cocoon 2.0.3-dev
 - Tomcat 4.0.1
 - Postgres 7.2
 - Linux

 The content is being pulled from the DB via an XSP. The same content
 displays fine when pulled from the DB with perl(!).

 I've tried:

 Setting encoding in sitemap serializers:
 encodingiso-8859-1/encoding

 Setting encoding in XSP files:
 ?xml version=1.0 encoding=iso-8859-1?

 Setting encoding in ESQL:
 esql:row-results
 esql:encodingiso-8859-1/esql:encoding

 Setting encoding in JDBC connector:
 jdbc
 charsetiso-8859-1/charset
 and
 dburljdbc:postgresql://localhost:5432/foo?charset=iso-8859-1/dburl

 Starting Tomcat with $CATALINA_OPTS set to '-Dfile.encoding=ISO8859_1'

 ... none of this has worked. I continually get a ? in the output HTML.

 HELP!

 Andrew.

 --
 Andrew SavoryEmail: [EMAIL PROTECTED]
 Managing Director  Tel:  +44 (0)870 741 6658
 Luminas Internet Applications  Fax:  +44 (0)700 598 1135
 This is not an official statement or order.Web:www.luminas.co.uk

 -
 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: Tomcat/cocoon encoding problem

2002-06-10 Thread KOZLOV Roman

Hi Michael,

Did you set the proper encoding for used cocoon's components
(generator, transformer and so on)? I imagine that serializer has it
because you wrote that the result XML encoding is ok. What about other
components?

Roman

Michael Mangeng wrote:

 That didn´t do it ;-( *searching* thanx anywaymike

  - Original Message -
  From: Jan Uyttenhove
  To: [EMAIL PROTECTED]
  Sent: Friday, June 07, 2002 5:30 PM
  Subject: RE: Tomcat/cocoon encoding problem
   Try to start the jvm (tomcat startup) with property
  -Dfile.encoding=ISO8859_1Maybe you should choose another
  encoding, I used ISO8859_1 to solve a similar problem with
  french characters.Hope this helps.Greetz,Janvisit us @
  http://www.xume.be

   -Original Message-
   From: Michael Mangeng
   [mailto:[EMAIL PROTECTED]]
   Sent: vrijdag 7 juni 2002 16:47
   To: [EMAIL PROTECTED]
   Subject: Tomcat/cocoon encoding problem

   Hi I´ve set the encoding of both the xsp and the
   xml serializer correctly. After i request the xml
   i get the right encoding - ISO-8859-1 in the ?xml
   ... ? tag but german umlaut´s like äöü are
   replaced by '?'. I´ve noticed the same problem
   when i use beans on my JSP Pages (without cocoon;
   only tomcat)(Using äöü on a jsp works - but as
   soon as i set the data in a bean and then request
   it back - i have äöü instead of the umlauts in my
   string). I´m using linux 2.4.17, jdk1.3.1, tomcat
   4.1.2alpha and cocoon2.0.2. So... Is there a
   anywhere a setting for the jvm, tomcat or cocoon
   that the umlauts are correctly displayed
   ? greetingsmike



-
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: Global variables

2002-06-10 Thread KOZLOV Roman

Hi,

Does the following example help?

 map:match pattern=myprint.pdf
   map:match type=host pattern=*
 map:act type=request
   map:generate src=mydata.xml/
   map:transform src=myxsl.xsl
   map:parameter name=filePath value=http://{../1}{context}/img/
   /map:transform
 /map:act
   /map:match
   map:serialize type=fo2pdf/
 /map:match

Here is the host matcher is used to get the host:port (here it is {../1}).
The request action is used to get a context /app-name (here it is {context} and 
for example for default cocoon installation it's value will be /cocoon).

PS: Used cocoon version is 2.01.

Roman

Christian Haul wrote:

 Frank Borkowsky wrote:

  Hi!
 
  My question is: Are there any other variables like {1}, {2} and {../1}
  ... with can be accessed in the sitemap through the bracket syntax?

 Actually, there are none. Not even the ones you mention. They depend on
 the use of certain sitemap components. The above are set e.g. by a
 wildcard matcher. {1} contains the first match, {2} the second c. If
 another component is nested, e.g. an action, access to the previous
 scope is required, hence the ../ in front of the number.

  Has anyone a complete list of these variables?

  From the above follows that such a list cannot exist. Look at the
 javadoc of the components used. BTW sitemap.log contains a list of all
 available variables at a given time i.e. whenever a new scope is entered
 or left.

  What we need is the servlet path as a parameter for the
  xsl-tranformer. Or Is XSP the solution?

 Currently, an action that sets this value is the only way to go. (You could add this 
information on a XSP as a tag, though.) Sylvain is working on making InputModules 
(o.a.c.components.modules.input) available inside the sitemap for HEAD. When that is 
available, you could write such a module that returns this information and use it 
like {mymodule:servlet-path}.

 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]


-
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: Tomcat/cocoon encoding problem

2002-06-10 Thread KOZLOV Roman

There is another solution (when using Tomcat) which is independent of a system
locale - to use default (UTF-8) encoding for cocoon's components and in
client's browser.
The main problem which I've faced implementing the UTF-8 solution is decoding
request parameters. However it is easy to fix it just using Tomcat's filters
(see
CATALINA_HOME\webapps\examples\WEB-INF\classes\filters\SetCharacterEncodingFilter.*).

Roman

Michael Mangeng wrote:

 Hi

 thanx for your help but i´ve already solved the problem with the help of Jan
 Uyttenhove.
 My locale settings on the linux box had to be changed too.

 I´ve written this points together: (hope they help if sombody get the same
 probs):

 -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
 How to use german umlauts on english *nix systems:

 Set *nix locale to de_AT (or de_DE):
 localedef -c -i de_AT -f ISO-8859-1 de_AT

 Set LANG (system environment var) to de_AT (or de_DE)
 export LANG='de_AT'

 Before starting Tomcat set:
 $CATALINA_OPTS to '-Dfile.encoding=ISO8859_1'

 sitemap.xmap:
 Use encodingISO-8859-1/encoding in the according (e.g. html)
 map:serializer tag.

 XML/XSP:
 Use: ?xml version=1.0 encoding=ISO-8859-1?
 -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --

 greetings
 mike
 - Original Message -
 From: KOZLOV Roman [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Monday, June 10, 2002 9:17 AM
 Subject: Re: Tomcat/cocoon encoding problem

  Hi Michael,
 
  Did you set the proper encoding for used cocoon's components
  (generator, transformer and so on)? I imagine that serializer has it
  because you wrote that the result XML encoding is ok. What about other
  components?
 
  Roman
 
  Michael Mangeng wrote:
 
   That didn´t do it ;-( *searching* thanx anywaymike
  
- Original Message -
From: Jan Uyttenhove
To: [EMAIL PROTECTED]
Sent: Friday, June 07, 2002 5:30 PM
Subject: RE: Tomcat/cocoon encoding problem
 Try to start the jvm (tomcat startup) with property
-Dfile.encoding=ISO8859_1Maybe you should choose another
encoding, I used ISO8859_1 to solve a similar problem with
french characters.Hope this helps.Greetz,Janvisit us @
http://www.xume.be
  
 -Original Message-
 From: Michael Mangeng
 [mailto:[EMAIL PROTECTED]]
 Sent: vrijdag 7 juni 2002 16:47
 To: [EMAIL PROTECTED]
 Subject: Tomcat/cocoon encoding problem
  
 Hi I´ve set the encoding of both the xsp and the
 xml serializer correctly. After i request the xml
 i get the right encoding - ISO-8859-1 in the ?xml
 ... ? tag but german umlaut´s like äöü are
 replaced by '?'. I´ve noticed the same problem
 when i use beans on my JSP Pages (without cocoon;
 only tomcat)(Using äöü on a jsp works - but as
 soon as i set the data in a bean and then request
 it back - i have äöü instead of the umlauts in my
 string). I´m using linux 2.4.17, jdk1.3.1, tomcat
 4.1.2alpha and cocoon2.0.2. So... Is there a
 anywhere a setting for the jvm, tomcat or cocoon
 that the umlauts are correctly displayed
 ? greetingsmike
  
 
 
  -
  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]




Re: Passing xmap parameters to xsp

2002-06-07 Thread KOZLOV Roman

Hi Daniel,

As well as there is predefined parameters variable try in your xsp:
xsp:exprparameters.getParameter(my-param)/xsp:expr

Roman

Vadim Gritsenko wrote:

 Daniel:

 Please remove line
   map:parameter name=use-request-parameters value=true/
 from the snippet below.

 Naquin:

 use-request-parameters parameter does not mean anything to serverpages
 generator. But it can mean something to your particular page...

 Regards,
 Vadim

 -Original Message-
 From: Naquin, Beth [mailto:[EMAIL PROTECTED]]
 Sent: Wednesday, June 05, 2002 5:33 PM
 To: '[EMAIL PROTECTED]'
 Subject: RE: Passing xmap parameters to xsp

 I am new to cocoon myself, so take this with a grain of salt:
 The sitemap error may be because you closed the map:generate / tag
 before you passed the parameter?
 Try something like:
 map:generate type=serverpages src=xsp/w3/index2.xsp
 map:parameter name=use-request-parameters value=true/
map:parameter name=SourcePage value=Index/
 /map:generate
 I don't know that the xsp page will automatically recognize $SourcePage
 as a parameter, but this might resolve the sitemap error.
 P.S.
 This approach works for me when I want to pass a parameter to a
 transformer and then use that parameter in my xsl stylesheet, but I have
 never done so with a generator.
 Good Luck,
 Beth

 -Original Message-
 From: daniel robinson [mailto:[EMAIL PROTECTED]]
 Sent: Wednesday, June 05, 2002 2:07 PM
 To: [EMAIL PROTECTED]
 Subject: Passing xmap parameters to xsp

 Ok, I've been struggling with this for hours.
 I want to set a parameter in my pipeline something like this:
  map:match pattern=index
 map:generate type=serverpages src=xsp/w3/index2.xsp/
map:parameter name=SourcePage value=Index/
 
 Set it here
map:transform src=stylesheets/w3/index2.xsl/
  map:serialize/
   /map:match
 and then use it in index2.xsp.  I tried this:
 ...snip...
  esql:execute-query
esql:query
 select * from Story
  where
 ProjectName = 'MyProj'
 and
 PageName = '$SourcePage'   - use it
 here
 ...snip...

 Please help.  I've been looking all through the doco - examples etc.
 When I
 try the above I get an exception when Cocoon attempts to recompile the
 sitemap.
 Thanks,
 Dan

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




Re: slow xalan transformation

2002-06-07 Thread KOZLOV Roman

It's possible to import/read documents encoded in ISO-8859-1 (I put french
accented characters) and in Windows-1251 (russian) into Xindice db. So I think
it is also possible for the latin2 documents - just set proper system locale and
xml encoding attribute. However it is not possible to use such characters in
xpath expressions for queries (queries containing ASCII characters only works
fine even results contain different languages - it is UTF-8 always as well as
inside Xindice). I've read that it is because of CORBA restrictions.

Roman

Adrian Petru Dimulescu wrote:

 ... I am also having trouble with XIndice in what concerns the specific
 ISO-8859-2 characters. apparently, importing such a latin2 document into
 XIndice makes me lose those characters...

 On Monday 03 June 2002 15:47, KOZLOV Roman wrote:
  Unfortunatelly, Xindice has a very hard restriction on queries: xpath
  expression cann't contain non-ASCII characters.
 
  Roman
 
  Adrian Petru Dimulescu wrote:
I installed today a cvs cocoon on a Tomcat 4.0.3 / jdk 1.3.1_01 and it
works fine if it weren't for the slow xslt transformation.
  
   A bit late as self-response but here it goes: extracting sub-trees with
   XSLT is not really a sign of genius as long as tools as Xindice exist.
  
   so a native xml database solves the problem -- two second-average time
   per chapter extraction --- i'll play some more with indexes maybe it can
   get even better.
  
   and as if it weren't enough, XIndice is just perfectly integrated into
   Cocoon...
  
   -
   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]




Re: XPath and Xalan

2002-06-07 Thread KOZLOV Roman

David,

It seems that Judith meant misspelling with items.../item tags (the
closing one is incorrect) and /rowset tag (it has no closing bracket
). After fixing this I was able to apply the following XSL by means of
default cocoon's transformer:
. . .
xsl:template match=search
 html
 xsl:apply-templates select=items/rowset /
 /html
/xsl:template

xsl:template name=items-list match=items/rowset
 inside:
 xsl:value-of select=./
/xsl:template
/xsl:stylesheet

And the result is the following:

?xml version=1.0 encoding=UTF-8?
 html xmlns:fo=http://www.w3.org/1999/XSL/Format;
 inside:
   Some data
 /html

Best regards.
Roman

David LAGARDERE wrote:

 For Judith : I have the xml  xsl prefix, so it
 doesn't come from here. Thanks for your test.

 For Luca : I don't use any namespace name.

 But I didn't precised that my XSL stylesheet
 is applied by Cocoon default XSLT Transformer. Could
 it help ?

 Regards,

 David LAGARDERE

 ___
 Do You Yahoo!? -- Une adresse @yahoo.fr gratuite et en français !
 Yahoo! Mail : http://fr.mail.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]




Re: change from UTF-8 to iso-8859-1

2002-06-04 Thread KOZLOV Roman

Hi Christoph,

Set encodingISO-8859-1/encoding for serialiser in sitemap.
By the way, you can use such characters with UTF-8 also. It's just necessary
to store the XML document as Unicode.

Best regards
Roman

Christoph Stocker wrote:

 hi!

 i use cocoon2.0.2 with weblogic6.0sp2 on win2000

 i want to change the META http-equiv=Content-Type content=text/html;
 charset=UTF-8
 tag to   META http-equiv=Content-Type content=text/html;
 charset=iso-8859-1

 i want to use ö,ü,ä and ß

 thanks
 greetings, chros

 -
 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: CDATA output / Server Upgrage

2002-06-03 Thread KOZLOV Roman

You could try xsl:text with disable-output-escaping attribute:
xsl:text disable-output-escaping=yes![CDATA[ some characters like 
...]]/xsl:text

Roman

George Pieri wrote:

 In alot of our xsl stylesheets we wrap xml and
 javascrip within !CDATA[    ]] tags
 so that it is not parsed.

 This has worked well for us with the output being
 delivered successfully.

 Using the new version of our web server, Weblogic 7.0,
 this appears no longer to work and our CDATA sections
 get interperted and changed to lt;  x gt; tags !?!

 What could be affecting this. Any ideas ?

 e.g.
 ---
 xsl code
 
  maintag/maintag
  ![CDATA[maintag/maintag]]

 -
 output
 
 maintag/maintag
 lt;maintaggt;lt;/maintaggt;

 --
 output in previous version of web server
 
 maintag/maintag
 maintag/maintag

 -
 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: slow xalan transformation

2002-06-03 Thread KOZLOV Roman

Unfortunatelly, Xindice has a very hard restriction on queries: xpath expression
cann't contain non-ASCII characters.

Roman

Adrian Petru Dimulescu wrote:

  I installed today a cvs cocoon on a Tomcat 4.0.3 / jdk 1.3.1_01 and it
  works fine if it weren't for the slow xslt transformation.

 A bit late as self-response but here it goes: extracting sub-trees with XSLT
 is not really a sign of genius as long as tools as Xindice exist.

 so a native xml database solves the problem -- two second-average time per
 chapter extraction --- i'll play some more with indexes maybe it can get even
 better.

 and as if it weren't enough, XIndice is just perfectly integrated into
 Cocoon...

 -
 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: cocoon://file.xsl as a src attribute for xsl transformer throwseception :(

2002-05-30 Thread KOZLOV Roman

Hello Fabien,

Why do you miss xsl/ in the second example?

Roman

TREGAN Fabien wrote:

 Hi.

 I've got twoo cocoon app :

 Cocoon
  +-SDNGUI
  +-CAW

 -SDNGUI is a general UI app, that will mainly serv XSL, JS and CSS for every
 other apps.
 -CAW is an app wich wants to use SDNGUI

 -When I call http://localhost/cocoon/ActionGroup.xsl, I see my .XSL file
 allright. (I use a reader with txt/xml mime-type)

 -When, in caw's sitemap I use :

  map:match pattern=action
 map:generate src=ActionGroup.xml /
 map:transform src=context://sdngui/xsl/ActionGroup.xsl /
 map:serialize name=xml /
  /map:match

 It works well, but if I use :

  map:match pattern=action
 map:generate src=ActionGroup.xml /
 map:transform src=cocoon://sdngui/ActionGroup.xsl /
 map:serialize name=xml /
  /map:match

 Here is an error (see bellow)

 Is there an explaination ? A workaround ?

 thanks, fabien.

 The error :

 Cocoon 2 - Internal server error

 
 

 type fatal

 message Failed to execute pipeline.

 description org.apache.cocoon.ProcessingException: Failed to execute
 pipeline.: org.apache.cocoon.ProcessingException: Unable to get transformer
 handler for cocoon://sdngui/DropDownMenu.xsl:
 org.apache.avalon.excalibur.xml.xslt.XSLTProcessorException: Exception in
 creating Transform Handler

 sender org.apache.cocoon.servlet.CocoonServlet

 source Cocoon servlet

 stack-trace

 org.apache.cocoon.ProcessingException: Failed to execute pipeline.:
 org.apache.cocoon.ProcessingException: Unable to get transformer handler for
 cocoon://sdngui/DropDownMenu.xsl:
 org.apache.avalon.excalibur.xml.xslt.XSLTProcessorException: Exception in
 creating Transform Handler
 at
 org.apache.cocoon.components.pipeline.CachingEventPipeline.process(CachingEv
 entPipeline.java:223)
 at
 org.apache.cocoon.components.pipeline.CachingStreamPipeline.process(CachingS
 treamPipeline.java:399)
 at
 org.apache.cocoon.components.treeprocessor.sitemap.SerializeNode.invoke(Seri
 alizeNode.java:153)
 at
 org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invo
 keNodes(AbstractParentProcessingNode.java:83)
 at
 org.apache.cocoon.components.treeprocessor.sitemap.PreparableMatchNode.invok
 e(PreparableMatchNode.java:157)
 at
 org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invo
 keNodes(AbstractParentProcessingNode.java:107)
 at
 org.apache.cocoon.components.treeprocessor.sitemap.PipelineNode.invoke(Pipel
 ineNode.java:138)
 at
 org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invo
 keNodes(AbstractParentProcessingNode.java:107)
 at
 org.apache.cocoon.components.treeprocessor.sitemap.PipelinesNode.invoke(Pipe
 linesNode.java:142)
 at
 org.apache.cocoon.components.treeprocessor.TreeProcessor.process(TreeProcess
 or.java:318)
 at
 org.apache.cocoon.components.treeprocessor.TreeProcessor.process(TreeProcess
 or.java:289)
 at
 org.apache.cocoon.components.treeprocessor.sitemap.MountNode.invoke(MountNod
 e.java:128)
 at
 org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invo
 keNodes(AbstractParentProcessingNode.java:83)
 at
 org.apache.cocoon.components.treeprocessor.sitemap.PreparableMatchNode.invok
 e(PreparableMatchNode.java:157)
 at
 org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invo
 keNodes(AbstractParentProcessingNode.java:107)
 at
 org.apache.cocoon.components.treeprocessor.sitemap.PipelineNode.invoke(Pipel
 ineNode.java:138)
 at
 org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invo
 keNodes(AbstractParentProcessingNode.java:107)
 at
 org.apache.cocoon.components.treeprocessor.sitemap.PipelinesNode.invoke(Pipe
 linesNode.java:142)
 at
 org.apache.cocoon.components.treeprocessor.TreeProcessor.process(TreeProcess
 or.java:318)
 at
 org.apache.cocoon.components.treeprocessor.TreeProcessor.process(TreeProcess
 or.java:289)
 at org.apache.cocoon.Cocoon.process(Cocoon.java:591)
 at
 org.apache.cocoon.servlet.CocoonServlet.service(CocoonServlet.java:1002)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
 at
 org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application
 FilterChain.java:247)
 at
 org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh
 ain.java:193)
 at
 org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.ja
 va:243)
 at
 org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
 66)
 at
 org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
 at
 

Re: Include external javascript file

2002-05-29 Thread KOZLOV Roman

Hi,

XSL transformer should not of course show the code from .js file in the result html. 
Moreover
it usually transforms element with empty content to one tag. For example, in your case 
the
script .../script should be transformed to one tag script .../. So there is 
could be the
problem because the script .../ is treated in HTML as unclosed (at least for IE5.0). 
I had
to change my XSL to save the closing tag to the following:

script ///script

Then the comment // will preserve the script element from transforming to one tag 
element.

Best regards.
Roman

Bert Van Kets wrote:

 You must add a pipeline for every filetype you wish to call in your
 application.

 Put your *.js files in the js directory and add the following to your
 pipelines

map:match pattern=*.js
  map:read src=js/{1}.js mime-type=text/javascript/
/map:match

 Now you can call any external javascript file directly, but it will be
 served from the js directory.
 Adjust to your liking.
 Bert

 At 12:54 28/05/2002 -0700, you wrote:

 A cocoon newbie question:
 
 I am trying to include a javascript function from an external .js file
 into my xsl stylesheet.
 
 I have the following in the xsl stylesheet:
 
 head
 ...
 script  src=cold_reverse_script.js language=javascript /script
 
 /head
 
 The file cold_reverse_script.js is in the same directory as the xsl
 stylesheet  contains javascript code for a single function:
 
 
-
 
 function cold_reverse_search_criteria() {
 
 javascript code .
 
  }
 --
 
 
 I have this entry in my sitemap:
 map:match pattern=**.js
  map:read src={1}.js mime-type=text/jscript/
 /map:match
 
 (I've also tried text/javascript).
 
 However, this does not work.  I get error on page whenever I try to
 access the javascript function from the .js file.   When I look at the
 source for the HTML page in the browser, it shows
 script  src=cold_reverse_script.js language=javascript /script
 just as I've written it in the xsl file, but does not show the code that
 is in the .js file.
 
 If I put the javascript function code directly into the script/script
 tags, it works fine, but I'd like to use the external .js file.
 
 Any help would be greatly appreciated.
 
 Thanks,
 
 Beth Naquin
 SAGEM MORPHO Inc.
 1145 Broadway Plaza STE 200
 Tacoma, WA 98402
 
 253-597-8245

 -
 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: relative path

2002-05-28 Thread KOZLOV Roman

Hi Chris,

The following is working for me:
xsl:include href=show_includes.xsl/

So you could try:
xsl:import href=elements.xsl/

Best regards
Roman

Christoph Stocker wrote:

 hi!

 i use: cocoon 2.0.2 on winXP and tomcat 4.0.1

 i have a stylesheet in cocoon which refers to other styleseets like --
 xsl:import href=D:/Develop/Apache Tomcat
 4.0/webapps/cocoon/onlinereg/elements.xsl/

 now i want to run it on a server and have the problem of absolute
 pathes. how do
 i set there a relative path to my elements.xsl?

 i tried such things like: xsl:import href=./elements.xsl/ , but it
 doesn't work.

 THANKS
 greetings, chris

 -
 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: relative path

2002-05-28 Thread KOZLOV Roman

Chris,

Do you have a pipeline matching to css in your sitemap? It should be like
this:
   map:match pattern=*.css
 map:read src={1}.css mime-type=text/css/
   /map:match

Roman

Christoph Stocker wrote:

 i already tried this.

 it doesn't work - and i don't know why??

  mfg,
 ---
  Christoph Stocker
  Pramergasse 29/14, 1090 Wien, Austria
  mobile  +43-699-1722 5506
  e-mail  [EMAIL PROTECTED]
 ---

 -Original Message-
 From: Atul Gulve [mailto:[EMAIL PROTECTED]]
 Sent: Dienstag, 28. Mai 2002 14:29
 To: [EMAIL PROTECTED]
 Subject: RE: relative path

 Instead of using xsl:variable/, why don't you use something like
 this?

 link rel=stylesheet href=../css/general.css/

 atul

 From: Christoph Stocker [EMAIL PROTECTED]
 Reply-To: [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Subject: RE: relative path
 Date: Tue, 28 May 2002 14:05:53 +0200

 ok, thats it - thanks!

 but i have the same problem with the following:

 xsl:variable name=stylesheet3 select='D:/Develop/Apache Tomcat
 4.0/webapps/cocoon/onlinereg/css/home.css'/

   mfg,
 ---
   Christoph Stocker
   Pramergasse 29/14, 1090 Wien, Austria
   mobile  +43-699-1722 5506
   e-mail  [EMAIL PROTECTED]
 ---

 -Original Message-
 From: Atul Gulve [mailto:[EMAIL PROTECTED]]
 Sent: Dienstag, 28. Mai 2002 13:58
 To: [EMAIL PROTECTED]
 Subject: Re: relative path

 Hi

 Have you checked with

 xsl:import href=elements.xsl/

 It works. You can give relative paths.

 Atul

 From: Christoph Stocker [EMAIL PROTECTED]
 Reply-To: [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Subject: relative path
 Date: Tue, 28 May 2002 13:39:55 +0200

 hi!

 i use: cocoon 2.0.2 on winXP and tomcat 4.0.1

 i have a stylesheet in cocoon which refers to other styleseets like --
 xsl:import href=D:/Develop/Apache Tomcat
 4.0/webapps/cocoon/onlinereg/elements.xsl/

 now i want to run it on a server and have the problem of absolute
 pathes. how do i set there a relative path to my elements.xsl?

 i tried such things like: xsl:import href=./elements.xsl/ , but it
 doesn't work.

 THANKS
 greetings, chris

 -
 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 and receive Hotmail on your mobile device: http://mobile.msn.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]

 _
 Join the world's largest e-mail service with MSN Hotmail.
 http://www.hotmail.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]


-
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: XML in actions

2002-05-24 Thread KOZLOV Roman

Hello Chitharanjan,

Could you, please, tell why you don't advise here to store data in
session? What problems do you see?

Thank you.
Roman

Chitharanjan Das wrote:

 These are the following options

   1. Store the XML in the request object (request.setAttribute(“xml”,
  xmlStr);
   2. return the XML in the hashmap. This xml can be accesses as
  sitemap parameters in XSP.
   3. Also can be stored in Session (not advised)…

 Regds,

 Chiths

 -Original Message-
 From: Mike Ash [mailto:[EMAIL PROTECTED]]
 Sent:Thursday, May 23, 200212:02 PM
 To: '[EMAIL PROTECTED]'
 Subject: XML in actions

 I need something (action/generator) that talks to a backend system to
 get xml.  The problem is I can't use a generator because I also want
 to use the xsp generator in the same pipeline.  So how can I get an
 action to return xml that is available to xsp as xml.

 Here is a sitemap example of what I was looking for

   map:pipeline

 map:match type=request-parameter pattern=login-test
   map:act type=ValidateUser 
 map:act type=GetXml 
   map:generate type=serverpages src=xsp/home.xsp/
 /map:act
 /map:act
   map:transform src=xsl/simple.xsl/
   map:serialize/
 /map:match
   /map:pipeline



-
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: ResourceExistsAction problem

2002-05-20 Thread KOZLOV Roman

Hi Ivan,

Use {../1}, because you need the match's level sitemap and not action's
one.

Roman

Ivan Luzyanin wrote:

 Hello all!

 I've got problem using ResourceExistsAction with context path

 $COCOON/site/sitemap.xmap
 map:match pattern=content-**.xsp
  map:act type=resource-exists
map:parameter name=url value=context://dynamic/{1}.xsp/
map:generate src=dynamic/{1}.xsp type=serverpages/
map:transform src=stylesheets/document2html.xsl/
map:serialize type=xhtml/
  /map:act
  map:generate src=static/system/notfound.xml/
  map:transform src=stylesheets/document2html.xsl/
  map:serialize/
 /map:match

 And i've got following error:

 org.apache.cocoon.ProcessingException:
 /usr/java/jakarta-tomcat-4.0.1/webapps/site/dynamic/.xsp (No such file
 or directory): java.io.FileNotFoundException

 Why dynamic/{1}.xsp become dynamic/.xsp ?

 Enviroment:
 RH 7.2
 Cocoon 2.0.1
 JDK 1.3.1_02b (Blackdown)

 -
 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: sitemap modifications go unnoticed

2002-05-20 Thread KOZLOV Roman

Hello Hans,

To ensure the sitemape has been recompiled remove the folder
D:\jakarta\jakarta-tomcat-4.0.4-b3\work\Standalone\localhost\cocoon-exp1.

Indeed, the modified sitemap.xmap will not be used if its file
modification time is earlier then for the previous sitemap.xmap (it
could be in Windows) and in this case compiled sitemap from cache will
be used.

Roman

[EMAIL PROTECTED] wrote:

 Hi!

 I' am a complete newbie and trying to work thru the IBM  developer
 works tutorial Introduction to Cocoon2.
 My problem is that after I edit the sitemap.xmap file the
 modifications are not noticed.

 The original error:

 --

 type fatal

 message Error in sitemap configuration :
 org.apache.coocon.transformation.TraxTransformer

 description
 org.apache.avalon.framework.configuration.ConfigurationException:
 Error in sitemap configuration :
 org.apache.coocon.transformation.TraxTransformer

 sender org.apache.cocoon.servlet.CocoonServlet

 source Cocoon servlet

 stack-trace

 org.apache.avalon.framework.configuration.ConfigurationException:
 Error in sitemap configuration :
 org.apache.coocon.transformation.TraxTransformer
 at
 
org.apache.cocoon.www.sitemap_xmap.configure(D:\jakarta\jakarta-tomcat-4.0.4-b3\work\Standalone\localhost\cocoon-exp1\cocoon-files\org/apache/cocoon/www\sitemap_xmap.java:151)

 at
 
org.apache.avalon.excalibur.component.DefaultComponentFactory.newInstance(DefaultComponentFactory.java:172)

 .

 
---.

 OK
 obviously a typo in my sitemap:
 it should read org.apache.cocoon.transformation.TraxTransformation
 I have changed that but I always get the same error again. Even after
 I stoped and restarted Tomcat. Even nonsense changes at the start of
 the file do show off.
 I looks to me that the sitemap was used to create some Java class but
 it never gets recompiled again (just a guess).

 In cocoon.xconf I have the entry:
 sitemap check-reload=yes file=sitemap.xmap logger=sitemap
 reload-method=synchron/

 I use Windows 2000, Tomcat 4.04b3, JDK 1.3.1_03 and Cocoon 2.0.2

 Many thanks,

 Hans


-
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: upgrading to Cocoon2 and debugging

2002-05-17 Thread KOZLOV Roman

Hello Edgar,

Did you write map prefix, like map:generate ?

Roman

Graaf, Edgar de (fin) wrote:

 Now I know, I things have changed. My sitemap doesn't work... first
 XMLDBCollection goes wrong, but that one is deprecated. Then when I comment
 that one out I get a message:

 No default type exists for 'generate' at
 file:/D:/Tomcat4/webapps/cocoon/bugtrack/sitemap.xmap:95:-1

 But I have a default, namely 'file'

 Regards

 Edgar

 -Oorspronkelijk bericht-
 Van: Graaf, Edgar de (fin) [mailto:[EMAIL PROTECTED]]
 Verzonden: vrijdag 17 mei 2002 9:07
 Aan: '[EMAIL PROTECTED]'
 Onderwerp: RE: upgrading to Cocoon2 and debugging

 Thanks Konstantin!
 But what I don't understand is if this is faster and better, why is it
 commented out? I didn't do that

 Regards,

 Edgar

 -Oorspronkelijk bericht-
 Van: Konstantin Piroumian [mailto:[EMAIL PROTECTED]]
 Verzonden: donderdag 16 mei 2002 13:19
 Aan: [EMAIL PROTECTED]
 Onderwerp: Re: upgrading to Cocoon2 and debugging

 From: Graaf, Edgar de (fin) [EMAIL PROTECTED]

  That I don't know because I never upgraded from C1. However when I adapt
 the
  sitemap while Cocoon is running it takes 10
  seconds at least before cocoon is ready and the nullpointerexception
  dissapears.

 I can't remember that I've experienced any NPE with the TreeProcessor
 sitemap engine. Check if you are using it and not the compiled version (see
 'sitemap' element in cocoon.xconf).

 Regards,
   Konstantin

 
  If there is nothing in the log or in your tomcat dos prompt do the
  following: call the url, wait 10 seconds (untill your processor calms
 down).
  Then reload
 
  -Oorspronkelijk bericht-
  Van: gorillacommunications [mailto:[EMAIL PROTECTED]]
  Verzonden: woensdag 15 mei 2002 22:54
  Aan: [EMAIL PROTECTED]
  Onderwerp: upgrading to Cocoon2 and debugging
 
 
  Hi all.
 
  I am upgrading an application from Cocoon1 to Cocoon2 and am
  having some problems. I get the error Exception in creating Transform
  Handler:
  java.lang.NullPointerException.
 
  1. I created a pipeline in sitemap.xmap, but are there any special things
 I
  must do to my XML and XSL files to upgrade?
 
  2. How do I see meaningful debugging info? I looked in the archive
  and think I have the settings correct in web.xml and logkit.xconf, but
  I see no info in any of the logs for this application (other applications
  dump output to the logs). At least Cocoon1 would write a message
  to the console telling me what the parser choked on (I read in
  the archive that this message is caused by an error in the XSL).
 
  Thanks for any help.
  Leona Slepetis
 
 
 
 
  -
  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]

 -
 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: XSP Function to get URL

2002-05-17 Thread KOZLOV Roman

What about xsp-request:get-uri/ (its from cocoon's samples, there it's used
with  as=xml and it's working at least in v2.0.1).

Roman

Graaf, Edgar de (fin) wrote:

 I also tried this and could not get the right function (get-request-url or
 something).
 Try
 xsp-request:get-scheme/://xsp-request:get-server-name/:xsp-request:get-
 server-port/xsp-request:get-servlet-path/

 Regards

 Edgar

 -Oorspronkelijk bericht-
 Van: Zack Angelo [mailto:[EMAIL PROTECTED]]
 Verzonden: vrijdag 17 mei 2002 5:52
 Aan: [EMAIL PROTECTED]
 Onderwerp: XSP Function to get URL

 Is there an XSP or Java class I can access that will give me the URL of
 the current page?

 TIA,
 Zack

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




Re: How to write '' in a Cocoon query

2002-05-14 Thread KOZLOV Roman

Hi Kurt,
Have you put semicolon (;) after lt?
Roman

Hahn Kurt (CHA) wrote:

 I'm trying to add this condition to a query(already functional):
 and OBJET.OBJ_SUPPRIME  'O'
 I couldn't even write a simple  (according to my book: lt), IE 5 won't
 open the file as soon as I insert the line...

 Please help..

 Kurt

 -
 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: Problem with SQLTransformer and Encoding

2002-05-07 Thread KOZLOV Roman

Hi Frank,

Did you check the result you get before transformation by sql.xsl? Perhaps it is
necessary to use attribute disable-output-escaping=yes in its elements.

Roman

Frank Ridderbusch wrote:

 Hi Cocooners,

 I'm having a problem with the encoding of a sql query from the SQLTransformer.

 Configuration is:

   Cocoon 2.0.3-dev from CVS
   IBM JDK 1.3
   Tomcat 3.3
   Oracle 8.1.7

 Instead of getting the wanted germans umlauts, I'm apparently getting UTF
 encoded characters (instead of ü or Uumlaut; I'm seeing Atilde;frac14;).

 I've looked at source code and see, that the encoding is set to 'ISO-8859-1'
 in the constructor of the SQLTransformer:

   ...
   this.format.put(OutputKeys.ENCODING, ISO-8859-1);
   ...

 I've configured the HTML serializer in the sitemap to use ISO-8859-1 like
 this:

   map:serializer name=html mime-type=text/html
   logger=sitemap.serializer.html
   src=org.apache.cocoon.serialization.HTMLSerializer
 encodingISO-8859-1/encoding
   /map:serializer

 My pipeline looks like this:

   map:match pattern=sql/who-is-who/*
 map:aggregate element=page
   map:part src={0}.xml/
   map:part element=sidebar src=sidebar.xml/
 /map:aggregate
 map:act type=request
   map:parameter name=parameters value=true/
   map:parameter name=default.department value=FSC EP SQ XS%/
   map:transform type=sql
 map:parameter name=use-connection value=projects/
 map:parameter name=department value={department}/
   /map:transform
   map:transform src=stylesheets/sql.xsl/
 /map:act
 map:serialize type=html/
   /map:match

 The XML file, which contains the query looks like this:

   ?xml version=1.0 encoding=ISO-8859-1?
   sql xmlns:sql=http://apache.org/cocoon/SQL/2.0;
 execute-query xmlns=http://apache.org/cocoon/SQL/2.0;
   query
 select * from mgmt_users
  where department like 'substitute-value sql:name=department/'
and (auth like '%chef%' or job_desc like 'Sek%')
  order by department, surname
   /query
 /execute-query
   /sql

 This basically works all just nicely except for the encoding. I've searched
 the archives and found a similar problem described for the LDAPTransformer.

 I think, I checked all the available documentation, but either I didn't find
 the relevant section to give me a hints or there is indeed a problem.

 Any opinions? Thanks.
 --
 Mit freundlichen Gruessen / Regards

 Frank Ridderbusch

 Fujitsu Siemens Computers, EP SQ XS1
 Heinz Nixdorf Ring, 33106 Paderborn, Germany
 Email: [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]




Re: xsp logicsheet

2002-05-06 Thread KOZLOV Roman

Hi,

Did you try to use apostrophs inside quotes? Something like this:
String temp = xsl:value-of select='name'/;

Best regards.
Roman

Bert Van Kets wrote:

 At 10:38 30/04/2002 -0300, you wrote:

 I guess it's
 
   String temp = xsl:value-of select=name/;
 
 or
 
   String temp = new String(xsl:value-of select=name/);
 
 Alejandro
 Tried it, doesn't work.  I guess it must be a bug.
 If I use
 String temp = xsl:value-of select=name/
 I get

 org.apache.cocoon.ProcessingException: Exception in creating Transform
 Handler: org.apache.cocoon.ProcessingException: Language Exception:
 org.apache.cocoon.components.language.LanguageException: Error compiling
 listCreateQuery_xsp:
 Line 252, column 23: unclosed character literal
 Line 252, column 22: illegal start of expression
 Line 278, column 6: unclosed character literal
 Line 278, column 4: illegal start of expression
 Line 0, column 0:
 4 errors

 The code snipet it refers to is

  String temp = 
  xspAttr.addAttribute(
,
select,
select,
CDATA,
name
  );

  this.contentHandler.startElement(
http://www.w3.org/1999/XSL/Transform;,
value-of,
xsl:value-of,
xspAttr
  );
  xspAttr.clear();

  this.contentHandler.endElement(
http://www.w3.org/1999/XSL/Transform;,
value-of,
xsl:value-of
  );

  ;

 As you can see the string is closed three commands down.  There is no way
 this can work.
 Is there another way to store the content of a node in a string?

 Bert

 BTW I'm using todays CVS

 -
 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: i18n transformer problem

2002-04-26 Thread KOZLOV Roman

Hello Konstantin,

Thank you for your reply. My configuration is Tomcat 4.0.1, Cocoon 2.0.1 with
its default parsers.

Roman

Konstantin Piroumian wrote:

 Hi

  Hello,
 
  Can someone help me to understand why i18n transformer divides key?

 This is the behavior of SAX parser. But I thought that I've fixed that. Are
 you using the latest version (either from 2.0.3 branch or HEAD)?

 This happens because SAX parser sometimes divides text into smaller chunks.
 I18nTransformer was changed to buffer the text to prevent incomplete keys.
 I'll check it, though, I've never seen this even with very long keys. Please
 tell me what is your configuration? What is your parser?

 --
 Konstantin

  Input XML contains the following line:
  i18n:textLNG_LUB_Consultation_Fournisseurs/i18n:text
 
  In messages files appropriate translation is present:
  message key=LNG_LUB_Consultation_FournisseursConsultation
  Fournisseurs/message
 
  However in a browser I get untranslated-text and in sitemap.log I see
  that the transformer divides the key (other keys are translated though):
 
  DEBUG   (2002-04-26) 11:08.38:250   [sitemap.transformer.i18n]
  (/bdl/providers) HttpProcessor[8080][1]/I18nTransformer:
  I18nTransformer: Starting i18n element: text
  DEBUG   (2002-04-26) 11:08.38:250   [sitemap.transformer.i18n]
  (/bdl/providers) HttpProcessor[8080][1]/I18nTransformer:
  I18nTransformer: Start i18n element: text
  DEBUG   (2002-04-26) 11:08.38:250   [sitemap.transformer.i18n]
  (/bdl/providers) HttpProcessor[8080][1]/I18nTransformer:
  I18nTransformer: i18n message text = 'LNG_LUB_Cons'
  DEBUG   (2002-04-26) 11:08.38:250   [sitemap.transformer.i18n]
  (/bdl/providers) HttpProcessor[8080][1]/XMLResourceBundle: messages:
  returning from cache: /catalogue/message[@key='LNG_LUB_Cons']
  DEBUG   (2002-04-26) 11:08.38:250   [sitemap.transformer.i18n]
  (/bdl/providers) HttpProcessor[8080][1]/XMLResourceBundle: messages:
  cache_not_found contains: /catalogue/message[@key='LNG_LUB_Cons']
  DEBUG   (2002-04-26) 11:08.38:260   [sitemap.transformer.i18n]
  (/bdl/providers) HttpProcessor[8080][1]/XMLResourceBundle: messages:
  returning from cache: /catalogue/message[@key='LNG_LUB_Cons']
  DEBUG   (2002-04-26) 11:08.38:260   [sitemap.transformer.i18n]
  (/bdl/providers) HttpProcessor[8080][1]/XMLResourceBundle: messages:
  cache_not_found contains: /catalogue/message[@key='LNG_LUB_Cons']
  DEBUG   (2002-04-26) 11:08.38:280   [sitemap.transformer.i18n]
  (/bdl/providers) HttpProcessor[8080][1]/XMLResourceBundle: messages:
  caching not_found: /catalogue/message[@key='LNG_LUB_Cons']
  DEBUG   (2002-04-26) 11:08.38:280   [sitemap.transformer.i18n]
  (/bdl/providers) HttpProcessor[8080][1]/XMLResourceBundle: messages:
  caching not_found: /catalogue/message[@key='LNG_LUB_Cons']
  DEBUG   (2002-04-26) 11:08.38:280   [sitemap.transformer.i18n]
  (/bdl/providers) HttpProcessor[8080][1]/I18nTransformer:
  I18nTransformer: i18n message text = 'ultation_Fournisseurs'
  DEBUG   (2002-04-26) 11:08.38:290   [sitemap.transformer.i18n]
  (/bdl/providers) HttpProcessor[8080][1]/XMLResourceBundle: messages:
  returning from cache: /catalogue/message[@key='ultation_Fournisseurs']
  DEBUG   (2002-04-26) 11:08.38:290   [sitemap.transformer.i18n]
  (/bdl/providers) HttpProcessor[8080][1]/XMLResourceBundle: messages:
  cache_not_found contains:
  /catalogue/message[@key='ultation_Fournisseurs']
  DEBUG   (2002-04-26) 11:08.38:290   [sitemap.transformer.i18n]
  (/bdl/providers) HttpProcessor[8080][1]/XMLResourceBundle: messages:
  returning from cache: /catalogue/message[@key='ultation_Fournisseurs']
  DEBUG   (2002-04-26) 11:08.38:290   [sitemap.transformer.i18n]
  (/bdl/providers) HttpProcessor[8080][1]/XMLResourceBundle: messages:
  cache_not_found contains:
  /catalogue/message[@key='ultation_Fournisseurs']
  DEBUG   (2002-04-26) 11:08.38:300   [sitemap.transformer.i18n]
  (/bdl/providers) HttpProcessor[8080][1]/XMLResourceBundle: messages:
  caching not_found: /catalogue/message[@key='ultation_Fournisseurs']
  DEBUG   (2002-04-26) 11:08.38:300   [sitemap.transformer.i18n]
  (/bdl/providers) HttpProcessor[8080][1]/XMLResourceBundle: messages:
  caching not_found: /catalogue/message[@key='ultation_Fournisseurs']
  DEBUG   (2002-04-26) 11:08.38:300   [sitemap.transformer.i18n]
  (/bdl/providers) HttpProcessor[8080][1]/I18nTransformer:
  I18nTransformer: End i18n element: text
  DEBUG   (2002-04-26) 11:08.38:300   [sitemap.transformer.i18n]
  (/bdl/providers) HttpProcessor[8080][1]/I18nTransformer:
  I18nTransformer: End text element, translated_text: untranslated-text
 
 
  Thank you for your response.
  Roman
 
 
  -
  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: PERSONAL JAVA CLASSES

2002-04-26 Thread KOZLOV Roman

Hello Fabien,

Jar's should be in WEB-INF/lib folder. Sources are not necessary at runtime.
Classes should be put like WEB-INF/classes/path_to_package/class_name.class

It seems that it works for me.

Roman

TREGAN Fabien wrote:

 mmm,

 I tryed to put my sources and classes in WEB-INF/classes/, it did not work.
 I tryed to put my classes in WEB-INF/classes/, it did not work.
 I finaly tryed to put classes in a .jar in WEB-INF/classes/, it did work...
 But i really dont like to re-jar my classes at each compilation, can I avoid
 this ?

 fabien.

 -Message d'origine-
 De: yuryx [mailto:[EMAIL PROTECTED]]
 Date: jeudi 7 mars 2002 12:55
 À: [EMAIL PROTECTED]
 Objet: Re: PERSONAL JAVA CLASSES
 
 
 Istvan Beszteri wrote:
 
 .../cocoon/WEB-INF/classes/
 works for me,
 but you can check the WEB-INF/web.xml, how to define extra calsspaths.
 Br,
   Istvan
 
 On Thursday 07 March 2002 13:41, you wrote:
 
 Hi,
 
 Where must I put my personal Java classes in Cocoon 2?
 (which directory?)
 
 Thanks
 
 
 ---
 Outgoing mail is certified Virus Free. (CopyRight FLASHH!)
 Checked by AVG anti-virus system (http://www.grisoft.com).
 Version: 6.0.330 / Virus Database: 184 - Release Date: 28/02/02
 
 
 -
 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]
 
 Or .../cocoon/WEB-INF/lib (for compiled classes) and don't check
 WEB-INF/web.xml :)
 
 Regards.
 Yury.
 
 
 
 
 -
 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]




Re: Memory leaks(?)

2002-04-26 Thread KOZLOV Roman

Hello,

I have the same problem for Tomcat 4.0.1 +  Cocoon 2.0.1 + Xindice 1.0rc2 on
NT for one client. To avoid it I have to set CATALINA_OPTS to ' -Xms64M
-Xmx256M '. For the moment it works without problems.

Roman

Vadim Gritsenko wrote:

  From: Rogier Peters [mailto:[EMAIL PROTECTED]]
 
  Hi all, thanks for the quick reply..
  
We've been running cocoon for some time now, and we really like
 it,
but we
keep having problems with memory usage.
The problem is that with each page, looking at the Windows Task
Manager,
memory use increases by about 25M and although in the
processes window
java.exe will reduce memory now and again, system memory use stays
high.
  
   Memory leak occurs when memory is allocated from the heap and
 never
   returned. Situation you describe is different and (except may be
   increase in 25M) normal.
 
  OK, maybe I wasn't too clear on this;) I know this is probably too
 general OS
  and JVM to ask, but my real question is if java.exe shows 20Mb in use,
 no
  other applications are running and my system shows 600Mb in use and
 slows down
  to a crawl, where did all the memory go? Is the size of java.exe the
 real size
  of the JVM?

 Except mem usage column, Windoze task manager features VM size
 column.

  Also, I do experience OutOfMemporyExceptions ...

 In the set components I use there is no memory leaks. You should provide
 more information on what do you use, what your sitemap looks like, what
 is the size of XML docs.

 I assume that you have OutOfMemoryErrors when testing with just one
 concurrent user.

 PS Consider using memory debugging tools

 Vadim

   Unless you are experiencing OutOfMemporyExceptions I would
   consider that
   system behaves normally.
  
   The only thing you may want to investigate is 25Mb per request - but
   this is observed only in your setup, so you should pick a tool and
 do
   memory debug.
  
   Vadim
  
I played around with the jvm -Xmx option, and with cocoon.xconf
heapsize and
cached objects, but that didn't help. I was wondering whether
 anyone
had the
same problems with cocoon, and I am of course very interested in
solutions,
tweaks, or configuration options that I may have overlooked.
   
Regards,
   
Rogier Peters
   
   
-
Content Management Department
Hippo Webworks
Grasweg 35
1031 HW Amsterdam
The Netherlands
Tel  +31 (0)20 6345173
Fax +31 (0)20 6345179
Rogier(at)hippo(dot)nl / www.hippo.nl

 -
 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: Memory leaks(?)

2002-04-26 Thread KOZLOV Roman

Diana,

For the moment I'm not sure, but it seems that the problem is due to a big
amount of data processed in a pipeline. It's because Xindice supports only
ASCII for xpath queries and I have to filter some big amount of data got from
a generator (file generator with dbxml protocol) by means of XSL
transformers.

Roman

Diana Shannon wrote:

 Roman:

  I have the same problem for Tomcat 4.0.1 +  Cocoon 2.0.1 + Xindice
  1.0rc2 on
  NT for one client. To avoid it I have to set CATALINA_OPTS to ' -Xms64M
  -Xmx256M '. For the moment it works without problems.

 Do you have *any* sense how much your increased RAM requirements are due
 to your use of Xindice?

 Thanks.

 Diana

 -
 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: special characters for i18n

2002-04-25 Thread KOZLOV Roman

Hi Konstantin,

I just have to say, that I've used all your stuff (merge.xsl, convert.xsl,
simple_dict.xml) and now I'm using convert.xsl in my *.cmd when I update a
dictionary.

Thank you.
Roman

Konstantin Piroumian wrote:

 From: Horst Rutter [EMAIL PROTECTED]

  Sorry for not mentioning..
  Yes, this is portuguese, but I don't want to mislead anybody, because I am
 not.
  The translation was provided by my wife who speaks native Portuguese.

 Fine! The only question I ask is: would you support your translation in
 future? Sometimes I need minor changes and cannot get a person for
 translating the needed text (e.g. Polish translation is left unsupported
 now).

 
  Send me your (latest) version of simple_dict.xml unless it's in cvs and I
 fill in the blanks.

 Hope to commit all the stuff today and will let you know when it's ready.
 You'll need to update only the messages_pt.xml.

 
  As far as providing simple_dict_pt.xml..
  The reason I did this is I thought you are supposed to:
  Maintain a master dictionary that keeps growing (simple_dict.xml in this
 case)
  and then whenever you add a new locale or make corrections,
  extract out simple_dict_xx.xml using merge.xsl. (the template)
  Make the changes and merge back into the big one.
  Then use convert.xsl to generate the resource bundle messages_xx.xml used
 by Cocoon.
  This is what I concluded based on whatever documentation there was.
  ;(

 That could be reasonable to keep translations in sync, but I've never used
 it that way.
 
  So how is this supposed to work now?

 Now, as only messages_xx.xml are used, I've created a stylesheet that
 transforms the source file, say simple.xml, into messages_xx.xml converting
 all the i18n:text and i18n:param tags into message key=... /.

  you edit simple_dict.xml and then use convert.xsl to regenerate the
 message catalog for the locale in question?
  That's it?

 No, I don't touch the simple_dict.xml anymore. Moreover, I was going to
 remove all the legacy stuff (merge.xsl, convert.xsl, simple_dict.xml) from
 CVS, but it seems that I have to rethink it.

 Never thought that somebody went so far as using those stylesheets ;)

 Konstantin

 
  Horst
 
  - Original Message -
  From: Konstantin Piroumian [EMAIL PROTECTED]
  To: [EMAIL PROTECTED]
  Sent: Tuesday, April 23, 2002 4:50 AM
  Subject: Re: special characters for i18n
 
 
  
   Hi!
  
   Thanks for sending this. I guess that this is Portuguese?
   Could you also translate this line: Portuguese translation was made by
   your-name / [your-email /] and the country name of Portugal?
  
   Btw, the simple_dict_pt.xml is in the old dictionary format and it's not
   supported any more. Why do you use it?
  
   --
   Konstantin Piroumian
   [EMAIL PROTECTED]
  
Thanks,
All very useful information.
Still the solution to my problem was that I (blind me!) did not
 realize
that the stupid MS WordPad writes UTF-16.
Now I am aware of saving my files in UTF-8 (with MS Notepad) and voila
here goes another extension for the i18n sample.
(gotta move over to Debian one of these days..)
   
For anyone of the commiters who cares I have attached
 simple_dict_pt.xml
and messages_pt.xml
(Was not sure if I should direct this directly to Konstantin
 Piroumian)
   
Horst
   
   
  
   -
   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]




Re: image problem

2002-04-25 Thread KOZLOV Roman

And it's not clear, do you finally use absolute or relative path, i.e. /src/...
or src/
Roman

Paul Pattison wrote:

 Do you have a '**.gif' matcher in your sitemap?  I'm still a bit of a
 newbie, but I'm pretty sure you need this in your sitemap.  It would look
 something like this:

 map:match pattern=images/**.gif
   map:read mime-type=image/gif src=resources/images/{1}.gif/
 /map:match

 Hope that helps,

 Paul

 -Original Message-
 From: Bogdan Cirstea [mailto:[EMAIL PROTECTED]]
 Sent: 24 April 2002 10:30
 To: [EMAIL PROTECTED]
 Subject: image problem

 hi! i have a new problem: i use xsp and xsl to generate a page. on this page
 i have a table and in some fields, i have to put images. for that, in xsl
 file i used:
 img src=/src/web/img/img4.gif/. but nothing is displayed. i think that
 the problem is from the path. how can i determine the corect path ?

 my structure of my application is:
 estuff
 -src
 -web
 -xsp
 home.xsp
 -stylesheets
 home.xsl
 -img
 img4.gif

 in sitemap.xmap i have :
  map:match pattern=
 map:redirect-to session=false uri=home/
   /map:match

   map:match pattern=home
 map:generate type=serverpages src=src/web/xsp/home.xsp/
 map:transform type=xslt src=src/web/stylesheets/home.xsl
   map:parameter name=use-request-parameters value=true/
   map:parameter name=base-url value=/estuff/
 /map:transform
 map:serialize/
 /map:match

 i accesed the application localhost:8080/estuff
 in home.xsl i put img src=src/web/img/img4.gif/
 an nothing happens.

 anybody could help me?
 tks a lot

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




Re: more HSSFSerializer experience

2002-04-25 Thread KOZLOV Roman

Just a guess. Try to remove cocoon's working directory and restart the
server. May be the problem concerns cache.
Roman

Seth Ladd wrote:

 Hello again,

 I've been playing around trying to isolate the cause of those NPEs.  I
 shortened the pipeline to test the XSLT sheet and the serializer.  This
 scenario works:

 map:pipeline
 map:match pattern=*2.xml
 map:generate src={1}2.xml/
 map:transform src=final.xslt/
 map:serialize type=xls/
 /map:match
 /map:pipeline

 The XML file used above was originally generated from my previous
 example:

 map:pipeline
 map:match pattern=*.xml
 map:generate src={1}.xml/
 map:transform type=sql
 map:parameter name=use-connection value=seclog/
 /map:transform
 map:transform src=test.xslt/
 map:transform src=output.xslt/

 !-- the xml file above came from the below transformer --
 map:transform src=convert.xslt/

 map:transform src=final.xslt/
 map:serialize type=xls/
 /map:match
 /map:pipeline

 Note that the short pipeline works great (the Excel file works
 wonderfully).  The long pipeline does now work (I get the NPEs from my
 previous post).  Yet the short pipeline uses XML generated by the long
 pipeline, plus the same final XSLT file and the same serializer.

 Any ideas at all?  I'm getting into areas of cocoon I don't quite
 understand.

 Thanks so much,
 Seth

 -
 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: special characters for i18n

2002-04-25 Thread KOZLOV Roman

Ok,

I use NT station so my scripts examples are for windows.
There are two general types of a dictionary changes:
1) It is necessary to add translations for a new language lng to my
dictionary, i.e. to create a new messages_lng.xml file.
2) It is necessary to change/add some translations for already used languages in
a dictionary (as well as in messages_lng.xml files).

In both cases some common dictionary.xml with format of simple_dict.xml is used
as a source for messages_lng.xml files creation.
Then

in the case (1):

1. addnewlang.cmd (command line addnewlang.cml lng) is used to create a
template for new langauge translations (dictionary_lng.xml):

@echo off
SET CLASSPATH=.;..\WEB-INF\lib\xalan-2.2.0.jar;..\WEB-INF\lib\xerces-1.4.4.jar
set lng=%1
set keep=-PARAM keep-lang en
if %lng%== set keep=
if %lng%== set lng=en
set dic=%2
if %dic%== set dic=dictionary
java org.apache.xalan.xslt.Process -IN %dic%.xml -XSL merge.xsl -OUT
%dic%_%lng%.xml -PARAM mode keys -PARAM new-lang %lng% %keep%
@echo on

2. Then the created dictionary_lng.xml file is modifyed so that it contains
translations for all the keys.
3. The common dictionary.xml file is updated by merge.cmd (command line
merge.cmd lng) to include the new language translations from
dictionary_lng.xml:

@echo off
SET CLASSPATH=.;..\WEB-INF\lib\xalan-2.2.0.jar;..\WEB-INF\lib\xerces-1.4.4.jar
set lng=%1
if %lng%== set lng=en
set dic=%2
if %dic%== set dic=dictionary
if EXIST %dic%.xml goto ok1
echo Error: %dic%.xml doesn't exist.
goto error
:ok1
if EXIST %dic%_%lng%.xml goto ok2
echo Error: %dic%_%lng%.xml doesn't exist.
goto error
:ok2
java org.apache.xalan.xslt.Process -IN %dic%.xml -XSL merge.xsl -OUT
%dic%_new.xml -PARAM mode merge -PARAM new-lang %lng% -PARAM new-dict
%dic%_%lng%.xml

if NOT %ERRORLEVEL%==0 exit 1
if EXIST %dic%_old.xml del %dic%_old.xml
move %dic%.xml %dic%_old.xml
move %dic%_new.xml %dic%.xml
goto end

:error
echo Usage: merge.cmd [lng [dic]]
echowhere
echolng - language code, en by default
echodic - base of dictionary file name, dictionary by default.
:end
@echo on

4. The line call makemes new_lng is appended to a makeallmess.cmd. Then
messages files are updated by running makeallmess.cmd, where makemes.cmd is:

@echo off
SET CLASSPATH=.;..\WEB-INF\lib\xalan-2.2.0.jar;..\WEB-INF\lib\xerces-1.4.4.jar
set lng=%1
set mes=messages
if NOT %lng%== set mes=messages_%lng%
if %lng%== set lng=en
set dic=%2
if %dic%== set dic=dictionary
java org.apache.xalan.xslt.Process -IN %dic%.xml -XSL convert.xsl -OUT %mes%.xml
-PARAM lang %lng%
@echo on

=

in the case (2):
1. The common dictionary.xml is edited to change/add translations.
2. makeallmess.cmd is used to update messages files.


Note:
1) All the stuff is located in a sub-folder of a cocoon based app folder.
2) After any changes it is necessary to restart the server to get updated
translations for a client.

Best regards.
Roman


Konstantin Piroumian wrote:

 Hi Roman,

 
  I just have to say, that I've used all your stuff (merge.xsl, convert.xsl,
  simple_dict.xml) and now I'm using convert.xsl in my *.cmd when I update a
  dictionary.

 Ok, I will keep them. Maybe will move to a better place than, say somewhere
 to /tools or so...

 Could you describe the workflow process you are using for i18n stuff? It'll
 be useful for others and maybe I'll add it to docs.

 --
 Konstantin

 
  Thank you.
  Roman
 
  Konstantin Piroumian wrote:
 
   From: Horst Rutter [EMAIL PROTECTED]
  
Sorry for not mentioning..
Yes, this is portuguese, but I don't want to mislead anybody, because
 I am
   not.
The translation was provided by my wife who speaks native Portuguese.
  
   Fine! The only question I ask is: would you support your translation in
   future? Sometimes I need minor changes and cannot get a person for
   translating the needed text (e.g. Polish translation is left unsupported
   now).
  
   
Send me your (latest) version of simple_dict.xml unless it's in cvs
 and I
   fill in the blanks.
  
   Hope to commit all the stuff today and will let you know when it's
 ready.
   You'll need to update only the messages_pt.xml.
  
   
As far as providing simple_dict_pt.xml..
The reason I did this is I thought you are supposed to:
Maintain a master dictionary that keeps growing (simple_dict.xml in
 this
   case)
and then whenever you add a new locale or make corrections,
extract out simple_dict_xx.xml using merge.xsl. (the template)
Make the changes and merge back into the big one.
Then use convert.xsl to generate the resource bundle messages_xx.xml
 used
   by Cocoon.
This is what I concluded based on whatever documentation there was.
;(
  
   That could be reasonable to keep translations in sync, but I've never
 used
   it that way.
   
So how is this supposed to work now?
  
   Now, as only messages_xx.xml are used, I've created a stylesheet that
   transforms the source file, say 

Re: Returning result from two select statements in one file

2002-04-25 Thread KOZLOV Roman

Hi,
what about such XSLT:

xsl:template match=/
rowset
xsl:apply-templates select=//name/
/rowset
/xsl:template

xsl:template match=name
  xsl:variable name=namexsl:value-of select=.//xsl:variable
  xsl:variable name=firstNamexsl:value-of
select=../firstName//xsl:variable
  xsl:variable name=posxsl:value-of select=position()//xsl:variable
  xsl:if test=count(//row[$posposition()]/name[(.=$name) and
(../firstName=$firstName)])=0
row
  namexsl:value-of select=$name//name
  firstNamexsl:value-of select=$firstName//firstName
  xsl:apply-templates select=//favouriteColor[(../firstName=$firstName)
and (../name=$name)]/
/row
  /xsl:if
/xsl:template

xsl:template match=favouriteColor
favouriteColorxsl:value-of select=.//favouriteColor
/xsl:template

Best regards
Roman

Hahn Kurt (CHA) wrote:

 The query I tested is a simple select -from - where statement (useless to
 send you that), here's an example of what I get with this query:
 rowset
 row
 nameMr. Brown/name
 firstNameJohn/firstName
 favouriteColorgreen/favouriteColor
 /row

 row
 nameMr. Brown/name
 firstNameJohn/firstName
 favouriteColorred/favouriteColor
 /row

 row
 nameMr. Brown/name
 firstNameJohn/firstName
 favouriteColoryellow/favouriteColor
 /row
 /rowset
 because Mr. Brown has many favourite colors
 But I should get something like this (which I could do in a PL/SQL block,
 but how can I achieve this through Cocoon??)
 rowset
 row
 nameMr. Brown/name
 firstNameJohn/firstName
 favouriteColorgreen/favouriteColor
 favouriteColorred/favouriteColor
 favouriteColoryellow/favouriteColor
 /row
 /rowset

 -Message d'origine-
 De : Luca Morandini [mailto:[EMAIL PROTECTED]]
 Envoye : jeudi, 25. avril 2002 11:39
 A : [EMAIL PROTECTED]
 Objet : RE: Returning result from two select statements in one file

 Kurt,

 I beg your pardon, but I haven't understood it yet... are you talking about
 a sub-query or the processing of a cursor ?

 May you just show us the query you've already tested ?

 Best regards,

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

  -Original Message-
  From: Hahn Kurt (CHA) [mailto:[EMAIL PROTECTED]]
  Sent: Thursday, April 25, 2002 11:01 AM
  To: '[EMAIL PROTECTED]'
  Subject: RE: Returning result from two select statements in one file
 
 
  It is not really an issue about SQL, but the question is how I do
  in Cocoon
  what I normally would have to do in a stored procedure: Simply, I can not
  execute one query to get all my results, I need two select statements that
  are dependent on each other in order to get the combined result.
  Is there a
  possibility to do that? It looks as if map:aggregate is useful only if the
  two queries are independent, but they aren't.
  Example: The first select returns a row, and dependent on the
  result of that
  row, a second select returns zero, one ore more rows that should
  be added to
  the first returned row (as if they belonged to the result from the first
  select..).
 
  Is that understandable?
  KH
 
 
  -Message d'origine-
  De : Luca Morandini [mailto:[EMAIL PROTECTED]]
  Envoye : jeudi, 25. avril 2002 10:01
  A : [EMAIL PROTECTED]
  Objet : RE: Returning result from two select statements in one file
 
 
  Kurt,
 
  it seems to me more of an SQL than a Cocoon issue... may you share your
  query with us  ?
 
  Best regards,
 
 
  -
 Luca Morandini
 GIS Consultant
[EMAIL PROTECTED]
  http://utenti.tripod.it/lmorandini/index.html
  -
 
 
   -Original Message-
   From: Hahn Kurt (CHA) [mailto:[EMAIL PROTECTED]]
   Sent: Thursday, April 25, 2002 9:26 AM
   To: '[EMAIL PROTECTED]'
   Subject: Returning result from two select statements in one file
  
  
   I'm developing a Cocoon application wich produces PDF files from a file
   which is generated by a DB access (Oracle). The problem is the
  query: The
   results I should get looks like this:
  
   row
   field1text/field1
   ...
   fieldNtext/fieldN
   field1FromSecondSelecttext/field1FromSecondSelect
   ...
   fieldNFromSecondSelecttext/fieldNFromSecondSelect
   /row
   where fieldFromSecondSelect are 0 or more rows which are returned and
   should be grouped with the main select. In PL/SQL, I could
   write a stored
   procedure with a cursor that's returning me the second result set, but
   what's the way to do that in Cocoon? So far, I succeeded to
   write a select
   statement that's returning me all I need, but whenever the sub-select
   returns more than 1 row, the corresponding result from the main query is
   returned several times 

Re: i18n in xslt

2002-04-23 Thread KOZLOV Roman

Hello,

Do you specify request parameter locale with value for which
messages_lng.xml exists?

Roman

Jerzy Kut wrote:

 Sorry - of course. But it don't helps. I paste only abbrewiated snippets
 into post.
 But thank You.
 Trouble is located somewhere in component.xslt i think, but i don't
 understand why nullpointerexception is throwed...

 - Original Message -
 From: TREGAN Fabien [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Tuesday, April 23, 2002 1:09 PM
 Subject: RE: i18n in xslt

  not sure this will help but...
 
  my-space.xsl - logicsheet processing tag for other tags
  template match=my-space:component
  missing an
 
  here
   struct
item1any_link/item1
item2/
   /struct
  /template
 
  -
  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]




Re: Aggregation sample

2002-04-19 Thread KOZLOV Roman

Hi Volker,

It's actually easy:

  map:match pattern=get_something
map:aggregate element=root_of_result
  map:part element=root_of_part1 src=some_url.html/
  map:part element=root_of_part2 src=cocoon:/some_pipeline/
/map:aggregate
map:transform src=stylesheets/what_you_want.xsl/
map:serialize/
  /map:match

Best regards
Roman

Volker Schneider wrote:

 Hi colleagues,

 does anybody have a simple aggregation sample where two xml files from
 filesystem are aggregated together?

 I always get an error message stylesheet directed termination.

 Documentation says aggregation is simple - I don't think so...

 Best regards
 - Volker -

 -
 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 use writeDOMsession with specific namespaces

2002-04-19 Thread KOZLOV Roman

Hello all,

Does anybody know how to use writeDOMsession transformer for XML
containing specific namespaces without excluding them, for example:

 ?xml version=1.0 encoding=iso-8859-1 ?
 collection:results
xmlns:collection=http://apache.org/cocoon/xmldb/1.0; resources=13
   collection:result docid=bebe.xml
 bebe id=ID_bebe
xsi:noNamespaceSchemaLocation=../../../schemas/bebe.xsd
src:col=/db/data/bebes
src:key=bebe.xml

xmlns:xsi=http://www.w3.org/1999/XMLSchema-instance;
xmlns:src=http://xml.apache.org/xindice/Query;

  elemsome info/elem
/bebe
   /collection:result
 /collection:results

It doesn't wont to be wrote. What I have to do? I use Cocoon 2.0.1
and tryed following ways:

 map:transform type=writeDOMsession
   map:parameter name=dom-name value=session_attr_name/
   map:parameter name=dom-root-element value=collection:results/
 /map:transform

and

 map:transform type=writeDOMsession
xmlns:collection=http://apache.org/cocoon/xmldb/1.0;
   map:parameter name=dom-name value=session_attr_name/
   map:parameter name=dom-root-element
xmlns:collection=http://apache.org/cocoon/xmldb/1.0;
value=collection:results/
 /map:transform

After both ways there is no such session attribute as I can see from
core.log.

Thank you for any advice.
Roman



-
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: Getting rid of namespaces in result

2002-04-18 Thread KOZLOV Roman

Hey, it's very strange but it's working! I've just found out by chance: try 
exclude-prefixes instead of exclude-result-prefixes to remove them in the output 
sub-elements.

Roman

Arjé Cahn wrote:

 Ed,

 This is my (dirty?) solution to removing prefixes. It is an extra XSL I put into the 
pipeline before I send the result to the HTML serializer. The CASTA\\ Client XML 
Editor I am using returns tags like XHTML:P. I replace them with p xmlns=x 
It recursively works it's way through the complete XML.

 If anyone knows a better solution, please let me know.

 ?xml version=1.0 encoding=UTF-8?
 xsl:stylesheet version=1.0 xmlns:xsl=http://www.w3.org/1999/XSL/Transform; 
xmlns=http://www.w3.org/1999/xhtml; exclude-result-prefixes=xhtml 
xmlns:xhtml=http://www.w3.org/1999/xhtml; 
xmlns:src=http://xml.apache.org/xindice/Query; 
xmlns:res=http://www.hippo.nl/xml/resource; 
xmlns:collection=http://apache.org/cocoon/xmldb/1.0;  
xmlns:fo=http://www.w3.org/1999/XSL/Format;
 xsl:template match=*
 xsl:element name={local-name()} 
namespace={namespace-uri()}
 xsl:for-each select=@*
 xsl:variable name=attname 
select=name()/xsl:variable
 xsl:attribute name={$attname}
 xsl:value-of 
select=./xsl:value-of
 /xsl:attribute
 /xsl:for-each
 xsl:choose
 xsl:when test=count(./*) != 0
 xsl:apply-templates
 /xsl:apply-templates
 /xsl:when
 xsl:otherwise
 xsl:value-of 
select=./xsl:value-of
 /xsl:otherwise
 /xsl:choose
 /xsl:element
 /xsl:template
 /xsl:stylesheet

 Regards,

 Arjé Cahn

 -
 Content Management Department
 Hippo Webworks
 Grasweg 35
 1031 HW Amsterdam
 The Netherlands
 Tel  +31 (0)20 6345173
 Fax +31 (0)20 6345179
 arje(at)hippo(dot)nl / www.hippo.nl

 -Oorspronkelijk bericht-
 Van: Cocoon Newbie [mailto:[EMAIL PROTECTED]]
 Verzonden: 17 April 2002 22:34
 Aan: Cocoon Users
 Onderwerp: Getting rid of namespaces in result

 I am trying to get rid of namespaces in my HTML output produced by
 Cocoon2. I searched the web/archives and found exclude-result-prefixes
 attribute to xsl:stylesheet element. However, if prior to using this
 attribute only HTML element had prefixes in the result, after using it
 HTML element does not but all its child nodes do. Is there a way to get
 rid of these prefixes short of defining XSLT templates for all possible
 XML elements?

 Thanks,

 Ed

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




ResourceReader crash

2002-04-17 Thread KOZLOV Roman

Hello all,

Can somebody answer is it a bug of Cocoon (v 2.0.1, server Tomcat
4.01) or not?
When browser, in particular IE 5.0 or 5.5, reads some data, in
particular css file, several times it sometimes severs the connection if
the data are old and cashed (IE does it even reread page every time
option is set). Cocoon's servlet after several such requests generates
error reports in logs and server console. For example, in sitemap.log it
prints at the beginning:

ResourceReader: Received an IOException, assuming client severed
connection on purpose

However after several such messages it begins printing of following
messages:

DEBUG   (2002-04-17) 11:19.02:999   [sitemap.transformer.xslt]
(/cocoon/mycss.css) HttpProcessor[8080][3]/TraxTransformer: Using
stylesheet:
'file:/W:/jakarta-tomcat-4.0/webapps/cocoon/stylesheets/system/error2html.xsl'
in org.apache.cocoon.transformation.TraxTransformer@63de4e, last
modified: 1015492495836

And in the server's console:

java.lang.RuntimeException: java.net.SocketException: Connection aborted
by peer
: socket write error
at
org.apache.xalan.transformer.TransformerImpl.run(TransformerImpl.java
:3174)
at java.lang.Thread.run(Thread.java:484)

Meantime, no error messages are appears in the browser and it seems to
be displaying data correctly.

So is it a bug of Cocoon?

I've attached a zip archive with some pieces of logs and with files
csstest.html, mycss.css and sitemap.xmap with which I've reproduced this
error on three different server stations.

Thank you for response.
Roman




css_err.zip
Description: application/compressed

-
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: Session attribute change within aggregation

2002-04-12 Thread KOZLOV Roman

Hello,

Vadim thank you for your advice. It helped me. I was busy some time and
had postponed this problem. Unfortunatelly it still remains.
I've found out that WildcardSessionAttributeMatcher (I'm using Cocoon
2.0.1) doesn't see session attributes changed or created before in the same
request by some xsp (I'm using aggregation of xsp and cocoon://somepattern
which includes branch based on sessionstate matcher).
It seems that objectModel are not up to date at the processing of
WildcardSessionAttributeMatcher.getMatchString method.
Is it a known problem?

I've tested it so: first, I call an aggregation which first part is an
xsp setting and printing session attribute isChanged and second part is
call to a pipeline via cocoon protocol wich returns some data if
sessionstate matcher recognize that isChanged is yes, otherwise calls
xsp which prints a value of the session attribute isChanged:

 map:match pattern=read_filtered_results
   map:match type=sessionstate pattern=yes
   map:parameter name=attribute-name value=isChanged/
   map:generate src=cocoon://read_query_results/
   map:serialize type=xml/
   /map:match
   map:generate src=cocoon://check_idlist_1.xsp/
   map:serialize type=xml/
 /map:match

Despite the first xsp in aggregation _always_ sets the session attribute
isChanged to yes or no (and first time it is yes), in the
sitemap.log for the first call I always see:
 HttpProcessor[8080][4]/WildcardSessionAttributeMatcher: Session attribute
'isChanged' not set.

Though the second xsp (check_id_list_1.xsp), which is called in this
case, always prints correct value.

So the problem is an organizing of a branch in sitemap according to a
change of some session attribute calculated in xsp. Here isChanged
attribute is just a flag.

Thank you for any response.
Roman

Vadim Gritsenko wrote:

 Roman,

 Aggregation is being executed linearly, which means that first part is
 executed before second. If first part contains an XSP and that XSP is
 not cached, it could change session attribute which will be visible in
 the second part's XSP (if it is not cached)

 XSPs are not cacheable by default.

 PS Use System.outs or log/ to see how it (doesn't) works.

 Vadim

  From: KOZLOV Roman [mailto:[EMAIL PROTECTED]]
 
  Hi,
 
  Is it possible in Cocoon 2.01 to set session attribute within
  aggregation so that the change would be in a first part (xsp) and next
  part could use the new value of the changed attribute. It seems that
 the
  new value is not available for the rest parts of aggregation within
 the
  same request.
  If it is true, then how is it possible to make a branch comparing a
  request parameter's value with some session attribute's value?
  In particular, I'd like to store some parameter as a session attribute
  and if it is not changed then read query results stored as DOM in a
  session before, otherwise update query results. My xsp part of
  aggregation is the following:
 
  ?xml version=1.0 encoding=ISO-8859-1?
  xsp:page
 language=java
 xmlns:xsp=http://apache.org/xsp;
 xmlns:xsp-request=http://apache.org/xsp/request/2.0;
 xmlns:session=http://apache.org/xsp/session/2.0;
 xmlns:util=http://apache.org/xsp/util/2.0;
 create-session=true
   page
 xsp:logic
   String idList = (String)xsp-request:get-parameter name=idList
  default=/;
   String idListOld = (String)session:get-attribute name=idList
  default=/;
   String isChanged = (idList.equals(idListOld))?no:yes;
 /xsp:logic
 session:set-attribute
 
 name=idListxsp:logicxsp:expridList/xsp:expr/xsp:logic/sessio
 n:set-
  attribute
 
 session:set-attribute
 
 name=isChangedxsp:logicxsp:exprisChanged/xsp:expr/xsp:logic/
 sessio
  n:set-attribute
 
 
 
 idListxsp:logicutil:exprxsp:expridList/xsp:expr/util:expr/x
 sp:log
  ic/idList
 
 
 
 isChangedxsp:logicutil:exprxsp:exprisChanged/xsp:expr/util:ex
 pr/x
  sp:logic/isChanged
 
 /page
  /xsp:page
 
  The second part of aggregation calls the following via cocoon://
  protocol:
 
  map:match pattern=read_filtered_results
map:match type=sessionstate pattern=yes
map:parameter name=attribute-name value=isChanged/
!-- Update filtered result --
map:generate src=cocoon://read_query_results/
map:serialize type=xml/
/map:match
!-- if idList is not changed try to read stored filtered result --
map:match type=sessionstate pattern=**
map:parameter name=attribute-name value=filtered_results/
!-- Read filtered result if it was already stored --
map:generate src=data/null.xml/
map:transform type=readDOMsession
map:parameter name=dom-name value=filtered_results/
map:parameter name=trigger-element value=null/
map:parameter name=position value=in/
/map:transform
map:serialize type=xml/
/map:match
!-- Create filtered result if it was not stored before --
map:generate

Re: Session attribute change within aggregation

2002-04-12 Thread KOZLOV Roman

Thank you very much for the lesson. I'll try another way.
Roman

Vadim Gritsenko wrote:

  From: KOZLOV Roman [mailto:[EMAIL PROTECTED]]
 
  Hello,
 
  Vadim thank you for your advice. It helped me. I was busy some
 time and
  had postponed this problem. Unfortunatelly it still remains.
  I've found out that WildcardSessionAttributeMatcher (I'm using
 Cocoon
  2.0.1) doesn't see session attributes changed or created before in the
 same
  request by some xsp

 XSP *cannot* create session attributes *before* action invocation in the
 *same* request because:

---
XSP is executed *after* *all* actions, matchers, selectors.
---

 Request is being processed by sitemap in *two* steps:

   1) Construct pipeline
   2) Execute pipeline

 All matchers/selectors/actions are executed in step one; all
 generators/serializers/transformers are executed in step two.

 Hope this helps

 Vadim

  (I'm using aggregation of xsp and cocoon://somepattern
  which includes branch based on sessionstate matcher).
  It seems that objectModel are not up to date at the processing of
  WildcardSessionAttributeMatcher.getMatchString method.
  Is it a known problem?
 
  I've tested it so: first, I call an aggregation which first part
 is an
  xsp setting and printing session attribute isChanged and second part
 is
  call to a pipeline via cocoon protocol wich returns some data if
  sessionstate matcher recognize that isChanged is yes, otherwise
 calls
  xsp which prints a value of the session attribute isChanged:
 
   map:match pattern=read_filtered_results
 map:match type=sessionstate pattern=yes
 map:parameter name=attribute-name value=isChanged/
 map:generate src=cocoon://read_query_results/
 map:serialize type=xml/
 /map:match
 map:generate src=cocoon://check_idlist_1.xsp/
 map:serialize type=xml/
   /map:match
 
  Despite the first xsp in aggregation _always_ sets the session
 attribute
  isChanged to yes or no (and first time it is yes), in the
  sitemap.log for the first call I always see:
   HttpProcessor[8080][4]/WildcardSessionAttributeMatcher: Session
 attribute
  'isChanged' not set.
 
  Though the second xsp (check_id_list_1.xsp), which is called in
 this
  case, always prints correct value.
 
  So the problem is an organizing of a branch in sitemap according
 to a
  change of some session attribute calculated in xsp. Here isChanged
  attribute is just a flag.
 
  Thank you for any response.
  Roman
 
 ...

 -
 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: reader mime problem - please help

2002-04-11 Thread KOZLOV Roman

Hi Dean,

Try src=downloads/{1}.exe

Roman

Dean McGowan wrote:

 Cannot get the reader to recognize the application/octet-stream when I
 am attempting to

 Download a file.

 map:match pattern=downloads/*.exe

 map:readsrc=downloads/*.exe mime-type=application/octet-stream/

 /map:match

 can anyone please help.

 PS I know this is not the most efficient way of handling downloads,
 however it is necessary at the moment.



-
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: XSLT named teplates and xsl:param (is it a BUG?)

2002-04-11 Thread KOZLOV Roman

Indeed, it seems that error message says that you needn't curved brackets in
test attribute. Try this

xsl:if test=($dayofweek=1) or ($dayofweek=7)

or even something like this

xsl:if test=/[($dayofweek=1) or ($dayofweek=7)]

And, of course, you have to use xsl:value-of whithin xsl:attribute element.

Roman

Matthieu Benéteau wrote:

 You have to use :

xsl:value-of select=$cssClassNormal/
xsl:value-of select=$cssClassWeekEnd/
xsl:value-of select=$dayofweek/

 etc...

 Matthieu

  I'm using Cocoon 2.0.2 and Tomcat 3.3.1.
 
  Can anybody explain to me why i can't use 'xsl:param' in 'xsl:if'
  clause?
 
  Example:
 
  xsl:template name=TimeCell
xsl:param name=cssClassNormalTimeCell/xsl:param
xsl:param name=cssClassWeekEndHolidayCell/xsl:param
xsl:param name=dayofweek
!-- Monday --
2
/xsl:param
td class={$cssClassNormal}
xsl:if test={$dayofweek}=1 or {$dayofweek}=7
xsl:attribute
  name=class{$cssClassWeekEnd}/xsl:attribute
/xsl:if
xsl:value-of select=./
/td
  /xsl:template
 
  it throws:
 
  org.apache.cocoon.ProcessingException: Exception in creating Transform
  Handler: javax.xml.transform.TransformerException: Extra illegal tokens:
  '{', '$', 'dayofweek}', '=', '1', 'or', '{', '$', 'dayofweek}', '=', '7'
at
  org.apache.cocoon.components.xslt.XSLTProcessorImpl.getTransformer
  Handler(XSLTProcessorImpl.java:271)

 -
 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: Sessions and session ids

2002-04-08 Thread KOZLOV Roman

Hi James,

James Harris wrote:

 Hi

 I am trying to figure sessions out and the site docs seem contradictory.
 For example, does it matter whether I use the namespace xmlns:xsp-session or
 xmlns:session in my xsps as these are both given in examples.

No, it doesn't, if you declare that namespace which you use.

 Do I also
 need to use the namespace declaration in my xsl stylesheets?

Yes, you need, if you want to be able to refer to elements from this namespace
in your xsl templates.


 I have a static html 'login' page which just posts a username and password
 to an xsp.  I have some debugging code in the xsp to just display these
 which it duly does.  I also have a Session Id=xsp-session:get-id/ in the
 xsp to print out the session id but this turns out blank on the web page.  I
 have an xmlns:xsp-session=http://apache.org/xsp/session/2.0; and
 create-session=true declaration in the name space of the xsp.  I also have
 a map:redirect-to session=true uri=index.html/ at the point of entry
 to the website in the sitemap.

 There must be something I am missing as the session id does not seem to be
 preserved when I get to the xsp.

Try the following just for checking:
sidxsp-session:get-id as=xml//sid

Roman.

 I can add to the session and retrieve from
 it in the xsp though.  Do I need to ditch the static login page and use an
 xsp instead with something like this from the cocoon examples:
 session:encode-url href=sessionpage.xspFollow me!/session:encode-url

 Cheers in advance for any help.
 Jim

 -
 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: Dynamically transform a generators output

2002-04-05 Thread KOZLOV Roman

Hi Chris,

Look at request selector usage in cocoon's default sitemap. Also, have a look at the 
very good tutorial 
http://www.cocooncenter.de/cc/documents/resources/request-params/requestselector.html

Best regards
Roman

Shaw, Chris wrote:

 Hi

 I have the following scenario...

 The user choses, on an HTML Form, for which format they want the output
 (e.g. PDF, XML, HTML, etc)...and the parameter called 'format' gets set as
 to whatever they chose
 ...eg format=pdf.

 A generator is called which executes a database query and returns all the
 data as XML...

 The problem?
 I want to use a different transformer depending on what the 'format'
 parameter was set to

 I searched the docs and mailing archives alreadybut couldn't find the
 answer

 This is what I have so far.but the variable 'format' seems to get lost
 along the way.
map:pipeline
 map:match pattern=*-find
 map:generate type=find-action/
 map:transform type=xslt src=stylesheets/{format}.xsl/
 map:serialize/
 /map:match
 /map:pipeline

 I did also discover from the docs the following tag:
map:parameter name=use-request-parameters value=true/
 but this states that the parameters are available in the XSLT stylesheet -
 and I need it before then (also I couldn't get it to work in the XSLT
 stylesheet anyway).

 Can someone point me in the right direction to overcoming this...

 Many TIA

 Chris
 -=-=-=

 
 Chris Shaw
  European Central Bank
  DG Information Systems
  * [EMAIL PROTECTED]
 

 Any e-mail message from the European Central Bank (ECB) is sent in good faith but 
shall neither be binding nor construed as constituting a commitment by the ECB except 
where provided for in a written agreement.
 This e-mail is intended only for the use of the recipient(s) named above. Any 
unauthorised disclosure, use or dissemination, either in whole or in part, is 
prohibited.
 If you have received this e-mail in error, please notify the sender immediately via 
e-mail and delete this e-mail from your system.

 -
 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: rdf from Slashdot and Freshmeat

2002-04-04 Thread KOZLOV Roman

Hi Michael,

Try to put the rdf namespace declaration in stylesheet tag like this:
xsl:stylesheet . . . xmlns:rdf=http://my.netscape.com/rdf/simple/0.9/;

and then in your xsl templates refer to elements from this namespace with rdf: prefix:
xsl:template match=rdf:some_element

PS: Of course, you can declare it with another prefix.

Hope it helps.

Best regards
Roman

Michael Wechner wrote:

 Hi

 I would like to use the rdf from Slashdot and Freshmeat via XInclude.
 http://www.slashdot.org/slashdot.rdf
 http://www.freshmeat.net/backend/fm.rdf

 Everything works fine except that the following declaration

 xmlns=http://my.netscape.com/rdf/simple/0.9/;

 within these document makes a lot of trouble. First of all
 the XSLT transformer just doesn't seem to match anything if the
 declaration is present. When I remove it, everything works fine.
 The other thing is when the bracket  is on a new line then the
 XML Serialzer seems to remove the declaration. When the bracket 
 is on the same line, then it will stay there.

 Pretty strange everything.

 Did anybody xinclude this stuff before?

 Thanks

 Michael

 Michael Wechner wrote:

  For us mod_proxy seems to work quite alright so far, except for
  the following problems:
  1) Referer which are used for later redirection (held within session)
  2) Absolute URL's within pages
  3) Absolute Path to images
 
  We are currently resolving these problems by setting on the Cocoon side
  some rules how these URL's have to be rewritten in case the
  publication is viewed via proxy. But it's not very elegant (Although
  other applications such as for instance Zope seem to have the same
  problem).
 
  Maybe we just need some more experience:-)
 
  Michael
 
  giacomo wrote:
 
  On Thu, 4 Apr 2002, Michael Wechner wrote:
 
 
  Did you try mod_proxy?
 
  You will find some notes at
 
  
http://www.wyona.org/docs/wyona-cms-docs/integrator-guide/virtual-server/proxy-apache.html
 
 
 
  We had some issues with ProxyPass (I don't remember right now what it
  was) and used both like this:
 
  RewriteRule ^/cocoon/(.*)$ http://cocoonhost:8080/cocoon/$1 [P,L]
  ProxyPassReverse  /cocoon/ http://cocoonhost:8080/cocoon/
 
  Giacomo
 
 
  All the best
 
  Michael
 
 
 
  Liam Morley wrote:
 
 
  I read up on working with mod_rewrite in the Cocoon FAQ, and I'm
  having a
  bit of a hard time getting mod_rewrite to cooperate with my sessions.
 
  I've got the following in my Apache httpd.conf:
 
  RewriteEngine On
  RewriteLog E:/rewrite.log
  RewriteLogLevel 3
  RewriteRule /cms/(.*) /cocoon/cms/$1 [PT]
 
 
  Each time the page is visited, a new session ID is created. After
  checking
  the logs, I noticed that the JSESSIONID isn't getting passed when using
  mod_rewrite. Here's an excerpt from the log without using mod_rewrite:
 
  PARAM: 'cookie' VALUES: '[JSESSIONID=A897E11152D430961782D5C9D9E67211;
  CMSUSER=mMsjah1coqlTGONdauaj1HrXi%2Fi2nT0lSZBixdwP%2BwQ%3D]'
  PARAM: 'connection' VALUES: '[Keep-Alive]'
  PARAM: 'accept-encoding' VALUES: '[gzip, deflate]'
  PARAM: 'referer' VALUES:
  '[http://localhost/cocoon/cms/info/mission.html]'
  PARAM: 'accept' VALUES: '[image/gif, image/x-xbitmap, image/jpeg,
  image/pjpeg, application/vnd.ms-excel, application/vnd.ms-powerpoint,
  application/msword, */*]'
  PARAM: 'accept-language' VALUES: '[en-us]'
  PARAM: 'user-agent' VALUES: '[Mozilla/4.0 (compatible; MSIE 6.0;
  Windows
  NT 5.1; Q312461)]'
  PARAM: 'host' VALUES: '[localhost]'
 
  And here's what happens when I use mod_rewrite:
  PARAM: 'cookie' VALUES:
  '[CMSUSER=mMsjah1coqlTGONdauaj1HrXi%2Fi2nT0lSZBixdwP%2BwQ%3D]'
  PARAM: 'connection' VALUES: '[Keep-Alive]'
  PARAM: 'accept-encoding' VALUES: '[gzip, deflate]'
  PARAM: 'referer' VALUES:
  '[http://localhost/cms/news/news_story_1.html]'
  PARAM: 'accept' VALUES: '[*/*]'
  PARAM: 'accept-language' VALUES: '[en-us]'
  PARAM: 'user-agent' VALUES: '[Mozilla/4.0 (compatible; MSIE 6.0;
  Windows
  NT 5.1; Q312461)]'
  PARAM: 'host' VALUES: '[localhost]'
 
  As you can tell, there's no JSESSIONID when I use mod_rewrite..
  also, the
  'accept' parameter is different.
 
  If anybody can help me, I'd greatly appreciate it. Thanks:)
 
  Liam Morley
 
 
  -
  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. 

Re: Transformation comma-point

2002-04-02 Thread KOZLOV Roman

Hello,

It is also possible to use translate function like this:

xsl:value-of select=translate($strToFormat, ',', '.')/

Best regards
Roman

Luca Morandini wrote:

 Ferran,

 one elegant way could be:

 1) Define your format for numbers

  xsl:decimal-format
   name=italy
   decimal-separator=,
   grouping-separator=.
   NaN=vuoto
  /

 1) Apply it to the outputted numbers

 xsl:value-of select=format-number(sql:pay, '###.###.##0,000', 'italy')/

 Of course, I used this for the opposite reason (outputting commas instead of
 points)... but you got the idea :)

 Best regards,

 P.S.
 Next time use plain text, please.

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

 -Original Message-
 From: Ferran Urgell [mailto:[EMAIL PROTECTED]]
 Sent: Tuesday, April 02, 2002 11:18 AM
 To: [EMAIL PROTECTED]
 Subject: Transformation comma-point

 Hi Cocooners!

 I've a problem:
 I'm getting xml from a database, but I'm getting some results (number
 results with decimals), but these results are in commas (ex. 123,34).

 Now I'm trying to make some transformation into svg, but don't accept the
 commas
 I need to change this commas to points...

 The question is: How I can do this ?

 Thanks

 Ferran Urgell

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




Session attribute change within aggregation

2002-04-02 Thread KOZLOV Roman

Hi,

Is it possible in Cocoon 2.01 to set session attribute within
aggregation so that the change would be in a first part (xsp) and next
part could use the new value of the changed attribute. It seems that the
new value is not available for the rest parts of aggregation within the
same request.
If it is true, then how is it possible to make a branch comparing a
request parameter's value with some session attribute's value?
In particular, I'd like to store some parameter as a session attribute
and if it is not changed then read query results stored as DOM in a
session before, otherwise update query results. My xsp part of
aggregation is the following:

?xml version=1.0 encoding=ISO-8859-1?
xsp:page
   language=java
   xmlns:xsp=http://apache.org/xsp;
   xmlns:xsp-request=http://apache.org/xsp/request/2.0;
   xmlns:session=http://apache.org/xsp/session/2.0;
   xmlns:util=http://apache.org/xsp/util/2.0;
   create-session=true
 page
   xsp:logic
 String idList = (String)xsp-request:get-parameter name=idList
default=/;
 String idListOld = (String)session:get-attribute name=idList
default=/;
 String isChanged = (idList.equals(idListOld))?no:yes;
   /xsp:logic
   session:set-attribute
name=idListxsp:logicxsp:expridList/xsp:expr/xsp:logic/session:set-attribute

   session:set-attribute
name=isChangedxsp:logicxsp:exprisChanged/xsp:expr/xsp:logic/session:set-attribute


idListxsp:logicutil:exprxsp:expridList/xsp:expr/util:expr/xsp:logic/idList


isChangedxsp:logicutil:exprxsp:exprisChanged/xsp:expr/util:expr/xsp:logic/isChanged

   /page
/xsp:page

The second part of aggregation calls the following via cocoon://
protocol:

map:match pattern=read_filtered_results
  map:match type=sessionstate pattern=yes
  map:parameter name=attribute-name value=isChanged/
  !-- Update filtered result --
  map:generate src=cocoon://read_query_results/
  map:serialize type=xml/
  /map:match
  !-- if idList is not changed try to read stored filtered result --
  map:match type=sessionstate pattern=**
  map:parameter name=attribute-name value=filtered_results/
  !-- Read filtered result if it was already stored --
  map:generate src=data/null.xml/
  map:transform type=readDOMsession
  map:parameter name=dom-name value=filtered_results/
  map:parameter name=trigger-element value=null/
  map:parameter name=position value=in/
  /map:transform
  map:serialize type=xml/
  /map:match
  !-- Create filtered result if it was not stored before --
  map:generate src=cocoon://read_query_results/
  map:serialize type=xml/
/map:match

So the problem is that after changing idList parameter I have to call
the aggregating pipeline twice (i.e. to make two requests from browser
with the same idList parameter) to get an updated query result.

Thank you very much for any advice.
Roman


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




Is it possible to process multiple value parameter in XSL?

2002-04-01 Thread KOZLOV Roman

Hi,

Is it possible to process multiple value parameter in XSL under Cocoon
2.01?
For example, how to get all values of the tst parameter from the
following request in xsl:
http://localhost:8080/cocoon/test?tst=002tst=004tst=005

Thank you.
Roman



-
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: convert http POST to XML

2002-04-01 Thread KOZLOV Roman

Hi Charles,

You can use request generator:

map:generate type=request/

Best regards
Roman

charles gebhard wrote:

 greetings,

 i would like to convert a bunch of http POST params into an XML document
 (or stream) and pass the XML on to another server.  is this something that
 cocoon can accomplish?  there are many examples of cocoon transforming XML
 to HTML, but i'm sorta looking at going the opposite direction.

 we're creating a web service that only accepts and returns XML and are
 wondering if cocoon is the right piece of software to put between it and
 web browsers.  links to examples will be much appreciated!  thanks.

 -chuck

 -
 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 KOZLOV Roman

Hi,

To copy all types of all level sub-nodes you can use copy-of tag:
xsl:copy-of select=some_element/

In this case you need not special template with for-each processing.

Best regards.
Roman

Hahn Kurt (CHA) wrote:

 Actually, the problem was something else, somebody else just pointed me to
 check for different namespaces, and that solved the problem, I needed to
 reference the elements with their corresponding NS.

 Thanks

 -Message d'origine-
 De: TREGAN Fabien [mailto:[EMAIL PROTECTED]]
 Date: jeudi, 28. mars 2002 10:45
 À: '[EMAIL PROTECTED]'
 Objet: RE: Simple XSL problem, but NEED HELP!

 -Message d'origine-
 De: Andreas Hartmann [mailto:[EMAIL PROTECTED]]

 Hi,

 /

 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.
 

 If you want a copy of all the tag, us xsl:copy.

 If you need to copy all the tag, attributs, and inner tag, you can use
 recursive-copy by using a named template and applying your template to the
 node to be copyed.

 I think that the template should look like :

 xsl:template name=copyall
   xsl:copy
 xsl:for-each select=@*|node()
   xsl:call-templates name=copyall/
   /xsl:copy
 /xsl:template

 hope this works, i've not practiced for a long time :)

 
 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]




Re: URGENT!!! :RE: XML namespaces and result of RequestGenerator

2002-03-27 Thread KOZLOV Roman

Hi Volker,

Declare in your xsl file the request's namespace for example:

xsl:stylesheet ...
xmlns:req=http://xml.apache.org/cocoon/requestgenerator/2.0; ...

and then refer to request's elements with defined prefix, ex:
req:requestParameters

Best regards
Roman

Volker Schneider wrote:

 Hi Matthieu and all cocoon user colleagues,

 I looked into the archives as well, found something but that doesn't help at
 all. There is a link to a xsl-file that does not contain any xsl-tag. I
 don't know what the answer is and I stuck at this problem in a very urgent
 project.

 Please help me!

 Best regards
 - Volker -

 -Original Message-
 From: Matthieu Benéteau [mailto:[EMAIL PROTECTED]]
 Sent: Donnerstag, 21. März 2002 19:10
 To: Cocoon-Users
 Subject: RE: XML namespaces and result of RequestGenerator

 Sorry, this was a silly question, and I found the answer in the archives.
 My mistake.

 Matthieu

  -Message d'origine-
  De : Matthieu Benéteau [mailto:[EMAIL PROTECTED]]
  Envoyé : jeudi 21 mars 2002 18:46
  À : Cocoon-Users
  Objet : XML namespaces and result of RequestGenerator
 
 
  Hi,
 
  I have a little but annoying problem with the result of the
  RequestGenerator : during the XSL transformation I can't match
  any of the request elements (I can't even match the root
  request element).
 
 
  For instance :
 
?xml version=1.0 encoding=iso-8859-1?
xsl:stylesheet version=1.0
  xmlns:xsl=http://www.w3.org/1999/XSL/Transform;
 
  xsl:template match=/
one
  xsl:value-of select=request/@target/
  xsl:apply-templates
  select=request/requestParameters/parameter/
  xsl:apply-templates/
/one
  /xsl:template
 
  xsl:template match=parameter
contentinside parameter body/content
  /xsl:template
 
/xsl:stylesheet
 
  will result in an empty element : one/.
 
 
  But on the other hand, if I use the following template :
 
  !-- by default, copy everything as is --
  xsl:template match=@*|node()
xsl:copy
  xsl:apply-templates select=@*|node()/
/xsl:copy
  /xsl:template
 
  the one element contains the whole request.
 
 
  I suppose it's a namespace problem. The transformer doesn't seem
  to match elements with the
  xmlns=http://xml.apache.org/cocoon/requestgenerator/2.0;
  namespace declaration.
 
  Has anyone an idea ?
 
 
  Matthieu
 

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




Re: XSL-question: sort with parameter

2002-03-26 Thread KOZLOV Roman

Hi Axel,

You can use something like following:

  xsl:sort select=child::node()[name()=$order]/

Best regards
Roman



Axel Honfi wrote:

 Hi!

 I passed a parameter to a stylesheet and I can get the value with
 xsl:value-of select=$order-by/.

 But I need to sort data by the value of the parameter like

 xsl:sort select=$order-by order=ascending/.

 But with this nothing happens and all other forms I tried also failed.

 Does anyone know how to work this?

 Thanks a lot

 Axel

 -
 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: Where is META tag coming from?

2002-03-25 Thread KOZLOV Roman

Take into account that for XSL transformation you always have to put something
inside script element because HTML will be incorrect if there will be
script .../ tag after XSL transformation (if it is your case). Such a
script tag will be treated as unclosed in HTML. So you have to put at least
comment // inside script element like this:

script language=JavaScript src=some_source.js///script

Best regards
Roman

Piroumian, Konstantin wrote:

  From: Derek Hohls [mailto:[EMAIL PROTECTED]]
 
  Konstantin
 
  Thanks - this works fine when the JavaScript is included in
  the XSL file - does not work when the JS is a separate,
  linked file, tho'.

 Hm... So, what's the result? If you include a file then it must become
 something like:
 script src=code.js .../script

 Do you get this line? Or there's something else?

 I suspect that you have wrong pipeline in your sitemap. Try something like
 this:
 map:match pattern=*.js
 map:read src={1}.js mime-type=text/plain /
 /map:match

 --
 Konstantin Piroumian
 [EMAIL PROTECTED]

 
  Derek
 
   [EMAIL PROTECTED] 22/03/2002 04:26:19 
   From: MJ Ray [mailto:[EMAIL PROTECTED]]
  
   Derek Hohls wrote:
write('html');
write('head');
in the XSL file, and causing it to become:
  
   I think it's because cocoon sees the tags, not the context.
   Rather, to
   cocoon, the tags are the context and the rest is just so much
   content.
   Probably a good thing generally, but it's hurting you here.
  
   Have you tried write(''+'head');?   Not sure if that will
   work as a quick
   fix, or whether this mysterious '+'head tag will cause trouble.
  You
   probably want your Javascript in a different file anyway, though.
 
  The problem must be somewhere in the serialization part. A better way
  of
  using a JavaScript in XSL stylesheet is to wrap it as CDATA:
  DEFANGED_script
  ![CDATA[
  // your script here
  ]]
  /script
 
  --
  Konstantin Piroumian
  [EMAIL PROTECTED]
 
 
  
   Hope that helps,
   --
   MJR ,
   | Q. Do you need a net-based application developing,
   |or advice and training about web technology?
   | A. I suggest you try http://www.luminas.co.uk/
  
  
  -
   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]


-
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: Include Pipeline output in XSP.

2002-03-25 Thread KOZLOV Roman

Hi Sandhu,

As it was already described in the list, you can generate in separate pipeline
(or match)  your XSP as XML first, aggregating with or transforming from your
Xindice query results. Then you can refer to this pipeline as to a source for
XSP generator in other pipeline.

Best regards
Roman

sandhu@terra-firma wrote:

 Reasons to do this :

 1.I need to extract XML from Xindice using Pseudo-Protocol.
 2. The extracted xml has namespaces pointing to builtin logicsheets .
 3. The namespace has to be resolved in XSP - generator.
 (Is there any other way w/o type=serverpages generator to resolve
 namespace).

 Therefore the need to somehow include external(pipeline generated) xml in
 serverpages generator.

 Thanks

 Sandhu

 - Original Message -
 From: Vadim Gritsenko [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Tuesday, March 26, 2002 9:58 AM
 Subject: RE: Include Pipeline output in XSP.

  Hm, why do you want to do this?
 
  Anyway, take a look at the sub sitemaps samples then to get an idea what
  Cocoon can do.
 
  Vadim
 
   From: sandhu@terra-firma [mailto:[EMAIL PROTECTED]]
  
  
   CInclude transformer can do the job. See samples.
  
   Dear Vadim,
  
  
   i've tried that , but the transformer works after the generate bit -
  i.e xml
   gets included in the transformer stage- i need to work on included xml
  in
   xsp generator itself - before transform stage.
  
   basically need to call a pipeline from within xsp page and work on the
   included xml .
  
   Any pointers ?
  
   tks.
  
   -Original Message-
   From: sandhu@terra-firma [mailto:[EMAIL PROTECTED]]
   Sent: Monday, March 25, 2002 12:41 PM
   To: [EMAIL PROTECTED]
   Subject: Include Pipeline output in XSP.
  
   Hi users,
  
   I need to include cocoon pipeline output into an XSP page - has anyone
   done this using the pseudo protocol xmldb:xindice://  .
  
   XSP page to have something like :
  
   xsl:variable name=bbb select=cocoon://docs/file.xml) /
  
   or include or import etc. I need to work on the incoming xml in the
  XSP
   itself.
  
   Appreciate any help.
  
   Rgds,
   -S
  
 
 
  -
  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]




Problem with linking to CSS via Cocoon

2002-03-22 Thread KOZLOV Roman

Hello,

I've faced with more then mysterious problem: Cocoon (under Apache
Tomcat/4.0) generates error message in server console and in logs if my
css file is more then 2KB (2048b).
I have default sitemap where I just removed all the pipeline and
inserted the following:

  map:pipelines
map:pipeline
  map:match pattern=*.css
 map:read src={1}.css mime-type=text/css/
  /map:match

  map:match pattern=*.html
map:read src={1}.html mime-type=text/html/
  /map:match

  map:handle-errors
map:transform src=stylesheets/system/error2html.xsl/
map:serialize status-code=500/
  /map:handle-errors

/map:pipeline
  /map:pipelines

My test html is:

HTML
HEAD
titleTest/title
LINK rel='stylesheet' type='text/css' href=mycss.css/
/HEAD
body
form name=fff method=post
This is a test of reference to CSS.
/form
/body
/HTML


After tests I've became to the mycss.css file which contains first line
with code
body {background-color: white}

and other lines with spaces only - up to 2049 bytes of the file size.
If I remove one space then the error disappears.

Moreover, if I place some old css renamed as mycss.css (more than 3KB)
instead of described version of mycss.css then error message disappear,
BUT if I change the modification date of this css then error becomes
again.

I've tryed to change the default server port to 8090, but result is the
same.

What a magic? I don't understand. It seems that this is cache concerned.
I've tryed to remove cocoon's working directory - it did not help.
On other workstation it works without problems.
What should I check in my configuration? Has somebody any idea?

Thank you for response.
Roman


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




Getting response by servlet

2002-03-21 Thread KOZLOV Roman

Hello,

Is somebody able to explain why a servlet becomes in clinch waiting
for a response from cocoon? In sitemap.log I can see at the end of the
file:
. . .
DEBUG   (2002-03-21) 14:58.34:460   [sitemap.generator.stream]
(/bdl/testXML) HttpProcessor[8080][3]/StreamGenerator: processing stream
ContentType= text/xmlContentLen= 72

I'm using the following part of pipeline:

   map:match pattern=testXML
 map:generate type=stream/
 map:serialize type=xml/
   /map:match

to respond to the following servlet's request:

public String sendXML() {
String s=htmlheadOK/headbodynothing/body/html;
try {
URL myURL_ = new URL(http://localhost:8080/bdl/testXML;);
URLConnection con = myURL_.openConnection();
con.setDoInput(true);
con.setDoOutput(true);
con.setUseCaches(false);
con.setDefaultUseCaches(false);
con.setRequestProperty(Content-Type, text/xml);

HttpURLConnection httpCon = null;
InputStream input = null;
DataInputStream dataInput = null;
try {
httpCon = (HttpURLConnection)con;
OutputStream output = httpCon.getOutputStream();
PrintStream printOutput = new PrintStream(output);

// Send XML document to cocoon's stream generator
printOutput.println(?xml version=\1.0\?);
printOutput.println(request);
printOutput.println(actiongetTree/action);
printOutput.println(/request);

output.flush();
output.close();

  //*** The clinch becomes on the following line **
InputStream istr = httpCon.getInputStream();

  //*** The following code is unachievable   **
InputSource is = new InputSource(istr);
Document myDocument_ = Util.readDocument(is);
Util.writeDocument(myDocument_, s);

} catch (Exception e) {
e.printStackTrace();
} finally {
if (httpCon!=null) httpCon.disconnect();
}
} catch (java.net.MalformedURLException murle) {
murle.printStackTrace();
} catch (java.io.IOException ioe) {
ioe.printStackTrace();
}
return s;
}

Then s string is returned as a content of servlet response to a browser.

Thank you for your help.
Roman



-
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: sessionstate matcher usage: What's wrong?

2002-03-21 Thread KOZLOV Roman

Hello Christian,

Thank you very much for response. I've not found any designations substring in
core.log. For the moment I've divided the match on two matches - one for read and
one for write (just for tests).
The match for write is:

 map:match pattern=get_lub
 map:generate
src=xmldb:xindice://localhost:4080/db/data/somecollection/#//Some_Element/
 map:transform src=stylesheets/render_query.xsl/
 map:transform type=writeDOMsession
 map:parameter name=dom-name value=designations/
 map:parameter name=dom-root-element value=dom/
 /map:transform
 map:serialize type=xml/
 /map:match

For this match I get empty response.
What's the matter? If I comment writeDOMsession transformer then I get xml like
this:

 ?xml version=1.0 encoding=iso-8859-1 ?
 Elements xmlns:collection=http://apache.org/cocoon/xmldb/1.0;
  Element id=ID_XXX. . . /Element
. . .
 /Elements

However, when writeDOMsession transformer is used then response is empty and in
core.log I can see:

HttpProcessor[8080][0]/XMLDBSource: Querying collection
xmldb:xindice://localhost:4080/db/data/somecollection/; query= //Some_Element
FATAL_E (2002-03-21) 16:54.20:649   [core.xslt-processor] (/bdl/get_lub)
HttpProcessor[8080][0]/TraxErrorHandler: Error in TraxTransformer:
javax.xml.transform.TransformerException: java.lang.NullPointerException
javax.xml.transform.TransformerException: java.lang.NullPointerException
 at
org.apache.xalan.transformer.TransformerImpl.transformNode(TransformerImpl.java:1230)

 at org.apache.xalan.transformer.TransformerImpl.run(TransformerImpl.java:3139)
 at java.lang.Thread.run(Thread.java:484)
-
java.lang.NullPointerException
 at
org.apache.cocoon.transformation.WriteDOMSessionTransformer.storePrefixMapping(WriteDOMSessionTransformer.java:183)

 at
org.apache.cocoon.transformation.WriteDOMSessionTransformer.startPrefixMapping(WriteDOMSessionTransformer.java:120)

 at
org.apache.xalan.transformer.ResultTreeHandler.startAndAddPrefixMappings(ResultTreeHandler.java:1107)

 at
org.apache.xalan.transformer.ResultTreeHandler.flushPending(ResultTreeHandler.java:941)

 at
org.apache.xalan.transformer.ResultTreeHandler.endElement(ResultTreeHandler.java:306)

 at
org.apache.xalan.templates.ElemLiteralResult.execute(ElemLiteralResult.java:716)
 at
org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(TransformerImpl.java:2186)

 at
org.apache.xalan.transformer.TransformerImpl.applyTemplateToNode(TransformerImpl.java:2012)

 at
org.apache.xalan.transformer.TransformerImpl.transformNode(TransformerImpl.java:1175)

 at org.apache.xalan.transformer.TransformerImpl.run(TransformerImpl.java:3139)
 at java.lang.Thread.run(Thread.java:484)


Looking forward to your help.
Thank you in advance.
Roman


Christian Haul wrote:

 On 21.Mar.2002 -- 12:07 PM, KOZLOV Roman wrote:
  processed, so that writeDOMsession is called always. Could you please
  point to errors?
 
 map:match pattern=get_lub
 map:match type=sessionstate pattern=**
 map:parameter name=attribute-name value=designations/
 map:transform type=readDOMsession
 map:parameter name=dom-name value=designations/
 map:parameter name=trigger-element value=//
 map:parameter name=position value=in/
 /map:transform
 map:serialize type=xml/
 /map:match
 
 map:generate
  src=xmldb:xindice://localhost:4080/db/data/somecollection/#//Some_Element/
 
 map:transform src=stylesheets/render_query.xsl/
 map:transform type=writeDOMsession
 map:parameter name=dom-name value=designations/
 map:parameter name=dom-root-element value=dom/
 /map:transform
 map:serialize type=xml/
 /map:match

 Roman,
 you seem to be missing a map:generate/ in the upper
 pipeline. Anyway, could you check with core.log (?) that your session
 actually contains an attribute called designations?

 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]


begin:vcard 
n:KOZLOV;Roman
tel;work:+783 12 65 85 91, +783 12 62 27 76
x-mozilla-html:FALSE
org:DATAVISION CIS;PDM
adr:;;Gagarina Prospect 25b;Nizhny Novgorod;;;RUSSIA
version:2.1
email;internet:[EMAIL PROTECTED]
title:Programmer
fn:Roman KOZLOV
end:vcard



-
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: sessionstate matcher usage: What's wrong?

2002-03-21 Thread KOZLOV Roman

Cédric,

Thank you very much for your help. I've changed dom-root-element according to your 
remark (have set it to Elements),
but it was also necessary to remove xmlns:collection namespace declaration to get it 
work. So I've modified stylesheet
element in my xsl like this:

xsl:stylesheet version=1.0 xmlns:xsl=http://www.w3.org/1999/XSL/Transform;
  xmlns:collection=http://apache.org/cocoon/xmldb/1.0;
  exclude-result-prefixes=collection

Now map:match for writeDOMsession returns correct xml, however it seems that it is 
not stored in a session, because I
can't read it in map:match for readDOMsession. There is still no designations 
substring in cocoon's log's.
As a result of read request I get just the initial xml from generator's src without 
content which is proposed to be
stored in a session.
Pattern for reading is:

   map:match pattern=get_lub2
   map:generate src=data/elems_1.xml/
   map:transform type=readDOMsession
   map:parameter name=dom-name value=designations/
   map:parameter name=trigger-element value=Elements/
   map:parameter name=position value=in/
   /map:transform
   map:serialize type=xml/
   /map:match

where data/elems_1.xml (as well as a result of this match) is:

?xml version=1.0 encoding=iso-8859-1?
Elements/

Why read/writeDOMsession don't work here?

In sitemap.log I can see ERROR messages no session object. What does it mean? Should 
I create a session object myself?
If yes, how it is better to do?

DEBUG   (2002-03-21) 19:04.04:511   [sitemap.transformer.writeDOMsession] 
(/bdl/get_lub)
HttpProcessor[8080][4]/WriteDOMSessionTransformer: WriteSessionTransformer: setup
ERROR   (2002-03-21) 19:04.04:511   [sitemap.transformer.writeDOMsession] 
(/bdl/get_lub)
HttpProcessor[8080][4]/WriteDOMSessionTransformer: WriteSessionTransformer: no session 
object
DEBUG   (2002-03-21) 19:04.04:521   [sitemap.generator.file] (/bdl/get_lub) 
HttpProcessor[8080][4]/FileGenerator:
processing file xmldb:xindice://localhost:4080/db/data/somecollection/#//Some_Element
DEBUG   (2002-03-21) 19:04.04:521   [sitemap.generator.file] (/bdl/get_lub) 
HttpProcessor[8080][4]/FileGenerator: file
resolved to xmldb:xindice://localhost:4080/db/data/somecollection/
ERROR   (2002-03-21) 19:05.50:884   [sitemap.transformer.readDOMsession] 
(/bdl/get_lub2)
HttpProcessor[8080][4]/ReadDOMSessionTransformer: ReadSessionTransformer: no session 
object


Thank you for your help.
Roman

Cédric Damioli wrote:

 hi,

 you don't use the writeDOMsession in a proper way :
 the dom-name represents the name of the DOM stored in session
 the dom-root-element does NOT represent the root node of the stored
 DOM (leading to something like : domElements/Elements/dom) ,
 but the trigger element of the incoming SAX events which causes the
 Transformation to begin.
 In other words, you may try map:parameter name=dom-root-element
 value=Elements/ and it may match your needs.

 KOZLOV Roman wrote:

 Hello Christian,
 
 Thank you very much for response. I've not found any designations substring in
 core.log. For the moment I've divided the match on two matches - one for read and
 one for write (just for tests).
 The match for write is:
 
  map:match pattern=get_lub
  map:generate
 src=xmldb:xindice://localhost:4080/db/data/somecollection/#//Some_Element/
  map:transform src=stylesheets/render_query.xsl/
  map:transform type=writeDOMsession
  map:parameter name=dom-name value=designations/
  map:parameter name=dom-root-element value=dom/
  /map:transform
  map:serialize type=xml/
  /map:match
 
 For this match I get empty response.
 What's the matter? If I comment writeDOMsession transformer then I get xml like
 this:
 
  ?xml version=1.0 encoding=iso-8859-1 ?
  Elements xmlns:collection=http://apache.org/cocoon/xmldb/1.0;
   Element id=ID_XXX. . . /Element
 . . .
  /Elements
 
 However, when writeDOMsession transformer is used then response is empty and in
 core.log I can see:
 
 HttpProcessor[8080][0]/XMLDBSource: Querying collection
 xmldb:xindice://localhost:4080/db/data/somecollection/; query= //Some_Element
 FATAL_E (2002-03-21) 16:54.20:649   [core.xslt-processor] (/bdl/get_lub)
 HttpProcessor[8080][0]/TraxErrorHandler: Error in TraxTransformer:
 javax.xml.transform.TransformerException: java.lang.NullPointerException
 javax.xml.transform.TransformerException: java.lang.NullPointerException
  at
 
org.apache.xalan.transformer.TransformerImpl.transformNode(TransformerImpl.java:1230)
 
  at org.apache.xalan.transformer.TransformerImpl.run(TransformerImpl.java:3139)
  at java.lang.Thread.run(Thread.java:484)
 -
 java.lang.NullPointerException
  at
 
org.apache.cocoon.transformation.WriteDOMSessionTransformer.storePrefixMapping(WriteDOMSessionTransformer.java:183)
 
  at
 
org.apache.cocoon.transformation.WriteDOMSessionTransformer.startPrefixMapping(WriteDOMSessionTransformer.java:120

Re: HELP PLEASE, HELP with Piece of code.

2002-03-21 Thread KOZLOV Roman

Hi,

It seems that the reason of the error is that as a result of
transformation you get several root elements like
HTML.../HTML
HTML.../HTML
...

- one HTML element per Seleccion/Texto element in source xml.

I don't know what for you need it, but I think that the root element
should be single or you have to point that you need not output as XML
but text. I don't know how is it possible in cocoon, because it seems
that xsl:output element doesn't work here.

Best regards
Roman

Ivan Manuel Andrade Muñoz wrote:

 Hello to all.It wanted to request aid, to solve to this error when
 executing my page XML.My arhivo XML:Seleccion.xml?xml version=1.0
 encoding=ISO-8859-1 standalone=no?

 ?xml-stylesheet href=Seleccion.xsl type=text/xsl?

 ?cocoon-process type=xslt?

 Seleccion

 Texto

 titulo

 Sobre Libros:

 /titulo

 opcion

 De Internet.

 /opcion

 opcion

 De Base de Datos.

 /opcion

 /Texto

 Texto

 titulo

 Un Formulario:

 /titulo

 opcion

 De XML.

 /opcion

 opcion

 De Futbol.

 /opcion

 /Texto

 /SeleccionMy archivo XSL:Seleccion.xsl?xml version=1.0
 encoding=ISO-8859-1?

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

 xsl:template match=/



 xsl:processing-instruction name=cocoon-format

 type=text/html

 /xsl:processing-instruction

 xsl:for-each select=Seleccion/Texto

 HTML

 HEAD

 TITLE

 Libro

 /TITLE

 link rel=stylesheet type=text/css href=Seleccion.css
 title=Style/

 /HEAD

 BODY background=Arena.gif aLink=#ff bgColor=#ff
 link=#213d89 text=#00 vLink=#a15b2a

 P/

 CENTER

 IMG src=Linea.gif/

 P/

 H1

 UNA APLICACION XML

 /H1

 P/

 IMG src=Linea.gif/

 P/

 H2

 xsl:value-of select=titulo/

 /H2

 H3

 A HREF=Libros.xml

 xsl:apply-templates select='opcion'/

 /A

 /H3

 /CENTER

 CENTER

 IMG src=Linea.gif/

 P/

 IMG src=Linea.gif/

 /CENTER

 P/

 /BODY

 /HTML

 /xsl:for-each

 /xsl:template

 xsl:template match='opcion'

 xsl:value-of select=./

 P/

 /xsl:template



 /xsl:stylesheetMy
 
error:Error
 found handling the
 
request.-org.apache.xalan.xslt.XSLProcessorException:
 Can't have more than one root on a DOM!
 at
 org.apache.xalan.xslt.XSLTEngineImpl.error(XSLTEngineImpl.java:1674)
 at
 org.apache.xalan.xslt.XSLTEngineImpl.error(XSLTEngineImpl.java:1638)
 at
 org.apache.xalan.xslt.XSLTEngineImpl.process(XSLTEngineImpl.java:671)
 at
 org.apache.cocoon.transformer.XalanTransformer.transform(XalanTransformer.java:107)

 at
 org.apache.cocoon.processor.xslt.XSLTProcessor.process(XSLTProcessor.java:116)

 at org.apache.cocoon.Engine.handle(Engine.java:384)
 at org.apache.cocoon.Cocoon.service(Cocoon.java:183)
 at javax.servlet.http.HttpS!
 ervlet.service(HttpServlet.java:865)
 at
 org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:405)

 at org.apache.tomcat.core.Handler.service(Handler.java:287)
 at
 org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372)

 at
 org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:812)

 at
 org.apache.tomcat.core.ContextManager.service(ContextManager.java:758)

 at
 
org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(HttpConnectionHandler.java:213)

 at
 org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:416)

 at org.apache.tomcat.util.ThreadPo!
 ol$ControlRunnable.run(ThreadPool.java:501)
  ;at java.lang.Thread.run(Thread.java:484)
 -
 org.xml.sax.SAXException: Can't have more than one root on a DOM!
 aat
 org.apache.xalan.xpath.xml.FormatterToDOM.append(FormatterToDOM.java:155)

 at
 org.apache.xalan.xpath.xml.FormatterToDOM.startElement(FormatterToDOM.java:260)

 at
 org.apache.xalan.xslt.XSLTEngineImpl.flushPending(XSLTEngineImpl.java:3816)

 at
 
org.apache.xalan.xslt.XSLTEngineImpl$ResultTreeHandler.startElement(XSLTEngineImpl.java:3877)

 at
 org.apache.xalan.xslt.ElemLiteralResult.execute(ElemLiteralResult.java:211)

 at
 
org.apache.xalan.xslt.ElemTemplateElement.executeChildren(ElemTemplateElement.java:661)

 at org.apache.xala!
 n.xslt.ElemLiteralResult.execute(ElemLiteralResult.java:254)
 at
 
org.apache.xalan.xslt.ElemTemplateElement.executeChildren(ElemTemplateElement.java:661)

 at
 
org.apache.xalan.xslt.ElemTemplateElement.transformChild(ElemTemplateElement.java:1199)

 at
 
org.apache.xalan.xslt.ElemTemplateElement.transformSelectedChildren(ElemTemplateElement.java:962)

 at
 

Re: How to use the pattern

2002-03-21 Thread KOZLOV Roman

Sorry, my mistake:
in the first example {1} is hello.

KOZLOV Roman wrote:

 Hello,

 If you use wildcard matcher then you have to know that its pattern is
 matched to URL WITHOUT query string, i.e. URL part before ? sign. Query
 string is passed in request object to your generator's src. So in your first
 example {1} is jsp/hello.htm and {2} is EMPTY.

 Your second example seems to be correct if you have removed first one
 from your sitemap or just put second one before the first, because
 jsp/hello_abc.htm matches to jsp/*.htm*.

 Best regards.
 Roman

 Íõºì±¦ wrote:

  Dear All:
when I use the cocoon, I config the xmap file like follows:
 
   map:match pattern=jsp/*.htm*
  map:generate type=jsp src=/docs/samples/jsp/{1}.jsp{2}/
  map:transform src=docs/samples/jsp/{1}.xsl/
  map:serialize type=html/
 /map:match
 
  I request the url http://localhost:8080/cocoon/jsp/hello.htm?test=abc
  the page http://localhost:8080/cocoon/jsp/hello.jsp?test=abc works well.
 
  but I don't want the user feel this is a active page, so I change the
  xmap to the follows:
 
   map:match pattern=jsp/*_*.htm
  map:generate type=jsp src=/docs/samples/jsp/{1}.jsp?test={2}/
  map:transform src=docs/samples/jsp/{1}.xsl/
  map:serialize type=html/
 /map:match
 
  but the webserver throw FileNotFound Exception.
 
  FileUtil: in safePath(E:\tomcat\webapps\cocoon, /docs/samples/jsp/hello.
  jsp?test
  =abc),
  realPath=E:\tomcat\webapps\cocoon\docs\samples\jsp\hello.jsp?test=abc
  java.io.IOException: ϵͳÕÒ²»µ½Ö¸¶¨µÄ·¾¶¡£
 
  I want to know how to implement this.
 
  -
  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 use the pattern

2002-03-21 Thread KOZLOV Roman

Hello,

If you use wildcard matcher then you have to know that its pattern is
matched to URL WITHOUT query string, i.e. URL part before ? sign. Query
string is passed in request object to your generator's src. So in your first
example {1} is jsp/hello.htm and {2} is EMPTY.

Your second example seems to be correct if you have removed first one
from your sitemap or just put second one before the first, because
jsp/hello_abc.htm matches to jsp/*.htm*.

Best regards.
Roman

Íõºì±¦ wrote:

 Dear All:
   when I use the cocoon, I config the xmap file like follows:

  map:match pattern=jsp/*.htm*
 map:generate type=jsp src=/docs/samples/jsp/{1}.jsp{2}/
 map:transform src=docs/samples/jsp/{1}.xsl/
 map:serialize type=html/
/map:match

 I request the url http://localhost:8080/cocoon/jsp/hello.htm?test=abc
 the page http://localhost:8080/cocoon/jsp/hello.jsp?test=abc works well.

 but I don't want the user feel this is a active page, so I change the
 xmap to the follows:

  map:match pattern=jsp/*_*.htm
 map:generate type=jsp src=/docs/samples/jsp/{1}.jsp?test={2}/
 map:transform src=docs/samples/jsp/{1}.xsl/
 map:serialize type=html/
/map:match

 but the webserver throw FileNotFound Exception.

 FileUtil: in safePath(E:\tomcat\webapps\cocoon, /docs/samples/jsp/hello.
 jsp?test
 =abc),
 realPath=E:\tomcat\webapps\cocoon\docs\samples\jsp\hello.jsp?test=abc
 java.io.IOException: ϵͳÕÒ²»µ½Ö¸¶¨µÄ·¾¶¡£

 I want to know how to implement this.

 -
 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: error-compling sitemap_xmap

2002-03-19 Thread KOZLOV Roman



Hi Cyril,
I've got the same error message sometimes and when I've tryed to find
the mentioned line I've found out that the java file was corrupted and
cutted up to this line so that method definition (which was started in
this line) was cutted.
I've need to restart the server after this. Perhaps there were some
problems like "out of memory".
 Roman

cyril vidal wrote:

Thomas,
John,thanks
a lot for your help. I've looked for the mentionned file.But
actually, it's a little bit too difficult for me to find the line
573 in the java
file, especially for a missing "}".I've
tried it but without success...I've
forgotten to say to you that when I start Tomcat, I get the following message
in the command line:Server.
run /init:java.net.BindExecption:Adress in use:bindjava.net.BindException:Adress
in use:bind
at java.net.PlainSocketImpl.socketBind(nativMethod)...Sitemap
location = sitemap.xmapChecking
sitemap reload=true...Starting
service Tomcat-ApacheApache
Tomcat/4.0.1Is
this normal? Doesn't the above compilation error come from here?Is
this compilation error a frequent error?Thanks
for your answers,Cyril.







- Original Message -

From:
John
Turk

To: [EMAIL PROTECTED]

Sent: Monday, March 18, 2002 8:14
PM

Subject: RE: error-compling sitemap_xmap
Cyril
-sitemap.xmap
is converted into a java source file - that's the file the 571 lines refers
to. You can find that file under the Tomcat work directory (look
for something like cocoon/cocoon-files/org/apache/cocoon/www/sitemap_xmap.java).John

-Original
Message-
From: cyril vidal [mailto:[EMAIL PROTECTED]]
Sent: Monday, March 18, 2002
11:05 AM
To: [EMAIL PROTECTED]
Subject: error-compling sitemap_xmap

Hello,When
I want to transform some documents (it doesn't happen with serving static
documents), I obtain a strange error messagetype
fatal
message Language Exception
description org.apache.cocoon.ProcessingException:
Language Exception: org.apache.cocoon.components.language.LanguageException:
Error compiling sitemap_xmap: Line 571, column 63: '}' expected. Line 0,
column 0: Note: C:\tomcat\work\localhost\essai\cocoon-files\org\apache\cocoon\www\sitemap_xmap.java
uses or overrides a deprecated API. Recompile with "-deprecation" for details.
1 error, 1 warning
but my sitemap.xmap file doesn't include 571 lignes!!! This is the short
following one:
?xml version="1.0"?>
map:sitemap
xmlns:map="http://apache.org/cocoon/sitemap/1.0">

map:components>
map:generators
default="file">
 map:generator
name="file" src="org.apache.cocoon.generation.FileGenerator"/>
/map:generators>
map:transformers
default="xslt">
 map:transformer
name="xslt" src="org.apache.cocoon.transformation.TraxTransformer"/>
/map:transformers>
map:readers
default="resource">
 map:reader
name="resource" src="org.apache.cocoon.reading.ResourceReader"/>
/map:readers>
map:serializers
default="html">
 map:serializer
name="xml" mime-type="text/xml" src="org.apache.cocoon.serialization.XMLSerializer"/>
 map:serializer
name="html" mime-type="text/html" src="org.apache.cocoon.serialization.HTMLSerializer"/>
 map:serializer
name="svg2png" src="org.apache.cocoon.serialization.SVGSerializer" mime-type="image/png"/>
 map:serializer
name="fo2pdf" src="org.apache.cocoon.serialization.FOPSerializer" mime-type="application/pdf"/>
/map:serializers>
map:matchers
default="wildcard">
 map:matcher
name="wildcard" src="org.apache.cocoon.matching.WildcardURIMatcher"/>
/map:matchers>
/map:components>
map:pipelines>
 map:pipeline>

map:match pattern="index.html">

map:read src="static/index.html" mime-type="text/html"/>

/map:match>
 /map:pipeline>
map:pipeline>

map:match pattern="content/*.html">

map:generate src="content/{1}.xml"/>

map:tranform src="transforms/tri.xsl"/>

map:serialize type="html"/>

/map:match>
/map:pipeline>

/map:pipelines>
/map:sitemap>
Someone could
tell me what's happening?
Thanks for your
help,
Cyril.






begin:vcard 
n:KOZLOV;Roman
tel;work:+783 12 65 85 91, +783 12 62 27 76
x-mozilla-html:FALSE
org:DATAVISION CIS;PDM
adr:;;Gagarina Prospect 25b;Nizhny Novgorod;;;RUSSIA
version:2.1
email;internet:[EMAIL PROTECTED]
title:Programmer
fn:Roman KOZLOV
end:vcard



-
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: sitemap_xmap.java cut!

2002-03-19 Thread KOZLOV Roman

Cyril,

I've found the reason - error in your sitemap:
  map:tranform src=transforms/tri.xsl/
- tranform instead of transform.

Best regards
Roman


cyril vidal wrote:

 Hi, Some of you would know why my file sitemap_xmap.java is cut up
 (after generator method instruction) and so why I can't absolutly not
 transform my xml document as I would like to?I've installed binary
 version of Cocoon2.0.1 with Tomcat 4.0.1 on Windows Me Thanks for your
 answers.Cyril.


-
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: sitemap_xmap.java cut!

2002-03-19 Thread KOZLOV Roman

You missed s in transform word. You have to write:
map:transform src=transforms/tri.xsl/
instead of
map:tranform src=transforms/tri.xsl/

Roman

cyril vidal wrote:

 Roman,

 Sorry for still disturbing you.
 But I don't understand what I have to write instead of:
  map:tranform src=transforms/tri.xsl/
 Is this instruction not correct?
 Best,
 Cyril.
 - Original Message -
 From: KOZLOV Roman [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Tuesday, March 19, 2002 1:42 PM
 Subject: Re: sitemap_xmap.java cut!

  Cyril,
 
  I've found the reason - error in your sitemap:
map:tranform src=transforms/tri.xsl/
  - tranform instead of transform.
 
  Best regards
  Roman
 
 
  cyril vidal wrote:
 
   Hi, Some of you would know why my file sitemap_xmap.java is cut up
   (after generator method instruction) and so why I can't absolutly not
   transform my xml document as I would like to?I've installed binary
   version of Cocoon2.0.1 with Tomcat 4.0.1 on Windows Me Thanks for your
   answers.Cyril.
 
 
  -
  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]


begin:vcard 
n:KOZLOV;Roman
tel;work:+783 12 65 85 91, +783 12 62 27 76
x-mozilla-html:FALSE
org:DATAVISION CIS;PDM
adr:;;Gagarina Prospect 25b;Nizhny Novgorod;;;RUSSIA
version:2.1
email;internet:[EMAIL PROTECTED]
title:Programmer
fn:Roman KOZLOV
end:vcard



-
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: Different behaviours of HTMLSerializer, in attributes and elements.

2002-03-18 Thread KOZLOV Roman

Hello,

IMHO, in the script line you have to put the character itself and not eacute;
because such an entity will not be substituted. So try the following:

parent.centerFrame.location.hash='#puissance réelle';

PS: I've not checked if the %C3%A9 in an element's name will be translated by
script interpreter (and I don't know exactly a kind of interpreter you use) so
perhaps you need xsl:attribute element with CDATA section in your XML source.

Best regards
Roman

Matthieu Benéteau wrote:

 Hi,

 I have a little problem with the HTMLSerializer and accented letters in
 French.
 I'm working with Cocoon 2.0.1.
 All my XML files and stylesheets and all my components use the iso-8859-1
 encoding.

 In my XML file I have the following element, which has an eacute; letter in
 attribute nom :

 dimensionPhysique nom='puissance réelle' indexDimension='9'/

 This element is correctly processed by a stylesheet to give the following
 XHTML :

 a name=puissance réelle/a
 table
   tr
 td bgcolor=#EEDDEE
   bDimension name :/b
   puissance réelle
   br/
   bDimension index :/b
   9
 /td
   /tr
   ...
 /table

 So now the accented letter appears twice : once in the name attribute of
 an anchor, and once in the content of a table row. No problem here.

 The problem appears after serialization with the HTMLSerializer, which gives
 the following HTML :

 META http-equiv=Content-Type content=text/html; charset=iso-8859-1
 ...
 a name=puissance r%C3%A9elle/a
 table
   tr
 td bgcolor=#EEDDEE
   bDimension name : /b
   puissance reacute;elle
   br/
   bDimension index : /b
   9
 /td
   /tr
   ...
 /table

 In the name atribute of the anchor, the eacute; letter has been replaced
 by %C3%A9, so the following instruction will fail :
 parent.centerFrame.location.hash='#puissance reacute;elle';

 IMHO, this is not a correct behaviour of the HTMLSerializer.
 Am I right ?

 Matthieu

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


begin:vcard 
n:KOZLOV;Roman
tel;work:+783 12 65 85 91, +783 12 62 27 76
x-mozilla-html:FALSE
org:DATAVISION CIS;PDM
adr:;;Gagarina Prospect 25b;Nizhny Novgorod;;;RUSSIA
version:2.1
email;internet:[EMAIL PROTECTED]
title:Programmer
fn:Roman KOZLOV
end:vcard



-
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: xsp-session:isNew question

2002-03-18 Thread KOZLOV Roman

Hi,

It's just a guess, but could you try the following syntax:

xsp-session:is-new
... something what is treated when a session is new ...
/xsp-session:is-new

Best regards
Roman

Stefano Bonnin wrote:

 ok, I tried this:

 xsp:logic
 
 
 boolean isNew = xsp-session:is-new/;
 
 
 /xsp:logic

 but the following error was returned:

 Line 133, column 16: Incompatible type for declaration. Can't convert void
 to boolean.

 Why?
 (I can't use xsp-session inside xsp:logic (perhaps)?

 Thanks.

 - Original Message -
 From: Vadim Gritsenko [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Thursday, March 14, 2002 4:21 PM
 Subject: RE: xsp-session:isNew question

   From: Stefano Bonnin [mailto:[EMAIL PROTECTED]]
  
   Hi,
  
   I want check if the session is new, so, I have to use
  xsp-session:is-new
   tag.
  
   How can I use this tag?
  
   Can I write a code as following
  
   boolean isNew = xsp-session:is-new/;
 
  Yes. Try it.
 
 
   or
  
   if (xsp-session:is-new/) .
 
  Yep. Try it also.
 
 
   In other words, how can I use this tag?
 
  As shown above :)
 
 
   (I ask this because I didn't see any example about it.
 
  (See
  http://cvs.apache.org/viewcvs.cgi/xml-cocoon2/src/webapp/docs/samples/xs
  p/session.xsp?rev=1.4content-type=text/vnd.viewcvs-markup)
 
  Vadim
 
 
 
  -
  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]
 

 ---
 Outgoing mail is certified Virus Free. (CopyRight FLASHH!)
 Checked by AVG anti-virus system (http://www.grisoft.com).
 Version: 6.0.338 / Virus Database: 189 - Release Date: 14/03/02

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


begin:vcard 
n:KOZLOV;Roman
tel;work:+783 12 65 85 91, +783 12 62 27 76
x-mozilla-html:FALSE
org:DATAVISION CIS;PDM
adr:;;Gagarina Prospect 25b;Nizhny Novgorod;;;RUSSIA
version:2.1
email;internet:[EMAIL PROTECTED]
title:Programmer
fn:Roman KOZLOV
end:vcard



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


java.net.SocketException: Connection aborted by peer: socket write error

2002-03-15 Thread KOZLOV Roman

Hi all,

Could you please help. How I can eliminate the following exception
(copied from console) ?
. . .
Starting service Tomcat-Apache
Apache Tomcat/4.0
java.lang.RuntimeException: java.net.SocketException: Connection aborted
by peer
: socket write error
at
org.apache.xalan.transformer.TransformerImpl.run(TransformerImpl.java
:3174)
at java.lang.Thread.run(Thread.java:484)
==

I've just requested http://localhost:8080/bdl/search_card for which
I have the following pipeline:

  map:pipeline
. . .
map:match pattern=**css/*.css
map:read src=html/css/{2}.css mime-type=text/css/
/map:match
   map:match pattern=**scripts/*.js
 map:read src=html/scripts/{2}.js
mime-type=application/javascript/
   /map:match
   map:match pattern=**img/*.gif
 map:read src=html/img/{2}.gif mime-type=image/gif/
   /map:match

   map:match pattern=search_card
map:select type=request-parameter
 map:parameter name=parameter-name value=Item/
 map:when test=newsearch
 map:aggregate element=selections
 map:part src=cocoon:/get_lubricants
element=select_lubricant/
 map:part src=cocoon:/get_suppliers
element=select_supplier/
 map:part src=cocoon:/get_natures
element=select_nature/
 map:part src=cocoon:/number_lubricants
element=found/
 /map:aggregate
 map:transform src=stylesheets/search_card.xsl/
 map:transform type=i18n/
 map:transform src=stylesheets/search2html.xsl/
  /map:when
  map:when test=list
  map:generate src=cocoon:/query_lubricants/
  /map:when
  map:otherwise
  map:aggregate element=selections
  map:part src=cocoon:/get_lubricants
element=select_lubricant/
  map:part src=cocoon:/get_suppliers
element=select_supplier/
  map:part src=cocoon:/get_natures
element=select_nature/
  /map:aggregate
  map:transform src=stylesheets/search_card.xsl/
  map:transform type=i18n/
  map:transform src=stylesheets/search2html.xsl/
   /map:otherwise
  /map:select
  map:serialize/
   /map:match
. . .
==


In the core.log I can see:

HttpProcessor[8080][3]/CachingStreamPipeline: IOException in
ProcessReader
java.net.SocketException: Connection aborted by peer: socket write error

 at java.net.SocketOutputStream.socketWrite(Native Method)
. . .
org.apache.cocoon.components.pipeline.CachingStreamPipeline.process(CachingStreamPipeline.java:249)

 at
org.apache.cocoon.www.sitemap_xmap.matchN102A4(sitemap_xmap.java:3745)
. . .
 at java.lang.Thread.run(Thread.java:484)
WARN(2002-03-15) 14:45.05:085   [core] (/bdl/css/ome.css)
HttpProcessor[8080][3]/sitemap_xmap: Error, try to process the error
page
org.apache.cocoon.ProcessingException: Failed to execute pipeline.:
java.net.SocketException: Connection aborted by peer: socket write error

. . .
==

When I look at the sitemap_xmap.java for the matchN102A4 I see:

. . .
//line numbers not supported with xalan
try {

  // method for handling **css/*.css
  if (matchN102A4(redirector, environment, pipeline,
  eventPipeline, internalRequest, listOfMaps))
return true;


  // method for handling **scripts/*.js
. . .
  //line numbers not supported with xalan// method for handling
**css/*.css
  private final boolean matchN102A4(SitemapRedirector redirector,
Environment environment,
StreamPipeline pipeline,
EventPipeline eventPipeline, boolean
internalRequest,
List listOfMaps) throws
ConnectionResetException,
  ResourceNotFoundException, Exception {
Map map;
Parameters param;
Map objectModel = environment.getObjectModel();
String cocoon_view = environment.getView();
String cocoon_action = environment.getAction();
final boolean debug_enabled = getLogger().isDebugEnabled();

if ((map = matches(wildcard, matcher_N102A4_expr, **css/*.css,
   Parameters.EMPTY_PARAMETERS, objectModel)) !=
null) {
  if (debug_enabled)
getLogger().debug(Matched wildcard pattern **css/*.css);
  listOfMaps.add (map);
  this.dumpParameters(listOfMaps);



  getLogger().debug(Component
reader:resource(Parameters.EMPTY_PARAMETERS));

  if (debug_enabled)
getLogger().debug(Source=  + substitute(listOfMaps,
html/css/{2}.css));

  getLogger().debug(Mime-type= text/css);
  pipeline.setReader (resource,
  substitute(listOfMaps, html/css/{2}.css),
  Parameters.EMPTY_PARAMETERS, text/css);

  if 

Re: Aggregation problem

2002-03-13 Thread KOZLOV Roman

Hi Arnaud,

It is necessary to define element for each map:part also:
  map:part src=cocoon:/autolayout.xml element=uuu/
  map:part src=cocoon:/coco.xml element=ooo/

Best regards.
Roman

Arnaud Vandyck wrote:

 Hi all,

 I have these entries in a sub-sitemap:

   map:match pattern=autolayout.xml
 map:read src=docs2/autolayout.xml mime-type=text/xml/map:read
 map:serialize type=xml /
   /map:match

   map:match pattern=test.xml
 map:aggregate element=site
   map:part src=cocoon:/autolayout.xml /
   map:part src=cocoon:/coco.xml /
 /map:aggregate
 map:serialize type=xml /
   /map:match

   map:match pattern=**.xml
 map:read src=docs2/{1}.xml mime-type=text/xml/map:read
 map:serialize type=xml /
   /map:match

 Accessing autolayout.xml  and index.xml  (first and last  entries) are
 OK. But the aggregation fails:

 $ lynx -source http://localhost/cocoon/ste/test.xml

 ?xml version=1.0 encoding=UTF-8?
 site
   autolayout/
 /site
 html
   headtitleInternal server error/title
 STYLE
   !--H1{font-family : sans-serif,Arial,Tahoma;color : white;background-color : 
#0086b2;}
   BODY{font-family : sans-serif,Arial,Tahoma;color : black;background-color : 
white;}
   B{color : white;background-color : #0086b2;} HR{color : #0086b2;} --
 /STYLE
   /head
   body
   h1Cocoon 2 - Internal server error/h1
   HR size=1 noshade
   pbtype/b internal-server-error/p
   pbmessage/b uAttempted to process incomplete pipeline./u/p
   pbdescription/b uorg.apache.cocoon.ProcessingException: Attempted to 
process incomplete pipeline./u/p
   pbsender/b org.apache.cocoon.servlet.CocoonServlet/ppbsource/b 
Cocoon servlet/p
   pbrequest-uri/bpre/cocoon/ste/test.xml/pre/p
   pbexception/bpreorg.apache.cocoon.ProcessingException: Attempted to 
process incomplete pipeline./pre/p
   pbpath-info/bpreste/test.xml/pre/p
   pbstacktrace/bpreorg.apache.cocoon.ProcessingException: Attempted to 
process incomplete pipeline.
 at 
org.apache.cocoon.components.pipeline.CachingEventPipeline.setup(CachingEventPipeline.java:235)
 at 
org.apache.cocoon.components.pipeline.CachingEventPipeline.generateKey(CachingEventPipeline.java:99)
 at 
org.apache.cocoon.components.source.SitemapSource.refresh(SitemapSource.java:240)
 at 
org.apache.cocoon.components.source.SitemapSource.init(SitemapSource.java:152)
 at 
org.apache.cocoon.components.source.CocoonSourceFactory.getSource(CocoonSourceFactory.java:54)
 at 
org.apache.cocoon.components.source.SourceHandlerImpl.getSource(SourceHandlerImpl.java:133)
 at 
org.apache.cocoon.environment.AbstractEnvironment.resolve(AbstractEnvironment.java:272)
 at 
org.apache.cocoon.sitemap.ContentAggregator.setup(ContentAggregator.java:242)
 at 
org.apache.cocoon.components.pipeline.AbstractEventPipeline.setupPipeline(AbstractEventPipeline.java:142)
 at 
org.apache.cocoon.components.pipeline.CachingEventPipeline.setup(CachingEventPipeline.java:239)
 at 
org.apache.cocoon.components.pipeline.CachingEventPipeline.generateKey(CachingEventPipeline.java:99)
 at 
org.apache.cocoon.components.pipeline.CachingStreamPipeline.process(CachingStreamPipeline.java:277)
 at 
org.apache.cocoon.www.ste.sitemap_xmap.wildcardMatchN400065(sitemap_xmap.java:816)
 at org.apache.cocoon.www.ste.sitemap_xmap.process(sitemap_xmap.java:535)
 at org.apache.cocoon.www.ste.sitemap_xmap.process(sitemap_xmap.java:483)
 at org.apache.cocoon.sitemap.Handler.process(Handler.java:163)
 at org.apache.cocoon.sitemap.Manager.invoke(Manager.java:114)
 at 
org.apache.cocoon.www.sitemap_xmap.wildcardMatchN400225(sitemap_xmap.java:3394)
 at org.apache.cocoon.www.sitemap_xmap.process(sitemap_xmap.java:2621)
 at org.apache.cocoon.www.sitemap_xmap.process(sitemap_xmap.java:2523)
 at org.apache.cocoon.sitemap.Handler.process(Handler.java:163)
 at org.apache.cocoon.sitemap.Manager.invoke(Manager.java:114)
 at org.apache.cocoon.Cocoon.process(Cocoon.java:514)
 at org.apache.cocoon.servlet.CocoonServlet.service(CocoonServlet.java:647)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
 at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
 at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
 at 
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:243)
 at 
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
 at 
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
 at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
 at 

Re: Help on sitemap

2002-03-13 Thread KOZLOV Roman


Hi,
You can try this

 map:match pattern="text.xml">
 map:match type="request-parameter" pattern="style">
 map:generate src="text.xml"/>
 map:transform src="{1}"/>
 map:serialize type="xml"/>
 /map:match>
 map:generate src="text.xml"/>
 map:serialize type="xml"/>
 /map:match>
or
 map:match pattern="test.xml">
 map:generate src="test.xml"/>
 map:select type="request-parameter">

map:parameter name="parameter-name" value="style"/>

map:when test="test.xsl">

map:transform src="test.xsl"/>

/map:when>

map:otherwise>

/map:otherwise>
 /map:select>
 map:serialize name="xml"/>
 /map:match>
Best regards
 Roman

yuryx wrote:
/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
>
> Thanks
>
Try define sitemap parameter in action from request
Like:
public class MyAction extends AbstractAction {
 public Map act (Redirector redirector,

SourceResolver resolver,

Map objectModel,

String source,

Parameters params) {
 Map sitemapParams = new HashMap();
 Request request = (Request)
objectModel.get(Constants.REQUEST_OBJECT);
 String mStyle=request.getParameter("style");
 sitemapParams.put("style", mStyle);
 return sitemapParams;
 }
}
in sitemap:
 map:match pattern="test/*">
 map:generate type="serverpages" src="work/test/{1}.xsp"/>
 map:act type="MyAction">
 map:transform src="work/test/{style}"/>
 /map:act>
 map:serialize type="html"/>
 /map:match>
Regards.
Yury.
-
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]>


begin:vcard 
n:KOZLOV;Roman
tel;work:+783 12 65 85 91, +783 12 62 27 76
x-mozilla-html:FALSE
org:DATAVISION CIS;PDM
adr:;;Gagarina Prospect 25b;Nizhny Novgorod;;;RUSSIA
version:2.1
email;internet:[EMAIL PROTECTED]
title:Programmer
fn:Roman KOZLOV
end:vcard



-
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: CInclude Question

2002-03-06 Thread KOZLOV Roman

Hello Sreedhar,

Your problem is in your xsl. Just try to comment cinclude:include
element in your including.xml and you'll get doubled text as a result of
request.
So it is necessary to fix xsl first without cinclude:include.
By the way, for me your example doesn't work at all until commenting
cinclude:include.

Best regards.
Roman

Sreedhar Chintalapaty wrote:

 I have a strange problem: my CInclude seems to work a little too
 enthusiastically!I thought the URI
 http://myServer/myApp/cinclude/including is supposed to
 show Including includes Included!  once, but it's showing it
 twice!Here's what I have:- In Site Map:

  map:match pattern=cinclude/*
  map:generate src=control/config/{1}.xml/
  map:transform type=cinclude/
  map:transform src=view/xsl/html/{1}.xsl/
  map:serialize/
  /map:match

 - In the Folder control/config, I have two files - including.xml and
 included.xml.

  including.xml
  ?xml version=1.0 encoding=UTF-8?
  page xmlns:cinclude=http://apache.org/cocoon/include/1.0;
  titleHello/title
  content
  paraIncluding includes /para
  cinclude:include
  src=http://schintalapat03l.ptcnet.ptc.com:8080/cocoon/gvs/included.xml/
  /content
  /page

  included.xml
  ?xml version=1.0?
  p
  strong
  Included!
  /strong
  /p

 - In the Folder view/xsl/html, I have two files - including.xsl and
 included.xsl.

  including.xsl
  ?xml version=1.0 encoding=UTF-8?
  xsl:stylesheet version=1.0
  xmlns:xsl=http://www.w3.org/1999/XSL/Transform;
  xmlns:fo=http://www.w3.org/1999/XSL/Format;
  xsl:output method=html indent=yes/
  xsl:template match=//
  xsl:value-of select=*/
  xsl:apply-templates/
  /xsl:template
  /xsl:stylesheet
  including.xsl
  ?xml version=1.0 encoding=UTF-8?
  xsl:stylesheet version=1.0
  xmlns:xsl=http://www.w3.org/1999/XSL/Transform;
  xmlns:fo=http://www.w3.org/1999/XSL/Format;
  xsl:output method=html indent=yes/
  xsl:template match=//
  xsl:apply-templates/
  /xsl:template
  /xsl:stylesheet

 Please pass on any suggestions on how I should debug this...Thanks,
 and Best Regards,

 Sreedhar Chintalapaty
 Consultant, ProjectLink Services,
 PTC – 140 Kendrick St., Needham MA
 02494___A
 computer is like an Old Testament god, with a lot of rules and no
 mercy


-
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: Desperately need help: Running Java code with XML values as input

2002-03-06 Thread KOZLOV Roman

Hello Noah,

Excuse me, please, if I'm too pedantic, but did you mean test=write instead of
write=test?

Best regards
Roman

Noah Mittman wrote:

 Well, that's it. I'm almost ready to scrap Cocoon.

 All I want to do is generate a simple HTML page that when requested
 does a little Java code first using some request parameters and
 values from the XML it's being generated from. I need to do this in
 many little ways: sending email, writing to a log, accessing
 services and sending data.

 Like:

 source.xml:
 foo id=100
 barHello/bar
 foo

 write.xsl?write=test (submitted via form):
 xsl:param name=test/
 xsl:template match=foo
 html
 xsp:logic
 SpecialLogger logger = new SpecialLogger(xsl:value-of
 select=@id/);
 if (logger.writeThis(xsl:value-of select=$test/)) {
 body
 xsl:value-of select=bar/ worked!
 !-- body content version A --
 /body
 } else {
 body
 xsl:value-of select=bar/ didn't work
 !-- body content version B --
 /body
 }
 xsp:logic
 /html
 /xsl:template

 + ~20 other xsl files that spit out frames based on the same XML
 but only require barebones XSLT

 This is important because this runs in a framed environment where
 all frames' HTML use the same XML as source, and I don't want to
 have any special code in the XML because there will be many of
 these sources soon, and it only needs to execute this code for this
 *one* transformation.

 The only way I have gotten this to work is to create a pipeline
 that turns the XML into an XSP and have the real URL match to a
 cocoon:/ protocol to generate that XML-to-XSP pipeline. While this
 works, it creates a class that WILL NOT RECOMPILE no matter how
 much the referenced XML changes until I restart Cocoon or manually
 delete it, which is unacceptable.

 It is absolutely imperative that I be able to accomplish this
 without adding any Java classes--I just won't have the access
 needed to do this.

 There MUST be a way!

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




Local characters in request params

2002-03-05 Thread KOZLOV Roman

Hello,

Still need of your help. Any advice would be gratefully appreciated.
Thank you.
==
Could you, please, help me? Is it possible to perform a request via
Cocoon 2.01 using xmldb protocol if xpath contains local characters,
for example 'é' (or %E9 or eacute;).
It seems that such characters are translated to escaped codes (like
eacute;) and dbXML (I use dbXML 1.0b4 Mustard) doesn't decode them.

Pieces of a pipeline:
   map:match pattern=getx/**
map:generate
src=cocoon:/xmldb/db/data/bdl/data/Lubrifiants/?xpath=//Lubrifiant[natureLubrifiant='pâte']/

map:serialize name=xml/
   /map:match

   map:match pattern=getx1/**
map:generate
src=cocoon:/xmldb/db/data/bdl/data/Lubrifiants/?xpath=//Lubrifiant[natureLubrifiant='p%E2te']/

map:serialize name=xml/
   /map:match

returns
collection:results query=//Lubrifiant[natureLubrifiant='pacirc;te']
resources=0 xmlns:collection=http://apache.org/cocoon/xmldb/1.0/

Meantime, such data exist in db and could be reviewed by means of
gopher's xpath query interface.
Moreover, such patterns without local codes (ex.:
natureLubrifiant='huile soluble') work fine.

For info:I didn't change a configuration of xmldb protocol and patterns,
just copied main sitemap.xmap provided in cocoon.war and added my
patterns.

Thank you in advance.

Roman


-
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: image internationalization

2002-03-04 Thread KOZLOV Roman

Try {../2} instead of {2} because you have to refer to a sitemap of a
pattern and not to a sitemap of an action.

Best regards.

Niket Anand wrote:

 Hi All,I want to configure pipeline such that in case of any locale
 language it will find the image from corresponding language mapped
 image folder.eg,If locale lang is en then it should find image from
 images_en folder. But I am not able to assign {2} value in pipeline(it
 should be the name of image assigned in match pattern).I define image
 src as src=forms/submit.gif in xsp or xml file.According to it, it
 should find image with name submit.gif from images_en folder.But here
 {2} value is not assigned(it assigned images_en\.gif), so it could not
 find image from images_en folder. map:match pattern=**forms/**.gif

 map:act type=locale
 map:read src=images_{lang}/{2}.gif mime-type=image/gif/
 /map:act
/map:match Please guide me how to use this concept.Thanks,Niket


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




Local characters in request params

2002-03-04 Thread KOZLOV Roman

Hi all,

Could you, please, help me? Is it possible to perform a request via
Cocoon 2.01 using xmldb protocol if xpath contains local characters,
for example 'é' (or %E9 or eacute;).
It seems that such characters are translated to escaped codes (like
eacute;) and dbXML (I use dbXML 1.0b4 Mustard) doesn't decode them.

Pieces of a pipeline:
   map:match pattern=getx/**
map:generate
src=cocoon:/xmldb/db/data/bdl/data/Lubrifiants/?xpath=//Lubrifiant[natureLubrifiant='pâte']/

map:serialize name=xml/
   /map:match

   map:match pattern=getx1/**
map:generate
src=cocoon:/xmldb/db/data/bdl/data/Lubrifiants/?xpath=//Lubrifiant[natureLubrifiant='p%E2te']/

map:serialize name=xml/
   /map:match

returns
collection:results query=//Lubrifiant[natureLubrifiant='pacirc;te']
resources=0 xmlns:collection=http://apache.org/cocoon/xmldb/1.0/

Meantime, such data exist in db and could be reviewed by means of
gopher's xpath query interface.
Moreover, such patterns without local codes (ex.:
natureLubrifiant='huile soluble') work fine.

For info:I didn't change a configuration of xmldb protocol and patterns,
just copied main sitemap.xmap provided in cocoon.war and added my
patterns.

Thank you in advance.

Roman


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




  1   2   >