Re: how to remove the DTD wriiten at the top ?

2002-06-24 Thread Sebastien SACARD

Vadim Gritsenko wrote:

From: Sebastien SACARD [mailto:[EMAIL PROTECTED]]

Hi,

I can't get rid off the DTD declaration written on top of the HTML

pages

created with a default serializer :

map:serializers default=html
   map:serializer name=html mime-type=text/html; charset

ISO-8859-1

src=org.apache.cocoon.serialization.HTMLSerializer
 encodingISO-8859-1/encoding
 doctype-public-//W3C//DTD HTML 4.0 Transitional//EN

/doctype-public


doctype-systemhttp://www.w3.org/TR/REC-html40/loose.dtd/doctype-syste
m

 omit-xml-declarationtrue/omit-xml-declaration
 indent1/indent
   /map:serializer

I thought the omit-xml-declaration was doing the trick, 


It omits *XML* declaration. According to spec, this is:

  ?xml ... ?


but it's not.
Is there somewhere else a parameter to define in order to remove these
30ko of datas off my pages ?


You mean 30 bytes?

Try

map:serializers default=html
   map:serializer name=html mime-type=text/html; charset

ISO-8859-1

src=org.apache.cocoon.serialization.HTMLSerializer
 encodingISO-8859-1/encoding
 omit-xml-declarationtrue/omit-xml-declaration
   /map:serializer


Or, don't use HTML serializer then, use XML serializer. It will not
write doctype.

Vadim

 

Thanks a lot

Hi all,

Unfortunatly, these tips did not work. Even when I serialise to XML 
everything stay in the header of my page. I really mean it's about 30ko, 
not 30 bytes. Here is what is included in my page, maybe it'll help you 
to understand my problem :

!DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.0 Transitional//EN 
http://www.w3.org/TR/REC-html40/loose.dtd;
!--
   Extensible HTML version 1.0 Transitional DTD

   This is the same as HTML 4.0 Transitional except for
   changes due to the differences between XML and SGML.

   Namespace = http://www.w3.org/1999/xhtml

   For further information, see: http://www.w3.org/TR/xhtml1

   Copyright (c) 1998-2000 W3C (MIT, INRIA, Keio),
   All Rights Reserved.

   This DTD module is identified by the PUBLIC and SYSTEM identifiers:

   PUBLIC -//W3C//DTD XHTML 1.0 Transitional//EN
   SYSTEM http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd;

   $Revision: 1.1 $
   $Date: 2000/01/26 14:08:56 $

--!-- Character mnemonic entities 
=--!-- Portions (C) International Organization 
for Standardization 1986
 Permission to copy in any form is granted for use with
 conforming SGML systems and applications as defined in
 ISO 8879, provided this notice is included in all copies.
--!-- Character entity set. Typical invocation:
!ENTITY % HTMLlat1 PUBLIC
   -//W3C//ENTITIES Latin 1 for XHTML//EN
   http://www.w3.org/TR/xhtml1/DTD/xhtml-lat1.ent;
%HTMLlat1;
--!-- no-break space = non-breaking space,
  U+00A0 ISOnum --!-- inverted 
exclamation mark, U+00A1 ISOnum --!-- cent sign, U+00A2 ISOnum --!-- 
pound sign, U+00A3 ISOnum --!-- currency sign, U+00A4 ISOnum --!-- 
yen sign = yuan sign, U+00A5 ISOnum --!-- broken bar = broken vertical 
bar,
  U+00A6 ISOnum --!-- section sign, 
U+00A7 ISOnum --!-- diaeresis = spacing diaeresis,
  U+00A8 ISOdia --!-- copyright sign, 
U+00A9 ISOnum --!-- feminine ordinal indicator, U+00AA ISOnum --!-- 
left-pointing double angle quotation mark
  = left pointing guillemet, U+00AB 
ISOnum --!-- not sign = discretionary hyphen,
  U+00AC ISOnum --!-- soft hyphen = 
discretionary hyphen,
  U+00AD ISOnum --!-- registered sign 
= registered trade mark sign,
  U+00AE ISOnum --!-- macron = spacing 
macron = overline
  = APL overbar, U+00AF ISOdia --!-- 
degree sign, U+00B0 ISOnum --!-- plus-minus sign = plus-or-minus sign,
  U+00B1 ISOnum --!-- superscript two 
= superscript digit two
  = squared, U+00B2 ISOnum --!-- 
superscript three = superscript digit three
  = cubed, U+00B3 ISOnum --!-- acute 
accent = spacing acute,
  U+00B4 ISOdia --!-- micro sign, 
U+00B5 ISOnum --!-- pilcrow sign = paragraph sign,
  U+00B6 ISOnum --!-- middle dot = 
Georgian comma
  = Greek middle dot, U+00B7 ISOnum 
--!-- cedilla = spacing cedilla, U+00B8 ISOdia --!-- superscript one 
= superscript digit one,
  U+00B9 ISOnum --!-- masculine 
ordinal indicator,
  U+00BA ISOnum --!-- right-pointing 
double angle quotation mark
  = right pointing guillemet, U+00BB 
ISOnum --!-- vulgar fraction one quarter
  = fraction one quarter, U+00BC ISOnum 
--!-- vulgar fraction one half
  = fraction one 

A newbie question

2002-06-24 Thread Jack Dong



hi,
I am a newbie to use cocoon,and get a question.
I use cocoon 2.1 and tomcat 4.0.4 beta3.
when i type
http://localhost:8080/cocoon, it's 
right.
but when i copy the "hello world" sample
from "$CATALINA_HOME/webapps/cocoon/sample/hello-world" 
to"$CATALINA_HOME/webapps/cocoon/hello-world" 
and type
http://localhost:8080/cocoon/hello-world/hello.html
it response a error page,that note"resource not found", why 
and what relation have between main sitemap and substitute sitemap?


by the way, what mean like "{1}.rdf ,{2}.rdf"?

thinks advance.




RE: Cocoon 2.0.3 + Jbuilder ?

2002-06-24 Thread TREGAN Fabien

-Message d'origine-
De: Piroumian Konstantin [mailto:[EMAIL PROTECTED]]
Date: jeudi 20 juin 2002 11:55
á: '[EMAIL PROTECTED]'
Objet: RE: Cocoon 2.0.3 + Jbuilder ?


I don't think that the problem comes from the content of the web.xml.
As I've told aready, I usually solve this problem by opening 
the web.xml
file in the editor (and better in the Source mode). This way 
JB does not touch the file.

I am interested to hear a better solution to this too.

Konstantin

I'm not really sure if this is the solution, since behaviour seems to be
changing randomly, but I finally manage to get it to work. All i hade to do
was to re-write the web.xml file... and maybe I change some option I can't
remember :)

Here is my web.xml :

?xml version=1.0 encoding=UTF-8?
!DOCTYPE web-app PUBLIC -//Sun Microsystems, Inc.//DTD Web Application
2.3//EN http://java.sun.com/dtd/web-app_2_3.dtd;
web-app
  display-nameCocoon2 Demo/display-name
  descriptionDemo application for Cocoon2/description
  servlet
servlet-nameCocoon2/servlet-name
display-nameCocoon2/display-name
descriptionThe main Cocoon2 servlet/description
servlet-classorg.apache.cocoon.servlet.CocoonServlet/servlet-class
init-param
  param-nameallow-reload/param-name
  param-valueyes/param-value
/init-param
init-param
  param-nameclassdebuginfo/param-name
  param-valuetrue/param-value
/init-param
init-param
  param-namecocoon-logger/param-name
  param-valuecore/param-value
/init-param
init-param
  param-nameconfigurations/param-name
  param-value/WEB-INF/cocoon.xconf/param-value
/init-param
init-param
  param-nameinit-classloader/param-name
  param-valuefalse/param-value
/init-param
init-param
  param-nameload-class/param-name
  param-valueorg.hsql.jdbcDriver/param-value
/init-param
init-param
  param-namelog-level/param-name
  param-valueDEBUG/param-value
/init-param
init-param
  param-namelogkit-config/param-name
  param-value/WEB-INF/logkit.xconf/param-value
/init-param
init-param
  param-namemanage-exceptions/param-name
  param-valuetrue/param-value
/init-param
init-param
  param-namerequest-factory/param-name
 
param-valueorg.apache.cocoon.components.request.MultipartRequestFactoryImp
l/param-value
/init-param
init-param
  param-nameservlet-config/param-name
  param-valueaccess/param-value
/init-param
load-on-startup1/load-on-startup
  /servlet
  servlet
servlet-namejspalacon/servlet-name
servlet-classorg.apache.cocoon.servlet.CocoonServlet/servlet-class
  /servlet
  servlet-mapping
servlet-nameCocoon2/servlet-name
url-pattern*.html/url-pattern
  /servlet-mapping
  servlet-mapping
servlet-nameCocoon2/servlet-name
url-pattern//url-pattern
  /servlet-mapping
  mime-mapping
extensioncss/extension
mime-typetext/css/mime-type
  /mime-mapping
/web-app

-
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: A newbie question

2002-06-24 Thread TREGAN Fabien

[please, use plain text in your posts]

Thought I do not have 2.1 here, I think that the problem is that every
directory in 'samples' is auto-mounted by the sitemap (this mean that every
request that start with samples/xxx are handled by the sitemap in
samples/xxx.)

Read the doc (or comments in the sitemap) to find how to (auto)mount other
directory. (hint : check the sitemap in /mount/)

fabien.


-Message d'origine-
De: Jack Dong [mailto:[EMAIL PROTECTED]]
Date: lundi 24 juin 2002 09:10
À: [EMAIL PROTECTED]
Objet: A newbie question


hi,
I am a newbie to use cocoon,and get a question.
I use cocoon 2.1 and tomcat 4.0.4 beta3.
when i type
http://localhost:8080/cocoon, it's right.
but when i copy the hello world sample 
from $CATALINA_HOME/webapps/cocoon/sample/hello-world
to$CATALINA_HOME/webapps/cocoon/hello-world 
and type
http://localhost:8080/cocoon/hello-world/hello.html
it response a error page,that noteresource not found, why and what
relation have between main sitemap and substitute sitemap?


by the way, what mean like {1}.rdf ,{2}.rdf?

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




Re: Lucene and cocoon-view

2002-06-24 Thread Ugo Cei

leo leonid wrote:

 yes, or add the label to the map:aggregate element, this will work, too.

Unfortunately, it does not :(. I'll try to come up with a self-contained 
sample later.

Ugo


-- 
Ugo Cei - Consorzio di Bioingegneria e Informatica Medica
P.le Volontari del Sangue, 2 - 27100 Pavia - Italy
Phone: +39.0382.525100 - 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]




Installation Problem

2002-06-24 Thread Roger Ting

Hi I am awfully new to Cocoon.. It took me 1 day to setup the TomCat Servlet 
4.0.3 properly. Now i run into the problem for Cocoon.

I am currently using cocoon 2.0.2. I tried to connect to
http://localhost:8080/cocoon but it keep throwing me this whole
chunk of error.

===
type fatal

message Error compiling sitemap

description org.apache.cocoon.ProcessingException: Error compiling sitemap: 
java.lang.NoClassDefFoundError

sender org.apache.cocoon.servlet.CocoonServlet

source Cocoon servlet

request-uri

/cocoon/

path-info



stack-trace

org.apache.cocoon.ProcessingException: Error compiling sitemap: 
java.lang.NoClassDefFoundError
at org.apache.cocoon.sitemap.Handler.run(Handler.java:295)
at java.lang.Thread.run(Thread.java:536)
Caused by: java.lang.NoClassDefFoundError
at org.apache.batik.dom.svg.SAXSVGDocumentFactory.(Unknown Source)
at org.apache.cocoon.xml.dom.SVGBuilder.(SVGBuilder.java:86)
at org.apache.cocoon.serialization.SVGSerializer.(SVGSerializer.java:95)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at 
sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
at 
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:274)
at java.lang.Class.newInstance0(Class.java:296)
at java.lang.Class.newInstance(Class.java:249)
at 
org.apache.avalon.excalibur.component.DefaultComponentFactory.newInstance(DefaultComponentFactory.java:98)
at 
org.apache.avalon.excalibur.pool.AbstractPool.newPoolable(AbstractPool.java:82)
at 
org.apache.avalon.excalibur.pool.AbstractPool.internalGrow(AbstractPool.java:126)
at 
org.apache.avalon.excalibur.pool.SoftResourceLimitingPool.grow(SoftResourceLimitingPool.java:91)
at 
org.apache.avalon.excalibur.pool.SoftResourceLimitingPool.initialize(SoftResourceLimitingPool.java:80)
at 
org.apache.avalon.excalibur.component.PoolableComponentHandler.initialize(PoolableComponentHandler.java:88)
at 
org.apache.avalon.excalibur.component.ExcaliburComponentSelector.addComponent(ExcaliburComponentSelector.java:467)
at 
org.apache.cocoon.sitemap.DefaultSitemapComponentSelector.addComponent(DefaultSitemapComponentSelector.java:181)
at 
org.apache.cocoon.sitemap.DefaultSitemapComponentSelector.addSitemapComponent(DefaultSitemapComponentSelector.java:188)
at 
org.apache.cocoon.sitemap.AbstractSitemap.load_component(AbstractSitemap.java:275)
at 
org.apache.cocoon.www.sitemap_xmap$Configurer.configSerializers(C:\cocoon-2.0.2-bin\jakarta-tomcat-4.0.3\work\localhost\cocoon\cocoon-files\org/apache/cocoon/www\sitemap_xmap.java:1129)
at 
org.apache.cocoon.www.sitemap_xmap.configure(C:\cocoon-2.0.2-bin\jakarta-tomcat-4.0.3\work\localhost\cocoon\cocoon-files\org/apache/cocoon/www\sitemap_xmap.java:470)
at 
org.apache.avalon.excalibur.component.DefaultComponentFactory.newInstance(DefaultComponentFactory.java:172)
at 
org.apache.avalon.excalibur.component.ThreadSafeComponentHandler.initialize(ThreadSafeComponentHandler.java:84)
at 
org.apache.cocoon.components.language.generator.GeneratorSelector.addGenerator(GeneratorSelector.java:170)
at 
org.apache.cocoon.components.language.generator.ProgramGeneratorImpl.load(ProgramGeneratorImpl.java:248)
at org.apache.cocoon.sitemap.Handler.run(Handler.java:270)
... 1 more
java.lang.NoClassDefFoundError
at org.apache.batik.dom.svg.SAXSVGDocumentFactory.(Unknown Source)
at org.apache.cocoon.xml.dom.SVGBuilder.(SVGBuilder.java:86)
at org.apache.cocoon.serialization.SVGSerializer.(SVGSerializer.java:95)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at 
sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
at 
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:274)
at java.lang.Class.newInstance0(Class.java:296)
at java.lang.Class.newInstance(Class.java:249)
at 
org.apache.avalon.excalibur.component.DefaultComponentFactory.newInstance(DefaultComponentFactory.java:98)
at 
org.apache.avalon.excalibur.pool.AbstractPool.newPoolable(AbstractPool.java:82)
at 
org.apache.avalon.excalibur.pool.AbstractPool.internalGrow(AbstractPool.java:126)
at 
org.apache.avalon.excalibur.pool.SoftResourceLimitingPool.grow(SoftResourceLimitingPool.java:91)
at 
org.apache.avalon.excalibur.pool.SoftResourceLimitingPool.initialize(SoftResourceLimitingPool.java:80)
at 

Re: JspGenerator Problem

2002-06-24 Thread Cenk Uysal

I tried it but I still get the same error. What about JSP file? is it
valid JSP that returns XML? I'm not sure. Interesting point is
Cocoon's own JSP Generator examples run correctly. Here is my JSP:

%@ page contentType=text/xml %
?xml version=1.0?
page
  title
%
out.println(With help from JSP);
%
  /title
/page



__
Do You Yahoo!?
Yahoo! - Official partner of 2002 FIFA World Cup
http://fifaworldcup.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]





Re: JspGenerator Problem

2002-06-24 Thread yuryx

Cenk Uysal wrote:

I tried it but I still get the same error. What about JSP file? is it
valid JSP that returns XML? I'm not sure. Interesting point is
Cocoon's own JSP Generator examples run correctly. Here is my JSP:
  

try %@ page language=java %

instead of

%@ page contentType=text/xml %
  

Regards.
Yury.



-
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: JspGenerator Problem

2002-06-24 Thread Piroumian Konstantin

 -Original Message-
 From: Cenk Uysal [mailto:[EMAIL PROTECTED]] 
 Sent: Monday, June 24, 2002 2:42 PM
 To: [EMAIL PROTECTED]
 Subject: Re: JspGenerator Problem
 
 
 I tried it but I still get the same error. What about JSP file? is it
 valid JSP that returns XML? I'm not sure. Interesting point is
 Cocoon's own JSP Generator examples run correctly. Here is my JSP:
 
 %@ page contentType=text/xml %
 ?xml version=1.0?
 page
   title
 %
 out.println(With help from JSP);
 %
   /title
 /page

A hint: run your JSP through the JSPReader to see what is the pure output of
your page. This can give you an idea on what is wrong (there can be an empty
line before the ?xml ...? - this causes problems in Xerces).

Also, see JSP examples in CVS HEAD branch to see how to setup a sitemap for
testing the pages (you can run the same JSP either a JSPReader or
JspGenerator at the same time). The samples are in webapp/samples/jsp/.

--
Konstantin Piroumian 
[EMAIL PROTECTED]

 
 
 
 __
 Do You Yahoo!?
 Yahoo! - Official partner of 2002 FIFA World Cup
 http://fifaworldcup.yahoo.com
 
 -
 Please check that your question  has not already been answered in the
 FAQ before posting. http://xml.apache.org/cocoon/faq/index.html
 
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail:   [EMAIL PROTECTED]
 

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

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




Re: JspGenerator Problem

2002-06-24 Thread Cenk Uysal

Nothing changed. Same error again. Can you try them in your system
for me? I want to learn is it my fault or Cocoon's fault?

__
Do You Yahoo!?
Yahoo! - Official partner of 2002 FIFA World Cup
http://fifaworldcup.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]




RE: JspGenerator Problem

2002-06-24 Thread Piroumian Konstantin

 From: Cenk Uysal [mailto:[EMAIL PROTECTED]] 
 
 Nothing changed. Same error again. Can you try them in your system
 for me? I want to learn is it my fault or Cocoon's fault?

If this was addressed to me, then yes, send your page.

Konstantin

 
 __
 Do You Yahoo!?
 Yahoo! - Official partner of 2002 FIFA World Cup
 http://fifaworldcup.yahoo.com
 
 -
 Please check that your question  has not already been answered in the
 FAQ before posting. http://xml.apache.org/cocoon/faq/index.html
 
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail:   [EMAIL PROTECTED]
 

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

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




Re: A newbie question

2002-06-24 Thread Diana Shannon


On Monday, June 24, 2002, at 03:09  AM, Jack Dong wrote:

 by the way, what mean like {1}.rdf ,{2}.rdf?

Please take a moment to read:
   http://xml.apache.org/cocoon/userdocs/matchers/matchers.html
   http://xml.apache.org/cocoon/userdocs/concepts/matchers_selectors.html

If you are still confused, report back to this list about what you find 
unclear about the above docs. (Please note that matchers.html was edited 
earlier this month.)

Thanks.

-- Diana

P.S. TODO: FAQ similar to above. Simple and Nested sitemap parameter 
Snippet docs. Perhaps simple concepts in Snippet docs are more 
accessible than docs?


-
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: JspGenerator Problem

2002-06-24 Thread Cenk Uysal

I tried JSPreader but now error is much more interesting. It returns
nothing. My sitemap entry is: 

  map:pipeline
map:match pattern=*.*
 map:read mime-type=text/html src=/welcome.jsp type=jsp/
/map:match
   /map:pipeline

Here the welcome.jsp is the Cocoon's own example for JSPReader.

But it runs in examples directory.

__
Do You Yahoo!?
Yahoo! - Official partner of 2002 FIFA World Cup
http://fifaworldcup.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]




RE: JspGenerator Problem

2002-06-24 Thread Piroumian Konstantin

 From: Cenk Uysal [mailto:[EMAIL PROTECTED]] 
 
 I tried JSPreader but now error is much more interesting. It returns
 nothing. My sitemap entry is: 

Have you looked at the log? Is there any relevant information? What do you
really get: 404 error or a blank page?

 
   map:pipeline
 map:match pattern=*.*
  map:read mime-type=text/html src=/welcome.jsp type=jsp/
 /map:match
/map:pipeline

Change src attribute like this: src=welcome.jsp.

 
 Here the welcome.jsp is the Cocoon's own example for JSPReader.
 
 But it runs in examples directory.

Sorry, don't understand the above two sentences.

What is your Cocoon version? Would you send your page to me so I could check
what is wrong with it?

Konstantin

 
 __
 Do You Yahoo!?
 Yahoo! - Official partner of 2002 FIFA World Cup
 http://fifaworldcup.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]




Elegant solution for filling forms

2002-06-24 Thread Andrei Svirida

Hello Cocooners,

I have a simple problem filling the values of my form fields.
As it seems to be rather common and oft occuring problem i hope somebody knows a 
solution.

I have a form described in XML file test.xml (used with Stylebook
Stylesheets) :

---
 form name=testform
  Text:text name=city size=20/
 /form
---

I also have an Cocoon Action GetCityAction which sets the parameter
city in the sitemap.

I want the user to see the current value of the field city in browser, so
the content of test.xml must be changed to
---
 form name=testform
  Text:text name=city size=20 value=cologne/
 /form
---
before passing it to Stylebook stylessheets transformer.

Is there some elegant way to do it?

I know that could be achieved by writing a stylesheets like

xsl:param name=city/
xsl:template match=text
 xsl:if test=@name='city'
text name=city size=@size value=$city /
 /xsl:if
 
/xsl:template

and sitemap like:
map:act type=GetCityAction
  map:generate src=test.xml
  map:transform src=stylesheets/apache.xsl
map:parameter name=city value={city} /
  /map:transform
  ...
/map:act
-

but i don't want to change my stylesheets every time i add a new
variable to the form.
  

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




RE: Elegant solution for filling forms

2002-06-24 Thread Piroumian Konstantin

 From: Andrei Svirida [mailto:[EMAIL PROTECTED]] 
 
 Hello Cocooners,
 
 I have a simple problem filling the values of my form fields.
 As it seems to be rather common and oft occuring problem i 
 hope somebody knows a solution.

Take a look at the XMLForm. It solves this kind of problems, such as mapping
your data to your form fields, mapping request parameters to your data
model, rules-based validation. See below for more:

 
 I have a form described in XML file test.xml (used with Stylebook
 Stylesheets) :
 
 ---
  form name=testform
   Text:text name=city size=20/
  /form
 ---
 
 I also have an Cocoon Action GetCityAction which sets the parameter
 city in the sitemap.
 
 I want the user to see the current value of the field city 
 in browser, so
 the content of test.xml must be changed to
 ---
  form name=testform
   Text:text name=city size=20 value=cologne/
  /form
 ---
 before passing it to Stylebook stylessheets transformer.
 
 Is there some elegant way to do it?

If for some reason you don't want to use XMLForm then you can simply write a
transformer that performs this. 

 
 I know that could be achieved by writing a stylesheets like
 
 xsl:param name=city/
 xsl:template match=text
  xsl:if test=@name='city'
 text name=city size=@size value=$city /
  /xsl:if
  
 /xsl:template
 
 and sitemap like:
 map:act type=GetCityAction
   map:generate src=test.xml
   map:transform src=stylesheets/apache.xsl
 map:parameter name=city value={city} /
   /map:transform
   ...
 /map:act
 -
 
 but i don't want to change my stylesheets every time i add a new
 variable to the form.

And you would also add another action too. I'd use one action to get the
data and then will use either request attributes or session to pass the data
to a transformer which would fill in your form. It really worth to take a
look at the XMLForm.

Konstantin

   
 
 --
 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: JspGenerator Problem

2002-06-24 Thread Cenk Uysal

I found out the problem. I use a subsitemap and so my files are in a
folder like Cocoon_Home/myfolder

In the subsitemap, you have to enter full path of JSP file in
generator source. For example if there is a xxx.xsl file in myfolder,
in subsitemap only giving the name of file for XSL source is enough.
But you have to enter /myfolder/xxx.jsp as your JSP source.

__
Do You Yahoo!?
Yahoo! - Official partner of 2002 FIFA World Cup
http://fifaworldcup.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]




RE: JspGenerator Problem

2002-06-24 Thread Piroumian Konstantin

 From: Cenk Uysal [mailto:[EMAIL PROTECTED]] 
 
 I found out the problem. I use a subsitemap and so my files are in a
 folder like Cocoon_Home/myfolder
 

You should have said that earlier. Seems that you've hit a known problem in
JSP(Generator | Reader). 

 In the subsitemap, you have to enter full path of JSP file in
 generator source. For example if there is a xxx.xsl file in myfolder,
 in subsitemap only giving the name of file for XSL source is enough.
 But you have to enter /myfolder/xxx.jsp as your JSP source.

The problem is that a relative (to app context) path should be used to pass
to the JSPEngine and currently it's not implemented, so patches are welcome.
I'll also have a look at it as time allows. (The real problem is that there
is no a good way to resolve relative links - relatively to the current
sitemap directory).

A simple solutions is to use absolute links (absolute to app context, not
the file system), e.g.: /myapp/jsp/page.jsp, or to mount the sub-sitemap in
a directory that has the same name is the uri-prefix.

Konstantin

 
 __
 Do You Yahoo!?
 Yahoo! - Official partner of 2002 FIFA World Cup
 http://fifaworldcup.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]




Nested queries: Only 1 allowed per query?

2002-06-24 Thread Hahn Kurt (CHA)

Nested queries work well, but here, I tried to add a second one, and after
many (useless) tries, I'm suspecting that the SQL-transformer doesn't
support more than one nested query at once?  Below is the query structure,
it works fine if I comment out either one of the nested queries. Trying to
execute them both results in an empty page. I didn't find any hints on this
in the documentation. Did anybody try something like this before?

Kurt

execute-query xmlns=http://apache.org/cocoon/SQL/2.0;
  query name=affairesPV
!-- Query goes here--
/query
execute-query 
 query name=rapporteurs
!-- First nested query goes here--
 /query
 /execute-query
 execute-query 
query name=departement
!-- Second nested query goes here--
/query
/execute-query

/execute-query

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

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




Does anyone remember cocoon 1.8?

2002-06-24 Thread Paul Gilligan

I have switched to an out of the box cocoon 1,8 that coomes with SuSE 8.0
and I get:

java.lang.RuntimeException: Error loading logicsheet at 
resource://org/apache/cocoon/processor/xsp/library/java/util.xsl due to 
java.lang.Exception: Resource not found or retrieving error.

Now I am sure that this is a std problem and someone can tell me how to 
sort this out without me
having to dig too deep :)

What I am working on is using the new Oracle 9.2 XML repository and a 
standard cocoon production version (1.8)
and the JDK 1.3 that comes with it -hence I do not want to have todo too 
much work on the cocoon side.

Then I will be adapting the docbook DTD to work with Oracle and then use 
cocoon to publish.

Now here is the crunch!! I can easily do a little programming to with 
Oracle to make a content management
frame work :)

Has any one else looked at Oracle 9.2 XML?

Paul






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




Installation error using JDK 1.4.0: libawt and libXp

2002-06-24 Thread Ryan Hoegg

Hello Peter, and everyone,

In the message linked below, you respond to another user with a very 
similar problem to mine.

http://www.mail-archive.com/cocoon-users%40xml.apache.org/msg12493.html

I am using JDK 1.4.0, Tomcat 4.0.4, and Cocoon 2.0.2.  I do not have X 
installed, and my CATALINA_OPTS environment variable is 
'-Djava.awt.headless=true'.  After building from source, I get errors 
trying to load the default Cocoon2 site.  The stack trace shows an 
attempt to load an SVGSerializer using batik.  The error I get is:

org.apache.cocoon.ProcessingException: Error compiling sitemap: 
java.lang.UnsatisfiedLinkError: 
/usr/local/j2sdk1.4.0/jre/lib/i386/libawt.so: libXp.so.6: cannot open 
shared object file: No such file or directory

To be sure, I created a servlet that outputs 
System.getProperty(java.awt.headless); it returns true.

Can anyone provide any insight to this situation?

Thanks,
Ryan Hoegg


-
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: Installation error using JDK 1.4.0: libawt and libXp

2002-06-24 Thread Peter Royal

On Monday 24 June 2002 01:27 pm, Ryan Hoegg wrote:
 I am using JDK 1.4.0, Tomcat 4.0.4, and Cocoon 2.0.2.  I do not have X
 installed, and my CATALINA_OPTS environment variable is
 '-Djava.awt.headless=true'.  After building from source, I get errors
 trying to load the default Cocoon2 site.  The stack trace shows an
 attempt to load an SVGSerializer using batik.  The error I get is:

 org.apache.cocoon.ProcessingException: Error compiling sitemap:
 java.lang.UnsatisfiedLinkError:
 /usr/local/j2sdk1.4.0/jre/lib/i386/libawt.so: libXp.so.6: cannot open
 shared object file: No such file or directory

 To be sure, I created a servlet that outputs
 System.getProperty(java.awt.headless); it returns true.

 Can anyone provide any insight to this situation?

Its failing in compiling the sitemap. Perhaps the headless property is for 
runtime only and doesn't play well at compile-time?

I have X installed on my machine so I can't verify that.

My best suggestion to you is to attempt to use the interpreted sitemap rather 
than the compiled one and see how that goes. In WEB-INF/cocoon.xconf at the 
bottom of the file there are comments indicating how to switch.
-pete

-- 
peter royal - [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]




Sitemap parameters from servlet init (e.g. from outside the sitemap)...

2002-06-24 Thread Per Kreipke

I'm looking a Best Practice suggestion.

In our sitemap, we get XML from another machine (e.g. backend server) like
this:

map:generate src=http://dataserver.onclave.com:1234/bin/get?foo; /

However, developers need to point to their local machine. E.g.:

map:generate src=http://localhost/bin/get?foo; /


This is just begging for a global sitemap parameter so that it becomes:

map:generate src=http://{server-port}/bin/get?foo; /


Unfortunately, we're all in the same CVS archive, are changing the sitemap
fairly frequently, and I wouldn't want to have multiple copies of the
sitemap around which we then have to reset by hand every time.


- What is the right way to handle this in a servlet environment? I figure
it's to use the servlet init parameters. Yes?

- in Cocoon, does something already exist to get set sitemap parameters from
somewhere 'global' (hopefully from the init params)?


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




RE: Sitemap parameters from servlet init (e.g. from outside the sitemap)...

2002-06-24 Thread Per Kreipke

P.s. 

 - in Cocoon, does something already exist to get set sitemap 
 parameters from somewhere 'global' (hopefully from the init params)?

Or perhaps to/from the servlet context?

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]




Re: Installation error using JDK 1.4.0: libawt and libXp

2002-06-24 Thread Paul Gilligan

Watch out for the JDBC problems under jdk1.4 as well :)

Ryan Hoegg wrote:

 Hello Peter, and everyone,

 In the message linked below, you respond to another user with a very 
 similar problem to mine.

 http://www.mail-archive.com/cocoon-users%40xml.apache.org/msg12493.html

 I am using JDK 1.4.0, Tomcat 4.0.4, and Cocoon 2.0.2.  I do not have X 
 installed, and my CATALINA_OPTS environment variable is 
 '-Djava.awt.headless=true'.  After building from source, I get errors 
 trying to load the default Cocoon2 site.  The stack trace shows an 
 attempt to load an SVGSerializer using batik.  The error I get is:

 org.apache.cocoon.ProcessingException: Error compiling sitemap: 
 java.lang.UnsatisfiedLinkError: 
 /usr/local/j2sdk1.4.0/jre/lib/i386/libawt.so: libXp.so.6: cannot open 
 shared object file: No such file or directory

 To be sure, I created a servlet that outputs 
 System.getProperty(java.awt.headless); it returns true.

 Can anyone provide any insight to this situation?

 Thanks,
 Ryan Hoegg


 -
 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: Installation Problem

2002-06-24 Thread J.Pietschmann

Roger Ting wrote:
 Hi I am awfully new to Cocoon.. It took me 1 day to setup the TomCat 
 Servlet 4.0.3 properly. Now i run into the problem for Cocoon.

Tomcat 4.0.3 has classloader problems. It is recommended
to use 4.0.4, now that it's out. If you have to stay with
4.0.3, read carefully the installation instructions for
4.0.3 coming with your Cocoon distribution in the
docs/installing directory.

J.Pietschmann



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

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




xsp: pb with snapshots versions ?

2002-06-24 Thread zze-STIENNE Nicolas FTRD/DMI/CAE
Title: xsp: pb with snapshots versions ?





Hi !!


 I tried some snapshots versions of Cocoon2[.1-dev] : 2002.06.24.041712, 21.102726, 20.103348. Every time, the xsp samples don't work (esql neither).

 Where does it come from ? Is there something I forgot ?


I used Tomcat 4.0.3 and JDK 1.3.1-03 and the installation guide from xml.apache.org.


Thanks, 


Nicolas !!




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

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


Getting parameters to SQLTransformer

2002-06-24 Thread Lajos Moczar

I think I know the answer, but is there any way to construct dynamic 
queries using SQLTransformer? Specifically, I'd like to build the where 
clause of my query using either a session attribute or a sitemap 
parameter. I've been thru the code and don't see that it can be done, 
but I thought I'd ask just the same ... I'm on 2.0.2.

Regards,

Lajos

-- 
galatea.com
Cocoon training, consulting  support



-
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: Installation error using JDK 1.4.0: libawt and libXp

2002-06-24 Thread Ryan Hoegg

I appreciate the quick and thoughtful response, Pete.  I changed 
cocoon.xconf to use an interpreted sitemap, and succeeded only in making 
a change in the error received.  It still is asking for libXp.so, but is 
now buried in other errors.

I captured the error from my development server and posted it on my web 
server here:

http://www.hoegg.net/error/cocoon-problem.html

It seems to me that there is something fishy about the headless awt 
support in 1.4.0 when using Batik.  Is anyone successfully running 
Cocoon2 this way?

As a side note, just wanted to say I am a new user of Cocoon and am 
looking forward to this approach to dynamic web development.  Thanks to 
all the developers for a great framework.

Thanks again,
Ryan Hoegg

Peter Royal wrote:

On Monday 24 June 2002 01:27 pm, Ryan Hoegg wrote:

I am using JDK 1.4.0, Tomcat 4.0.4, and Cocoon 2.0.2.  I do not have X
installed, and my CATALINA_OPTS environment variable is
'-Djava.awt.headless=true'.  After building from source, I get errors
trying to load the default Cocoon2 site.  The stack trace shows an
attempt to load an SVGSerializer using batik.  The error I get is:

org.apache.cocoon.ProcessingException: Error compiling sitemap:
java.lang.UnsatisfiedLinkError:
/usr/local/j2sdk1.4.0/jre/lib/i386/libawt.so: libXp.so.6: cannot open
shared object file: No such file or directory

To be sure, I created a servlet that outputs
System.getProperty(java.awt.headless); it returns true.

Can anyone provide any insight to this situation?


Its failing in compiling the sitemap. Perhaps the headless property is for 
runtime only and doesn't play well at compile-time?

I have X installed on my machine so I can't verify that.

My best suggestion to you is to attempt to use the interpreted sitemap rather 
than the compiled one and see how that goes. In WEB-INF/cocoon.xconf at the 
bottom of the file there are comments indicating how to switch.
-pete




-
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: Getting parameters to SQLTransformer

2002-06-24 Thread Luca Morandini

Lajos,

the substitution in SQL Transformer uses parameters defined in the sitemap,
which don't fit your bill I presume...

...but, being it a transformer, you can feed it any SQL you have built from
whatever source (XSL, XSP, plain XML file, ...), including any parameters of
your choice.
This is not the same as dynamic parameters though, it is like dynamic
SQL.

What I would suggest is the use of stored procedures, with an XSL building
the statement, hence:
1) max flexibility in the value of parameters (build them as you like, from
whatever source you like)
2) min performance penalty (the real SQLs are already been parsed when the
stored procedure was submitted to the DBMS)

Not to mention the SoC it enforces.

And if your DBMS doesn't support SPs ? Use dynamic SQL by using stylesheets
or XSPs: after all, this is what a lot of people does with ASP anyway.

Hope this helps,

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


 -Original Message-
 From: Lajos Moczar [mailto:[EMAIL PROTECTED]]
 Sent: Monday, June 24, 2002 10:18 PM
 To: [EMAIL PROTECTED]
 Subject: Getting parameters to SQLTransformer


 I think I know the answer, but is there any way to construct dynamic
 queries using SQLTransformer? Specifically, I'd like to build the where
 clause of my query using either a session attribute or a sitemap
 parameter. I've been thru the code and don't see that it can be done,
 but I thought I'd ask just the same ... I'm on 2.0.2.

 Regards,

 Lajos

 --
 galatea.com
 Cocoon training, consulting  support



 -
 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: Installation error using JDK 1.4.0: libawt and libXp

2002-06-24 Thread Peter Royal

On Monday 24 June 2002 04:24 pm, Ryan Hoegg wrote:
 I appreciate the quick and thoughtful response, Pete.  I changed
 cocoon.xconf to use an interpreted sitemap, and succeeded only in making
 a change in the error received.  It still is asking for libXp.so, but is
 now buried in other errors.

 I captured the error from my development server and posted it on my web
 server here:

 http://www.hoegg.net/error/cocoon-problem.html

 It seems to me that there is something fishy about the headless awt
 support in 1.4.0 when using Batik.  Is anyone successfully running
 Cocoon2 this way?

Makes me wonder about how headless you can be. Whether its merely no 
running X server or no X libraries on the machine at all. It might be the 
former when you're expecting the latter.

 As a side note, just wanted to say I am a new user of Cocoon and am
 looking forward to this approach to dynamic web development.  Thanks to
 all the developers for a great framework.

Welcome! :)
-pete

-- 
peter royal - [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: Getting parameters to SQLTransformer

2002-06-24 Thread Lajos Moczar

Hi Luca -

I agree that the SPs are the way to go - when I was a DBA, I used to 
enforce their use all the time. What I was after here was to include 
sitemap/request/session parameters into the XML file during the 
generation phase, so that the complete query would be passed to the 
transformer. I have gone the XSL route before, and I guess that is what 
I'll stick with now.

Thanks,

Lajos


Luca Morandini wrote:

 Lajos,
 
 the substitution in SQL Transformer uses parameters defined in the sitemap,
 which don't fit your bill I presume...
 
 ...but, being it a transformer, you can feed it any SQL you have built from
 whatever source (XSL, XSP, plain XML file, ...), including any parameters of
 your choice.
 This is not the same as dynamic parameters though, it is like dynamic
 SQL.
 
 What I would suggest is the use of stored procedures, with an XSL building
 the statement, hence:
 1) max flexibility in the value of parameters (build them as you like, from
 whatever source you like)
 2) min performance penalty (the real SQLs are already been parsed when the
 stored procedure was submitted to the DBMS)
 
 Not to mention the SoC it enforces.
 
 And if your DBMS doesn't support SPs ? Use dynamic SQL by using stylesheets
 or XSPs: after all, this is what a lot of people does with ASP anyway.
 
 Hope this helps,
 
 -
Luca Morandini
GIS Consultant
   [EMAIL PROTECTED]
 http://utenti.tripod.it/lmorandini/index.html
 -
 
 
 
-Original Message-
From: Lajos Moczar [mailto:[EMAIL PROTECTED]]
Sent: Monday, June 24, 2002 10:18 PM
To: [EMAIL PROTECTED]
Subject: Getting parameters to SQLTransformer


I think I know the answer, but is there any way to construct dynamic
queries using SQLTransformer? Specifically, I'd like to build the where
clause of my query using either a session attribute or a sitemap
parameter. I've been thru the code and don't see that it can be done,
but I thought I'd ask just the same ... I'm on 2.0.2.

Regards,

Lajos

--
galatea.com
Cocoon training, consulting  support



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


-- 
galatea.com
Cocoon training, consulting  support



-
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: Getting parameters to SQLTransformer

2002-06-24 Thread Argyn Kuketayev



 -Original Message-
 From: Luca Morandini [mailto:[EMAIL PROTECTED]]
 Sent: Monday, June 24, 2002 4:41 PM
 To: [EMAIL PROTECTED]
 Subject: RE: Getting parameters to SQLTransformer
 What I would suggest is the use of stored procedures, with an 
 XSL building
 the statement, hence:

can you explain what do you mean in more details?

-
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: Getting parameters to SQLTransformer

2002-06-24 Thread Luca Morandini

Argyn,

here's a snippet of a stylesheet (let's pretend name-clean contains the given 
parameter, be it a session, request or static
parameter), which dynamically builds a stored procedure invokation for SQLTransformer 
to execute:

xsl:element name=sql:execute-query
xsl:element name=sql:query
xsl:attribute name=isstoredproceduretrue/xsl:attribute
xsl:attribute name=namegetproductsbyname/xsl:attribute
begin Noria.GetProductsByName('xsl:value-of select=$name-clean/',
   
 ?, ?); end;
/xsl:element

xsl:element name=sql:out-parameter
xsl:attribute name=sql:nr1/xsl:attribute
xsl:attribute name=sql:namecurProd/xsl:attribute
xsl:attribute 
name=sql:typeoracle.jdbc.driver.OracleTypes.CURSOR/xsl:attribute
/xsl:element

xsl:element name=sql:out-parameter
xsl:attribute name=sql:nr2/xsl:attribute
xsl:attribute name=sql:nameintStatus/xsl:attribute
xsl:attribute 
name=sql:typeoracle.jdbc.driver.OracleTypes.INTEGER/xsl:attribute
/xsl:element

/xsl:element

As you may see, there is an input parameter (name-clean, a string) and two output 
ones, a cursor and a status code.

BTW, name-clean has been already cleaned (apostrophes aubstituted with double 
apostrophes), and, of course, Oracle is the DBMS of
choice.

Best regards,

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


 -Original Message-
 From: Argyn Kuketayev [mailto:[EMAIL PROTECTED]]
 Sent: Monday, June 24, 2002 11:11 PM
 To: '[EMAIL PROTECTED]'
 Subject: RE: Getting parameters to SQLTransformer




  -Original Message-
  From: Luca Morandini [mailto:[EMAIL PROTECTED]]
  Sent: Monday, June 24, 2002 4:41 PM
  To: [EMAIL PROTECTED]
  Subject: RE: Getting parameters to SQLTransformer
  What I would suggest is the use of stored procedures, with an
  XSL building
  the statement, hence:

 can you explain what do you mean in more details?

 -
 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: Installation error using JDK 1.4.0: libawt and libXp

2002-06-24 Thread Ryan Hoegg

Thanks for the idea, seems obvious once someone points it out :)

Well, although I wanted to avoid installing the X libraries as this 
server has no other need for them, I went ahead and did it.  Lo and 
behold, the error went away, and another was quick to replace it:

http://www.hoegg.net/error/cocoon-problem2.html

Scoured the archives and found several posts with similar circumstances. 
Unfortunately, either the solutions were nothing new and did not solve 
the problem; or, the problem ended up being unsolved or in some way 
different from mine.   Here some are in case they may shed some light on 
this.

http://www.mail-archive.com/cocoon-users%40xml.apache.org/msg11495.html
http://www.mail-archive.com/cocoon-users%40xml.apache.org/msg12960.html
http://www.mail-archive.com/cocoon-users%40xml.apache.org/msg13501.html

Sorry to come running back to you for the third time.  I hope that the 
answers to my problems will be more generally helpful in the archives or 
the FAQ.  If/when I sort it out I will try to write something coherent 
up for the FAQ regarding my use of JDK1.4 without X

Thanks,
Ryan Hoegg.

Peter Royal wrote:

On Monday 24 June 2002 04:24 pm, Ryan Hoegg wrote:

I appreciate the quick and thoughtful response, Pete.  I changed
cocoon.xconf to use an interpreted sitemap, and succeeded only in making
a change in the error received.  It still is asking for libXp.so, but is
now buried in other errors.

I captured the error from my development server and posted it on my web
server here:

http://www.hoegg.net/error/cocoon-problem.html

It seems to me that there is something fishy about the headless awt
support in 1.4.0 when using Batik.  Is anyone successfully running
Cocoon2 this way?


Makes me wonder about how headless you can be. Whether its merely no 
running X server or no X libraries on the machine at all. It might be the 
former when you're expecting the latter.

As a side note, just wanted to say I am a new user of Cocoon and am
looking forward to this approach to dynamic web development.  Thanks to
all the developers for a great framework.


Welcome! :)
-pete




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




Sitemap parameters to XSP pages

2002-06-24 Thread Fabricio Chalub

Hello, folks.

How can I pass a parameter specified on the sitemap to a XSP (and, possibly,
a logicsheet)?

I was thinking something like this:

map:match pattern=test-*.html
map:generate src=doc/test.xml type=serverpages
  map:parameter name=test value={1}/
/map:generate
map:transform src=stylesheets/epge/document.xsl/
map:serialize/
/map:match

And (somehow) the parameter test would be available on the XSP page.

For exampleo, if I call the URL test-HELLOWORLD.html the value of the
parameter test, would be (on this particular example) HELLOWORLD.

Note that I know that it is possible to pass a parameter to a XSLT page, but
I am not aware if you can do this directly to a XSP page (and even
'forwarding' the parameters to logicsheets).

If it is not possible, what alternative would you suggest?

Thanks!
Fabricio Chalub

-
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: Sitemap parameters to XSP pages

2002-06-24 Thread Kenny Chow

Hi Fabricio,

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

Hope this helps.
Kenny

--- Fabricio Chalub [EMAIL PROTECTED] wrote:
 Hello, folks.
 
 How can I pass a parameter specified on the sitemap
 to a XSP (and, possibly,
 a logicsheet)?
 
 I was thinking something like this:
 
 map:match pattern=test-*.html
 map:generate src=doc/test.xml type=serverpages
   map:parameter name=test value={1}/
 /map:generate
 map:transform src=stylesheets/epge/document.xsl/
 map:serialize/
 /map:match
 
 And (somehow) the parameter test would be
 available on the XSP page.
 
 For exampleo, if I call the URL test-HELLOWORLD.html
 the value of the
 parameter test, would be (on this particular
 example) HELLOWORLD.
 
 Note that I know that it is possible to pass a
 parameter to a XSLT page, but
 I am not aware if you can do this directly to a XSP
 page (and even
 'forwarding' the parameters to logicsheets).
 
 If it is not possible, what alternative would you
 suggest?
 
 Thanks!
 Fabricio Chalub
 

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


__
Do You Yahoo!?
Yahoo! - Official partner of 2002 FIFA World Cup
http://fifaworldcup.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]




Re: Elegant solution for filling forms

2002-06-24 Thread Ivelin Ivanov


http://xml.apache.org/cocoon/howto/xmlform-wizard/howto-xmlform-wizard.html

Piroumian Konstantin wrote:
From: Andrei Svirida [mailto:[EMAIL PROTECTED]] 

Hello Cocooners,

I have a simple problem filling the values of my form fields.
As it seems to be rather common and oft occuring problem i 
hope somebody knows a solution.
 
 
 Take a look at the XMLForm. It solves this kind of problems, such as mapping
 your data to your form fields, mapping request parameters to your data
 model, rules-based validation. See below for more:
 


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




Unknown formatting object http://www.w3.org/1999/XSL/Format^sequence-specification

2002-06-24 Thread sudha.

Hello

I have the below statements for using name space in my xsl file.

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


I am trying to generate a pdf file from Formating object which has been
generated using saxon-6.3. I use FOP.0.20 for pdf generation. I end up with
the errors  Unknown formatting object
http://www.w3.org/1999/XSL/Format^sequence-specification; . I tried
transformation using Xalan-Java version 2.4.D1 also. still the same error
occures.

am I using wrong name spapce URI ?

Please help me out for tackling this problem


thanks a lot

regards
sudha


-
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: NPE with Profiling on 2.1-Dev

2002-06-24 Thread Carsten Ziegeler

Hi Bruce,

thanks for reporting this - it should be fixed now in the latest
CVS.
The profiling pipeline is currently not able to profile a map:read.

Carsten 

Carsten Ziegeler Chief Architect Open Source Group, SN AG
--
 Cocoon Consulting, Training and Projects
--
mailto:[EMAIL PROTECTED]  http://www.s-und-n.de
http://ziegeler.bei.t-online.de


 -Original Message-
 From: Bruce Krautbauer [mailto:[EMAIL PROTECTED]]
 Sent: Monday, June 24, 2002 11:52 PM
 To: [EMAIL PROTECTED]
 Subject: NPE with Profiling on 2.1-Dev
 
 
 I'm getting a NPE from ProfilingCachingProcessingPipeline when I 
 try to access anything from my pipeline when profiling is enabled.
 
 java.lang.NullPointerException
   at 
 org.apache.cocoon.components.profiler.ProfilingCachingProcessingPi
 peline.process(ProfilingCachingProcessingPipeline.java:114)
   at 
 org.apache.cocoon.components.treeprocessor.sitemap.ReadNode.invoke
 (ReadNode.java:122)
 
 This is with the CVS HEAD (from 2002-06-24 AM CDT) running on JDK 
 1.3.1_03 on Win2K with Tomcat 4.0.4.  I followed the instructions 
 from the Profiling Generator user docs.  What am I missing?
 
 On a related note, is there any way I can get Tomcat to cache my 
 files/resources when it is loading?  The first time my pipeline 
 is accessed after a Tomcat restart it takes about 10 seconds to 
 generate the page.  After that it takes less than a second, even 
 though the page is displaying dynamic data.
 
 TIA,
 Bruce
 
 
 
 
 -
 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]