Re: RuntimeException : The sitemap is null

2003-07-01 Thread Sylvain Wallez
GUILLAUME Gabriel FTRD/DIH/HDM REN wrote:

Hi folks,

I'm currently performing some load tests on the following configuration
:
cocoon 2.0.4
resin 2.1.9
SUN JDK 1.4.003
Linux (RH 9)
After 5-10 minutes, I got the following  "well known" RuntimeException :
The sitemap is null.
I've seen on the cocoon-dev archive that a bug report has been recently
posted about this, but I just would like to know :
- if this bug is planned to be fixed in the 2.0.4 or in the 2.1 ?
- if there are some workaround to avoid this problem ? Any hint (change
JVM, system, servlet engine) ?
 

IIRC, this was a problem related to the compiled sitemap engine. Have 
you tried with the intrepreted engine (search for  in 
cocoon.xconf) ?

Sylvain

--
Sylvain Wallez  Anyware Technologies
http://www.apache.org/~sylvain   http://www.anyware-tech.com
{ XML, Java, Cocoon, OpenSource }*{ Training, Consulting, Projects }
Orixo, the opensource XML business alliance  -  http://www.orixo.com


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


Re: WML source with WML serializer

2003-03-28 Thread Sylvain Wallez
Joerg Heinicke wrote:

Because they are already in the original input WML file?


... or because the WML DTD is expanded _inside_ the document by the XML 
parser ? Note that this also means that your server connects to 
wapforum.org (I guess it's the location of the WML DTD) to get it.

To circumvent this, you should consider using the entity resolver on 
your Cocoon installation to both avoid fetching the DTD from a remote 
server and provide a stripped-down WML DTD (at least without comments).

More on resolvers at 
http://xml.apache.org/cocoon/userdocs/concepts/catalog.html

Sylvain

Disabling is possible using a XSLT:


  


  



Regards,

Joerg

zze-MORY Nicolas FTRD/DMI/REN wrote:

when i have WML files in input of pipeline and i want to serialize it
with WML serializer i have many comment like that :
>

Why ? is it possible to disable this comments ?

Thanks



--
Sylvain Wallez  Anyware Technologies
http://www.apache.org/~sylvain   http://www.anyware-tech.com
{ XML, Java, Cocoon, OpenSource }*{ Training, Consulting, Projects }


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


Re: Why can't a Action be Contextualizable??

2003-03-28 Thread Sylvain Wallez
Peter Klotz wrote:

Hi,

I wanted to make my custom action Contextualizable in order to get the
base directory of the action. But it looks like this is never called or I
get errors when trying to create the component.
Why? I inherit from ConfigurableComposerAction to be configurable and
Composable as well.
Contextualizable is different from being Configurable or Composable. 
Your class has to _implement_ this interface, and the component manager 
will call it.

Principally any Avalon component should be able to be Contextualizable?

Yep. By implementing the interface.

Also non-Pipeline backend components used by a action or source or a
action or source itself?
Sorry, I don't understand the above :-/

Sylvain

--
Sylvain Wallez  Anyware Technologies
http://www.apache.org/~sylvain   http://www.anyware-tech.com
{ XML, Java, Cocoon, OpenSource }*{ Training, Consulting, Projects }


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


Re: cocoon-view as possible security problem? (fwd)

2003-03-21 Thread Sylvain Wallez
Tony Collen wrote:

forwarding this to -users because i am having a little bit of lag and
mistyped the address the first time :P
 

Have a look at my answer on cocoon-dev :
http://marc.theaimsgroup.com/?l=xml-cocoon-dev&m=104823479001495&w=2
Sylvain

-- Forwarded message --
Date: Thu, 20 Mar 2003 16:14:31 -0500 (EST)
From: Tony Collen <[EMAIL PROTECTED]>
Reply-To: [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Subject: cocoon-view as possible security problem?
Browsing the livesites, on a whim I tried this URL:

http://dir.salon.com/?cocoon-view=content

and it worked!  Obviously someone deploying Cocoon should be aware that
this view is "on" by default, and may reveal data in your page you might
not want.  I have yet to see "bad" data get exposed, but there's always
the possibility.
Do we want the views turned off by default, and have a message in the
sitemap about enabling the views?  Would it make more sense to have
thename of the "cocoon-view" parameter be able to be changed via
configuration?  Say I wanted the parameter to be my-view instead of
cocoon-view.  Security through obscurity?
Tony





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



--
Sylvain Wallez  Anyware Technologies
http://www.apache.org/~sylvain   http://www.anyware-tech.com
{ XML, Java, Cocoon, OpenSource }*{ Training, Consulting, Projects }


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


Re: dynamically load an action in a resource?

2003-03-13 Thread Sylvain Wallez
Delis, Christopher E. wrote:

i'm a newbie cocoon2 developer who is trying to create a map:resource for
commonly-used pipelines for use with my XMLForms.  apparently (here, my
newbie status
begins to show prominently ;-), you can send map:parameters to map:resources
quite easily via map:call (i've done this quite a bit already).  also, i
think you can even use map:actions within a map:resource.  however, i can
not dynamically load a map:action (which is the controller bean) within my
map:resource like so:

...
  
  ...
  
...

do "map:act" types have to be declared statically (i.e., a static value for
"type")?  or, is this a bug?  or, is this a design choice (for security
reasons, etc.)?  perhaps, this is a bad way of going about this.  i suppose
i could write a more generic action and have it do what i want, but i
thought it would be good to know why i can't do this.
 

This has been discussed recently :
http://marc.theaimsgroup.com/?l=xml-cocoon-users&m=104689753426755&w=2
Sylvain

--
Sylvain Wallez  Anyware Technologies
http://www.apache.org/~sylvain   http://www.anyware-tech.com
{ XML, Java, Cocoon, OpenSource }*{ Training, Consulting, Projects }


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


Re: Pipeline with Sitemap

2003-03-07 Thread Sylvain Wallez
zze-MORY Nicolas FTRD/DMI/REN wrote:

yes of course i can post my sitemap :

this is my sitemap.xmap, the part of pipeline is at the botom.

 

Well, actually I don't see what could be wrong with this sitemap (don't 
have the time now to run it).

But why do you need two  ? A  is only needed 
if you want a different  or if you want a particular 
section of your sitemap to be internal-only (i.e. usable only with the 
"cocoon:" protocol).

So you could merge both  : you don't need one for each 


Hope this helps,
Sylvain
--
Sylvain Wallez  Anyware Technologies
http://www.apache.org/~sylvain   http://www.anyware-tech.com
{ XML, Java, Cocoon, OpenSource }*{ Training, Consulting, Projects }


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


Re: Eclipe XSP editor

2003-03-07 Thread Sylvain Wallez
Olivier Billard wrote:

I asked for Stefano, but he doesn't seem to read this list !...

Stefano started this project and community (along with many others), and 
reading (and answering) many mailing lists is a hard task !

I'm surprised an up-to-date Schema doesn't exist...
 

Well, things get written when people need it. So perhaps nobody really 
felt the need for it up to now ? And maybe we're starting to see this 
need appear with Cocoon-dedicated GUIs that are coming.

See you next tuesday in Jouve, Sylvain ! :)
 

For other people : I'll be giving a 4-day Cocoon training to Olivier and 
his colleagues next week.

Thanks for the plug ;-)

Sylvain

- Original Message ----- 
From: "Sylvain Wallez" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, March 07, 2003 1:53 PM
Subject: Re: Eclipe XSP editor
 

Olivier Billard wrote:
   

You can find a DTD here : http://xml.apache.org/cocoon1/wd-xsp.html


Careful : this one is ges old (Cocoon 1), and will fail on most XSPs 
since it doesn't handle neither taglibs nor the fact that _any_ element 
of the result document can be written anywhere in the XSP document.

AFAIK, no XSP schema currently exists. Any taker to write one ?

Sylvain

   

--
Sylvain Wallez  Anyware Technologies
http://www.apache.org/~sylvain   http://www.anyware-tech.com
{ XML, Java, Cocoon, OpenSource }*{ Training, Consulting, Projects }


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


Re: Zip File Generator

2003-03-07 Thread Sylvain Wallez
Bertrand Delacretaz wrote:

Le Vendredi, 7 mars 2003, à 09:41 Europe/Zurich, Upayavira a écrit :

 With the protocol, it shows you how to
add a protocol to Cocoon of the form:

zip://[EMAIL PROTECTED]://www.newserver.com/news_2001.zip
or
zip://people/[EMAIL PROTECTED]


There is a jar: protocol (or Source?) in Cocoon already, search for 
"jar:" in http://xml.apache.org/cocoon/userdocs/concepts/sitemap.html 
for an example.
As JARs and ZIPs share the same physical format, it should work for 
ZIP files as well.


The JDK natively suppors the "jar:" protocol with URLs of the form 
"jar:!/"(see [1]) and as such is available in Cocoon.

However the  part has to be an URL understood by the JDK (e.g. 
"file:", "http:", etc), and therefore you cannot use the fancy Cocoon 
protocols such as "cocoon:" or "context:".

Hope this helps,
Sylvain
[1] http://java.sun.com/j2se/1.3/docs/api/java/net/JarURLConnection.html

--
Sylvain Wallez  Anyware Technologies
http://www.apache.org/~sylvain   http://www.anyware-tech.com
{ XML, Java, Cocoon, OpenSource }*{ Training, Consulting, Projects }


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


Re: Eclipe XSP editor

2003-03-07 Thread Sylvain Wallez
Olivier Billard wrote:

You can find a DTD here : http://xml.apache.org/cocoon1/wd-xsp.html
 

Careful : this one is ges old (Cocoon 1), and will fail on most XSPs 
since it doesn't handle neither taglibs nor the fact that _any_ element 
of the result document can be written anywhere in the XSP document.

AFAIK, no XSP schema currently exists. Any taker to write one ?

Sylvain

- Original Message - 
From: <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Friday, March 07, 2003 11:24 AM
Subject: RE: Eclipe XSP editor

 

I didn't find the XSP XMLSchema. There is a Sitemap.xsd and a
xslt-schema.xsd, but no XSP schema
-Original Message-
From: Olivier Billard [mailto:[EMAIL PROTECTED] 
Sent: Friday, March 07, 2003 10:18 AM
To: [EMAIL PROTECTED]
Subject: Re: Eclipe XSP editor

Hi Maxime,

I think you can use the SunBow plug-in
(http://radio.weblogs.com/0108489/)
with an XSP XMLSchema...
Regards,
Olivier
- Original Message -
From: <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, March 06, 2003 9:04 AM
Subject: Eclipe XSP editor
   

Hi
Is there any editor for the XSP language? I use Eclipse for my 
project, and would like to know if there is a XSP plugin or shema? Thx

 

--
Sylvain Wallez  Anyware Technologies
http://www.apache.org/~sylvain   http://www.anyware-tech.com
{ XML, Java, Cocoon, OpenSource }*{ Training, Consulting, Projects }


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


Re: Pipeline with Sitemap

2003-03-07 Thread Sylvain Wallez
[EMAIL PROTECTED] wrote:

Hi,
 

for example when my first pipeline manage *.html and my second pipeline manage *.xhtml, all html files will be correctly treat if i try to acces to xhtml file tomcat send me an error : " toto.xhtml" not found. My pipeline is correctly configured because if i put the *.xhtml first then all xhtml files will be correctly treated and if i try to acces html files Tomcat send me an error like "toto.html" not found...

Nicolas, can you post your sitemap (or a snippet if it's large) ?

This works fine for me (first xhtml and then html):









 

I guess you meant  instead of .

Remember that  defines the whole pipeline and as such 
terminates sitemap execution. So the  above is totally 
useless, even if not harmful.

Ask Carsten which AFAIU should not be far from you ;-)

Sylvain

--
Sylvain Wallez  Anyware Technologies
http://www.apache.org/~sylvain   http://www.anyware-tech.com
{ XML, Java, Cocoon, OpenSource }*{ Training, Consulting, Projects }


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


Re: AW: Creating a variable type?

2003-03-05 Thread Sylvain Wallez
Marco Rolappe wrote:

hi derek,

AFAIR the nodebuilder for  type nodes (and probably others) doesn't
resolve those variable references for @type attributes. thus I think it's
not possible.
 

Exactly. The "type" attribute on all map:xxx elements does not go 
through the variable resolution mechanism.

Why so ? Because dynamically choosing the type of component doesn't 
really make sense most of the time, and would complicate the 
understanding of the sitemap.

Now, if you really want to do that, I suggest you write a "meta-action" 
that calls an action whose type is given as a parameter.

Sylvain

--
Sylvain Wallez  Anyware Technologies
http://www.apache.org/~sylvain   http://www.anyware-tech.com
{ XML, Java, Cocoon, OpenSource }*{ Training, Consulting, Projects }


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


Re: Fragment Extractor Generator - I want to use a XSL !

2003-01-16 Thread Sylvain Wallez
Samuel Goldszmidt wrote:


Hi,

I would like to know if someone has ever been able to make a transformation
with a xsl after the Fragment Extractor Generator
A transformation like this ( with a "A_STYLE_SHEET.xsl")
 


What is your particular problem ?

Sylvain

--
Sylvain Wallez  Anyware Technologies
http://www.apache.org/~sylvain   http://www.anyware-tech.com
{ XML, Java, Cocoon, OpenSource }*{ Training, Consulting, Projects }



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

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




Re: [XMLForm] terminology question

2003-01-16 Thread Sylvain Wallez
[EMAIL PROTECTED] wrote:


Hello,

I'm looking through the XMLForm source code and API and there are many comments that speak about "population".

What does it mean exactly?



It comes from the verb "populate", which, in this context, means 
something as "fill with values".

Check also http://dictionary.reference.com/search?q=populate

Sylvain (another one)

--
Sylvain Wallez  Anyware Technologies
http://www.apache.org/~sylvain   http://www.anyware-tech.com
{ XML, Java, Cocoon, OpenSource }*{ Training, Consulting, Projects }



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



[announce] CVSSource at cocoondev.org

2003-01-15 Thread Sylvain Wallez
Dear all,

I'm please to announce the availability of the CVSSource I talked about 
recently on cocoon-dev.

This component allows adding new protocols to the ones available in 
Cocoon (such as "resource:", "cocoon:", etc) which are linked "live" to 
a remote CVS repository. These protocols are _writeable_ : reading a 
CVSSource gets the latest revision of the corresponding file, and 
writing it creates a new revision.

The implementation is based on a LGPL'ed library and so cannot be hosted 
on Apache's CVS. Steven Noels kindly accepted to host it on 
cocoondev.org. So everything is available at :
  http://www.cocoondev.org/projects/cvssource.html

This is still to be considered experimental, although already used on 
real projects. So I'm awaiting your comments, suggestions and patches !

Enjoy,
Sylvain

--
Sylvain Wallez  Anyware Technologies
http://www.apache.org/~sylvain   http://www.anyware-tech.com
{ XML, Java, Cocoon, OpenSource }*{ Training, Consulting, Projects }



-
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: Environment variable

2002-12-04 Thread Sylvain Wallez
Olivier GUCKERT wrote:


Hello all !

The home of my webapp will soon move, and i want to declare it with an
environment variable.

So i define an environment variable and replace the path to the
directory of my website sitemap.xmap with this variable : 

so : before :

	
src="file:/users/sys/guckert/dossiers/cocoon/referentiels/sitemap.xmap"
		reload-method="synchron"
		check-reload="yes"/>


and after : 

	
		reload-method="synchron"
		check-reload="yes"/>


But, when i try to reload the index.html with Cocoon, i get the folowing
: 
Failed to load sitemap from file:$REFERENTIEL_HOME/sitemap.xmap

Is it not possible to do this with cocoon or what did i wrong ?
 


Java doesn't know about environment variables !

The best way to achieve this is the use of the "defaults" InputModule 
that will (should) come tomorrow in Cocoon 2.0.4 (or use the latest CVS).

The values for this module are set in cocoon.xconf. Adding there a
 file:/the/referentiel/location
will allow you to write
 

Hope this helps,
Sylvain

--
Sylvain Wallez  Anyware Technologies
http://www.apache.org/~sylvain   http://www.anyware-tech.com
{ XML, Java, Cocoon, OpenSource }*{ Training, Consulting, Projects }



-
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 may I get the FilePart object ?

2002-12-04 Thread Sylvain Wallez
[EMAIL PROTECTED] wrote:


   Hi !


I'm trying to use automatic upload with cocoon 2.0.3 (with jboss, jetty,
Linux red hat).
I've read that cocoon uploads the file and puts a FilePart object inside the
request.

So my question is :
How can I get this object inside my Java code ?
 


Cocoon uploads the file to a temporary directory and sets the name of 
the file as the corresponding request parameter value.

Example :


Java code :
File uploadedFile = new File(request.getParameter("foo"));

Hope this helps
Sylvain

--
Sylvain Wallez  Anyware Technologies
http://www.apache.org/~sylvain   http://www.anyware-tech.com
{ XML, Java, Cocoon, OpenSource }*{ Training, Consulting, Projects }



-
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: with Cocoon 2.0.3 does'nt work

2002-12-02 Thread Sylvain Wallez
LEBRETON Philippe wrote:


Sylvain Wallez wrote:

 

LEBRETON Philippe wrote:

   

Ludovic de Beaurepaire wrote:



 

Hi Philippe,

- try to have your 3 tags on one line only (!)
- or insert the java generated code directly :
   XSPUtil.includeString(SortieXML,this.manager, this.contentHandler);


   

I try tis two method and i have the same problem.
I think it is a bug


 

Is the content of "SortieXML" a syntactically correct XML document ?
   


No, my XML data string content data without root element.



So that's why this doesn't work !

If "SortieXML" is a text-only string (no XML markup), then simply use
 SortieXML
to output the value of the "SortieXML" string as text in the document 
produced by the XSP.

Hope this will solve your problem.

Sylvain

--
Sylvain Wallez  Anyware Technologies
http://www.apache.org/~sylvain   http://www.anyware-tech.com
{ XML, Java, Cocoon, OpenSource }*{ Training, Consulting, Projects }



-
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: with Cocoon 2.0.3 does'nt work

2002-12-02 Thread Sylvain Wallez
LEBRETON Philippe wrote:


Ludovic de Beaurepaire wrote:

 

Hi Philippe,

- try to have your 3 tags on one line only (!)
- or insert the java generated code directly :
XSPUtil.includeString(SortieXML,this.manager, this.contentHandler);
   


I try tis two method and i have the same problem.
I think it is a bug
 


Is the content of "SortieXML" a syntactically correct XML document ?

You have to be aware that, even if included, this cannot be an XML 
fragment but must be a _full_ XML document, i.e. with one root element 
and no text outside that root element. The error message seems to reveal 
some text outside the root element.

Sylvain

--
Sylvain Wallez  Anyware Technologies
http://www.apache.org/~sylvain   http://www.anyware-tech.com
{ XML, Java, Cocoon, OpenSource }*{ Training, Consulting, Projects }



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



[OT] Cocoon at "Forum XML" exhibition, Paris

2002-11-11 Thread Sylvain Wallez
Hi folks,

I will be at the "Forum XML" exhibition in Paris the 13th & 14th 
november. We will showcase our products and MicroCocoon, a port of 
Cocoon for small devices such as set-top-boxes or industrial automation 
devices.

I'll be happy to meet Cocoon users visiting this exhibition. More info 
at http://www.technoforum.fr/integ2002/

Sylvain

--
Sylvain Wallez  Anyware Technologies
http://www.apache.org/~sylvain   http://www.anyware-tech.com
{ XML, Java, Cocoon, OpenSource }*{ Training, Consulting, Projects }



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

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



Re: Using Cocoon from the command

2002-11-10 Thread Sylvain Wallez
Alessio Sangalli wrote:




$ java -classpath . org.apache.cocoon.Main
Exception in thread "main" java.lang.NoClassDefFoundError: 
org/apache/avalon/framework/CascadingException
at java.lang.ClassLoader.defineClass0(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:502)
etc etc etc..


I tried to unzip the jar, to go directly inside and call Main.class 
from its own dir, etc


what can I do...!


You should set the correct class path ;-)

Look at the stack trace : one of the first classes loaded from Avalon by 
Cocoon can't be found. That's because your classpath is set to "." and 
so includes only Cocoon's own classes (guessing you start this from the 
"build/classes" directory).

Hope this helps,
Sylvain

--
Sylvain Wallez  Anyware Technologies
http://www.apache.org/~sylvain   http://www.anyware-tech.com
{ XML, Java, Cocoon, OpenSource }*{ Training, Consulting, Projects }



-
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: Session Woes

2002-11-10 Thread Sylvain Wallez
Tom Place wrote:


Hi all,

Apologies for the relatively low level of this email but someone out
there must be able to answer in 1 min what I have been failing to do for
days now.

This simple XSP file:



 xmlns:xsp="http://apache.org/xsp";
 xmlns:xsp-session="http://apache.org/xsp/session/2.0";
 create-session="true">

 
   
name="fruit">Apple
   
 



Should produce the following XML right?


 Apple


What am I doing wrong if the session attributes are being ignored and I
get the following XML

 
   
name="fruit">Apple
   
 

Again my apologies if I have missed the obvious but this example if off
the cocoon site and should work?!
 


There are two cases that can cause XSP taglib markup to be ignored by 
the XSP engine and produced "as is" in the output document : either the 
taglib namespace is wrong (this isn't the case here), or the the taglib 
isn't declared in cocoon.xconf.

You should check that the following exists in your cocoon.xconf :

 
   
 ...
 
   
 
 http://apache.org/xsp/session/2.0"/>
 
   


Hope this helps.

Sylvain

--
Sylvain Wallez  Anyware Technologies
http://www.apache.org/~sylvain   http://www.anyware-tech.com
{ XML, Java, Cocoon, OpenSource }*{ Training, Consulting, Projects }



-
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: Serializer for d-o-e?

2002-11-09 Thread Sylvain Wallez
J.Pietschmann wrote:

> Lenz, Evan wrote:
>
>> I understand why Cocoon disables the use of disable-output-escaping
>> in XSLT.
>> However, in my current project, which involves parsing XML results from
>> Google containing escaped (and non-well-formed) HTML, I need to find
>> a way
>> to disable output escaping for certain sections of text, perhaps
>> based on
>> the presence of a special attribute or PI that I can generate when
>> necessary. Does Cocoon provide a way of parameterizing an existing
>> serializer to do this? Has anyone implemented such a serializer? I would
>> think that such a customization of an existing XML serializer should be
>> pretty simple, but the Cocoon serialization framework is so abstract
>> that
>> I'm having trouble finding the right code to extend or modify.
>
>
> The answer is quite simple: you can't. D-o-e only works if the
> XSLT processor serializes the result itself, the information
> which text nodes are supposed to be d-o-e'd on output is not
> transported through the SAX pipelines Cocoon uses for plumbing
> it's components.


JAXP provides two special PIs to handle the case when serialization
isn't performed by the XSLT engine :
-  to start d-o-e and
-  to stop it.

See also
http://cvs.apache.org/viewcvs.cgi/*checkout*/xml-commons/java/external/src/javax/xml/transform/Result.java?rev=1.2

Hope this helps, but use it wisely !

--
Sylvain Wallez  Anyware Technologies
http://www.apache.org/~sylvain   http://www.anyware-tech.com
{ XML, Java, Cocoon, OpenSource }*{ Training, Consulting, Projects }





-
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: Please help with SourceWritingTransformer

2002-07-12 Thread Sylvain Wallez

ROSSEL Olivier wrote:

>>I seem to have done everything right and was testing out the
>>SourceWritingTransformer and can't get it to write to a file. 
>> I have the
>>pipeline
>>
>>
>>  
>>  
>>  
>>  
>>  
>>  >src="test/source.xsl">
>>  
>>  
>>  
>>  
>>  
>>  
>>   
>>
>>
>>I know that everything up to the second transformation works 
>>(until the
>>tofile2 trans which is the SWT).  The input to the SWT looks 
>>like this:
>>
>>
>>   >xmlns:source="http://apache.org/cocoon/source/1.0"; src="
>>   context://my.xml">
>>  http://apache.org/cocoon/SQL/2.0";
>> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";>
>> ...stuff..
>> 
>>
>>
>>
>Can you try with a src containing only the path and no "context:" at all?
>I think it may be the problem.
>
>Gurus will confirm, but I think that Writable source are URLs that can
>written
>to. context:// is a pseudo protocol, that is probably not handled correctly
>bu the SWT. Try with a path, I think SWT will be happier.
>
>Note for developpers: may be, the context:// could be considered a Writable
>Source.
>  
>

This depends on how the webapp is deployed : an unexpanded war is not 
writeable.

Apart this theroretical consideration, the problem encountered here 
comes from the fact that 'context:' is actually translated to a 'file:' 
if the webapp is expanded, but this translation is done _after_ checking 
for specialized source implementations and this falls back to the 
default URLSource which isn't writeable.

Hope you understood this... In other words, this is a bug, and you can 
add it to Bugzilla ;)

In the meanwhile, use a 'file:' url.

Sylvain

-- 
Sylvain Wallez
  Anyware Technologies  Apache Cocoon
  http://www.anyware-tech.com   mailto:[EMAIL PROTECTED]




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

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




We need a detailed comparison with Struts

2002-06-10 Thread Sylvain Wallez

Hi folks,

In less than 10 days, (potential) customers asked "how does Cocoon 
compare to Struts and JSP ?" This isn't the first time this question is 
asked, but it's becoming more and more frequent. So in turn I ask you 
this question, since my knowledge of Struts is limited to the docs at 
the Jakarta site.

My impression is that Struts is targetted at web applications (opposed 
to content publication) in HTML (no PDF, SVG, WML) and that Cocoon has 
equivalent components (form validation stuff, actions, some XSP taglibs) 
but can do much, much more.

The aim of this discussion not to start a Cocoon vs Struts flame, but to 
build a document that will go into Cocoon docs to help us to promote 
Cocoon when such questions arise.

The points to address are :
1 - how does Cocoon implement Struts features ?
2 - what does Struts do that Cocoon can't ?
3 - what does Cocoon do that Struts can't ?
4 - can we integrate Struts and Cocoon ?
5 - other items ?


Here's my view on these items :

1 - how does Cocoon implement Struts features ?
---
The main purpose of Struts is to provide a MVC framework in JSP. MVC is 
about separating application concerns, which is something that is 
naturally built in and enforced by Cocoon.

In Cocoon, the model is some presentation-independent XML produced by 
generators from almost any kind of source (database, beans, EJB, xml 
files, etc.), the view is defined by the transformation pipeline (XSL 
stylsheets, I18N transformer, etc), and the controller is defined by 
actions. Form validation and flow engine implement the equivalent 
features in Struts.

Struts also offers internationalization features that are fullfilled by 
Cocoon's I18N transformer and locale management.


2 - what does Struts do that Cocoon can't ?
---
Mmmh... got an idea, someone ? ;)


3 - What does Cocoon do that Struts can't ?
---
Struts in intrinsically limited to what can be done with JSPs, which is 
producing text output such as HTML or WML. Moreover, it's JSP taglib is 
very tied to HTML.

Cocoon, on the other hand, has a flexible serializer mechanism that 
allows it to produce any kind of output such as (but not limited to) 
PDF, JPEG, RTF.

The flow engine in Cocoon (in 2.1), by using a real programming language 
and continuations (the ability to suspend a program), is far more 
powerful than the action mapping definition in Struts.

Finally, Cocoon offers a very flexible and extensible framework that can 
integrate almost anything, and comes with a lot of features that aren't 
built into Struts. To name a few : browser selector, flexible form 
validation, database manipulation actions and XSP taglibs (add other 
important features here).


4 - Can we integrate Stuts and Cocoon ?
--
The JSP part of Struts can certainly be integrated into Cocoon using the 
JSPGenerator. What about the controller part (i.e. the servlets) ?



Thanks for your input,
Sylvain

-- 
Sylvain Wallez
  Anyware Technologies  Apache Cocoon
  http://www.anyware-tech.com   mailto:[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: Best Practice for shared information lookup? Modules?

2002-06-06 Thread Sylvain Wallez

Geoff Howard wrote:

>Wasn't sure what to call this.
>
>I have a need to make some shared information available to components.  I'd
>want the information cached in memory to cut down on the overhead of reading
>it from the filesystem or database.  I'll need it within custom generators
>for now, but it'd be a plus to generalize this to others such as actions and
>great if the same info could be called in the sitemap.  Because of this I'm
>thinking that some component would be best and may already exist.  I've read
>up on the new module stuff but can't tell whether it's meant for this use or
>not.
>

Yes, a module (more precisely an InputModule) can be used for this. And 
the sitemap feature you're talking about has been voted last week on 
cocoon-dev, and I'm starting its implementation (for version 2.1) : if 
your module is named "layout" in cocoon.xconf, you will be able to write 
e.g. 

>Example:
>We have subsites organized into page-layouts by a separate cms system.  Each
>subsite has a default "front page" page-layout id and there are many places
>I need to look this up for fallback behavior.  
>
>The information rarely changes, but is stored in the database for use by the
>cms and thus the lookup operation is too expensive to just read it each
>time.  I thought about using a cached pipeline to hold the information as
>xml but that makes accessing it from within other components difficult.
>  
>

If the information rarely change, you could have your module 
implementation cache the result.

>I thought of defining a singleton class with public
>getSubsiteID(page-layoutID) methods, etc. but thought there was a more
>"cocoon" way of doing this that would make the availibilty more general.
>


Sylvain

-- 
Sylvain Wallez
 Anyware Technologies  Apache Cocoon
 http://www.anyware-tech.com   mailto:[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]>




Cocoon article on JDJ

2002-06-06 Thread Sylvain Wallez

There's a interesting article introducing Cocoon on the Java Developer's 
Journal at http://www.sys-con.com/java/articleprint.cfm?id=1480

Notice how the author states in the intro that Cocoon doesn't have the 
visibility it deserves :
 >>
Apache Cocoon is one of the most interesting, innovative, and powerful 
platforms for dynamic content generation, though not as well known as 
the others. A subproject of the Apache XML project, Cocoon is one of the 
lesser-known offerings from the folks at the all-open-source Apache 
Software Foundation, having garnered less attention than some of its 
more popular cousins like Struts. But Cocoon is worth a look.
<<

This once again clearly shows that Cocoon needs marketing !

Sylvain

PS : thanks to Matthew and Guido for the link.

-- 
Sylvain Wallez
  Anyware Technologies  Apache Cocoon
  http://www.anyware-tech.com   mailto:[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: Saxon complaining about xmlns attributes

2002-06-06 Thread Sylvain Wallez

J.Pietschmann wrote:

> Hi,
> I get the following from my installation of Cocoon 2.0.2 on
> Websphere 3.5.4:
>
> ERROR   (2002-05-30) 17:17.44:821   [core.xslt-processor] (...)
>  Worker#5/TraxErrorHandler: Error in TraxTransformer:
>  ... SystemID: file:/.../spec.xsl; Line#: 5; Column#: -1
>  javax.xml.transform.TransformerConfigurationException:
>  Attribute xmlns:xsl is not allowed on this element
>
> I have Saxon 6.5.4 followed by xerces-1.4.4.jar in the classpath
> (all before the WebSphere cruft). The parser configuration in
> cocoon.xconf is:
>
>  logger="core.xml-parser">
> 
> 
> 
> 
> 
>
> Additionally the servlet parameter org.apache.avalon.excalibur.xml.Parser
> is set to org.apache.avalon.excalibur.xml.XercesParser
>
> Namespace-prefixes *is* set to false, as recommended. I read the
> comment that this setting suppresses passing the xmlns as
> attributes to the XML consumer (i.e. Saxon).
>
> Is there a way to get rid of this log-hogging annoyances? Should
> I use Xerces 2.0.0? The 1.4.4 jar is a legacy from an earlier
> Cocoon 2.0.0 installation, I can change it.


The parameters listed above are for JaxpParser. XercesParser doesn't 
handle them and forces namespace-prefixes to true.

So please switch to JaxpParser which cleanly handles this. Note that 
this may require to upgrade to a newer version of Xerces (don't now JAXP 
support in 1.4.4)

Sylvain

-- 
Sylvain Wallez
  Anyware Technologies  Apache Cocoon
  http://www.anyware-tech.com   mailto:[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: Multiple mails

2002-05-30 Thread Sylvain Wallez

Bert Van Kets wrote:

> If I need to send out a mail to 2000 people (members of an 
> association, no spam involved) using the sendmail logicsheet.  What 
> would be the best way to do this recursive action?  The user data is 
> in a database.
> I'm using Cocoon 2.1-dev.
> Thanks,
> Bert


A solution could be to generate from database a list of cinclude:include 
elements each referencing a pipeline that sends the mail.

Sylvain

-- 
Sylvain Wallez
  Anyware Technologies  Apache Cocoon
  http://www.anyware-tech.com   mailto:[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]>




ContentEditable in Mozilla

2002-05-28 Thread Sylvain Wallez

FYI, the great guys at Q42 have written a clone of IE's contentEditable 
for Mozilla.

Check it out at http://xopus.org/index.jsp?menu=mozce : although still 
rudimentary, it shows a lot of potential.

Sylvain

-- 
Sylvain Wallez
  Anyware Technologies  Apache Cocoon
  http://www.anyware-tech.com   mailto:[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: TreeProcessor performance

2002-05-27 Thread Sylvain Wallez

Graaf, Edgar de (fin) wrote:

>Hi,
>
>Recently I installed the TreeProcessor instead of compiling. Everyone says
>it is faster then compiling the sitemap, so I didn't test it. Then I
>installed Saxon and tot test Saxon I did a Jmeter test. My application
>collapsed from 6 seconds average response time to 20 seconds!? So I put
>xalan back, 27 seconds!? Then I put the compiled version back and I got 6
>seconds my question to you is: 
>
>Does anybody know why this could be? Does the TreeProcessor cost more
>memory? (I only have 196 MB) Are there some bugs in certain versions of the
>TreeProcessor? Or is the TreeProcessor just not scaleable?
>
>Thanks,
>
>Edgar
>  
>

The TreeProcessor is way faster at *loading* a sitemap, since it doesn't 
require code generation and compilation. On my 1GHz / 512 Mb / P3 / 
win2k PC, load time of the (large) samples sitemap fell from 20 seconds 
to less than 1 second.

Now for runtime execution, tests showed between 0 and 10% speed increase 
*with a HotSpot VM* (JDK 1.3.1). If you don't use a HotSpot VM, it's 
very likely that the TreeProcessor will be much slower than the compiled 
one.

Are you using a HotSpot VM ? If yes, you also have to give it some 
"warm-up" time before actually measuring performance.

Anyway, my tests were rather limited and I would be interested if people 
had the time and tools to perform more in-depth performance comparisons 
between the two engines.

Sylvain

-- 
Sylvain Wallez
  Anyware Technologies  Apache Cocoon
  http://www.anyware-tech.com   mailto:[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: map:views - what has been changed in C2.1-dev

2002-05-22 Thread Sylvain Wallez

leo leonid wrote:

> me again,
> I just noticed that some weeks ago there has been a discussion in the 
> xml-cocoon-dev-list about future implementations of view labels. But I 
> didn't find any solution or temporary workaround to get labels 
> interpreted again inside an aggregation.


The main discussion was about branching to the view from the _last_ 
label matching the view and not the first one. But nothing has changed 
yet. For aggregation, could please try to add 'abel="content" on 
 ?

> Are there any ideas? It would be great, for creating a search index of 
> the documentation would be possible again.
> thanks
> /L
>
>
> On Friday, May 17, 2002, at 09:28  Uhr, leo leonid wrote:
>
>> I wonder what has been changed concerning the behavior of views (and 
>> why!)
>> Now I get HTML-output where  I expect XML (and recently still got).
>> May this be the reason why the sample "searching the docs" doesn't 
>> work anymore?
>> It looks like the LuceneIndexer is expecting XML-result from the 
>> content-view
>> but it gets HTML, which it is ignoring.
>>
>> Example (similar to the cocoon-documentation):
>> There is a generator without label ("serverpages-nolabel")
>> and a simple view to exit the pipeline and serialize the result as 
>> XML ("content").
>> And the goal is to omit head- and foot-parts and all 
>> HTML-transformations in content-view
>> so that there is only the body-content with filter-3.xsl applied 
>> within a  root element.
>>
>> Problem:
>> In the following pipeline the final transformation (> src="site2HTML.xsl" />)
>> is executed in the content-view. But it should not. Or did I miss 
>> something?
>>
>> 
>> 
>> 
>> ...
>> 
>> > src="page-geneation.xsp"/>
>> 
>> 
>> 
>> 
>> 
>> 
>>
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>>
>>
>> Thanks!
>> /Leo
>>
>>
>> -
>> 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]>
>


-- 
Sylvain Wallez
  Anyware Technologies  Apache Cocoon
  http://www.anyware-tech.com   mailto:[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 book reviewers wanted

2002-05-22 Thread Sylvain Wallez

Matthew Langham wrote:

>I was going to refrain from commenting...
>
>Anyone who believes (or thinks) that an open source project can survive
>without commercial support is far removed from "the real world". The number
>of people working on open source project "just for the fun" or "to scratch
>that itch" is IMO very small. In fact it is my opinion that any open source
>project - without some form of integrated (!) commercial backing will fail
>in the end.
>
>Before we (as a company) decided to get involved with Cocoon and the open
>source arena we had a discussion with Stefano on exactly this subject. His
>opinion (and this is something I think is sooo true) is that using open
>source software commercially - without "giving back" will eventually lead to
>you (as a company - or person) being shouted down in the community.
>
>Now there are various ways to give back to a project - as we discussed with
>Stefano:
>
>* Contributing Patches and Bug Fixes
>* Donating components that were previously part of a product
>* Actively working on the project
>* Taking over a role in the project
>* Testing the software and publishing your findings
>* Writing documentation
>* Writing articles to get the project "noticed"
>* Presenting at conferences to get the project "noticed"
>* Writing books to help anyone who wants to use the software
>
>And probably many more
>
>Well - guess what - we as a company (and Carsten and myself in particular)
>have done all that in the past 2 years. And we still do. Every day.
>
>And (thankfully) we are not alone. There are many great (commercially
>orientated) people out there who are helping to move Cocoon forward. The
>fact that the Apache licence allows this is one of the reasons Apache
>projects are so successful and widely renowned.
>
>The more commercial support Cocoon receives - whether in projects, books,
>products based on Cocoon - the more successful it will become.
>
>Matthew
>  
>

I fully share this view.

An important dimension that should be taken into account is time : if I 
wasn't allowed by my company to give some of my time to Cocoon, I would 
never have been able to contribute all that I have contributed. Yes, I 
also take on my spare time for Cocoon because I love it and it's fun, 
but my wife and children limit this time ;)

And time is money. So many companies give money to Apache projects 
through people's time, and allowing commercial use of these projects is 
a way for Apache to pay back. This explains the high quality of all the 
stuff you can find here.

My view on opensource is this one : many people, which can be business 
competitors in the "real" world, join forces to build something that 
none of them could have built alone. And everyone (including 
non-contributors) can take this and make money with it by adding value 
on top of it through products, consulting, books, training, etc.

Sylvain

-- 
Sylvain Wallez
  Anyware Technologies  Apache Cocoon
  http://www.anyware-tech.com   mailto:[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 book reviewers wanted

2002-05-22 Thread Sylvain Wallez

Bert Van Kets wrote:

> Ah, I definitely need to brush up my understanding of the license 
> agreements.
> Darn, I hate those legal texts.
> Does anybody know a good site where all the different license 
> agreements are explained in English?
> Bert


Check out http://opensource.org/licenses/

Sylvain

-- 
Sylvain Wallez
  Anyware Technologies  Apache Cocoon
  http://www.anyware-tech.com   mailto:[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: search mailing list?

2002-05-22 Thread Sylvain Wallez

You can also go to http://marc.theaimsgroup.com/?l=xml-cocoon-users and 
search there. This archive is updated in real time.

Check also other archives listed at 
http://xml.apache.org/cocoon/mail-archives.html

Sylvain

Volker Schneider wrote:

> Hi Beth,
>  
> you can download the zip-files from xml.apache.org web site unpack it 
> and you can take an editor which support "find in files" or you can 
> use the Windows-search.
>  
> Best regards
> - Volker -
>
> -Original Message-
> *From:* Naquin, Beth [mailto:[EMAIL PROTECTED]]
> *Sent:* Dienstag, 21. Mai 2002 20:05
> *To:* '[EMAIL PROTECTED]'
> *Subject:* search mailing list?
>
> Is there a way I can search this mailing list (not the archive)??
>
> Beth Naquin
> SAGEM MORPHO Inc.
> 1145 Broadway Plaza STE 200
> Tacoma, WA 98402
>
> 253-597-8245
>


-- 
Sylvain Wallez
  Anyware Technologies  Apache Cocoon
  http://www.anyware-tech.com   mailto:[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 1.8 and iPlanet Web Server 6.0 sp2

2002-04-01 Thread Sylvain Wallez

Roman Medina wrote:

> Hi.
>
> I'm looking for some step-by-step-guide / paper / doc / draft / ideas
>for installing Cocoon on iWS 6.0. My goal is to get the cocoon
>examples to work with iWS. This should be sufficient by now. 
>
> I've read some doc that involves iAS (iPlanet Application Server).
>Doesn't cocoon works with iWS? Is it necessary to use iAS? Anybody of
>you have tried such a configuration (iWS)?
>
> Any help or idea would be greatly appreciated.
>
> Thanks in advance.
>

Look at http://xml.apache.org/cocoon1/install.html : there are 
instructions for installing Cocoon 1.8 on iWS 4.1.x. I don't know how 
much difference there is between iWS 4.1 and iWS 6.0, but these 
instructions should help you.

Sylvain

-- 
Sylvain Wallez
 Anyware Technologies  Apache Cocoon
 http://www.anyware-tech.com   mailto:[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 1.8 and iPlanet Web Server 6.0 sp2

2002-04-01 Thread Sylvain Wallez

Roman Medina wrote:

> Hi.
>
> I'm looking for some step-by-step-guide / paper / doc / draft / ideas
>for installing Cocoon on iWS 6.0. My goal is to get the cocoon
>examples to work with iWS. This should be sufficient by now. 
>
> I've read some doc that involves iAS (iPlanet Application Server).
>Doesn't cocoon works with iWS? Is it necessary to use iAS? Anybody of
>you have tried such a configuration (iWS)?
>
> Any help or idea would be greatly appreciated.
>
> Thanks in advance.
>

You should read the install docs at 
http://xml.apache.org/cocoon/installing/index.html : it contains many 
instructions, including installing on iWS 4.1.x. I don't know how much 
difference there is between iWS 4.1 and iWS 6.0, but these instructions 
should help you. Note that if iWS 6.0 correctly implements the servlet 
2.2 specification, you shouldn't need the BootstrapServlet trick.

And please give us feedback so that we can update the docs.

Sylvain

-- 
Sylvain Wallez
 Anyware Technologies  Apache Cocoon
 http://www.anyware-tech.com   mailto:[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: Bug in TreeProcessor?

2002-03-31 Thread Sylvain Wallez

Lai, Harry wrote:

>Hi all,
>
>So it looks like Cocoon 2.0.2 fixes the bug described below.  Unfortunately,
>when I try using the TreeProcessor, this bug reappears.  Has anyone else
>seen this?
>
>Harry
>

Yes, this is a bug in TreeProcessor. Thanks for reporting, it's fixed in 
the latest CVS.

Sylvain

>-Original Message-
>From: Christian Haul [mailto:[EMAIL PROTECTED]]
>Sent: Friday, March 01, 2002 9:06 AM
>To: [EMAIL PROTECTED]
>Subject: Re: Resources and parameter scopes
>
>
>On 28.Feb.2002 -- 05:17 PM, Lai, Harry wrote:
>
>>Hi all,
>> 
>>I've observed an odd behavior with resources and parameter scope, and I
>>wanted to know if this is at least a consistent behavior.  Just FYI, I'm
>>using Cocoon 2.0.1 (official release), Sun JDK 1.3.1, JBoss-2.4.1 (with
>>Tomcat 3.2.3 embedded), on Win2K.
>> 
>>Anyway, it looks like if you use a parameter reference in a map:call's
>>resource attribute, it gets resolved AFTER the call has pushed a new map
>>(for the call itself) on to the end of the list.  For example, say you
>>
>have
>
>>the following resources:
>> 
>>
>>
>>
>>
>>
>> 
>>
>>
>>
>> 
>>Notice that step2 is basically a redirect to a resource named step3 (in
>>
>this
>
>>case).  However, notice that I have to use {../foo} instead of just {foo}.
>>If you look at the sitemap_xmap.java file, you'll find that the code for
>>resource_step2 adds the new map on before resolving the "step{../foo}"
>>resource name.
>> 
>>Anyway, this is easy enough to work around (now that I know it works this
>>way), but I wanted to make sure this is how resource calls are always
>>resolved (or if this is considered a bug and is going to be changed
>>
>later).
>
>>Basically, I just want to know if I should expect my {../foo} to possibly
>>break if I later upgrade to a new version of Cocoon or if I alter my
>>sitemap.  =)  Thanks!
>>
>
>I'd consider it as a bug and will change that ASAP.
>
>   Chris.
>

-- 
Sylvain Wallez
 Anyware Technologies  Apache Cocoon
 http://www.anyware-tech.com   mailto:[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: Running Cocoon on non-compliant servlet engines

2002-03-21 Thread Sylvain Wallez

Carsten Ziegeler wrote:

>>Sylvain Wallez wrote:
>>
>>Hi folks,
>>
>>The project I'm currently working on requires Cocoon to run on a 2-years 
>>old Netscape Enterprise server 4.1, which has the servlet 2.2 classes 
>>but doesn't implement them correctly : no context directory, no 
>>classloader for WEB-INF, funky resolution of context resources, etc.
>>
>>So I wrote a BootstrapServlet that sets up a servlet-2.2 compliant 
>>ServletContext and ClassLoader and uses this environment to create the 
>>CocoonServlet to which it delegates request handling. And now Cocoon 
>>runs smoothly !
>>
>Sounds great!
>Does this work in all servlet engines which support 2.2?
>
Thoroughly tested in iPlanet 4.1.8. However, it's difficult to say if it 
can handle all deficiencies of buggy engines that claim to be 2.2 
compliant ;)

>>I guess this could also be used for other "legacy" engines still living 
>>out there. Are people interested in this ? If yes, I can add it to the 
>>scratchpad in CVS. Or we could even include it in the soon-to-come 2.0.2 
>>(Carsten ?).
>>
>As this is a new component which is well tested and works and which
>has no influence on the existing system, I have no objections to adding
>this to 2.0.2. But please with some docs :)
>
Added to the CVS, with some docs and javadocs ;))

This is the class org.apache.cocoon.servlet.BootstrapServlet. Users of 
stable releases will find it next week in the 2.0.2.

Cheers,
Sylvain

-- 
Sylvain Wallez
  Anyware Technologies  Apache Cocoon
  http://www.anyware-tech.com   mailto:[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: Running Cocoon on non-compliant servlet engines

2002-03-20 Thread Sylvain Wallez

Carsten Ziegeler wrote:

>>Sylvain Wallez wrote:
>>
>>Hi folks,
>>
>>The project I'm currently working on requires Cocoon to run on a 2-years 
>>old Netscape Enterprise server 4.1, which has the servlet 2.2 classes 
>>but doesn't implement them correctly : no context directory, no 
>>classloader for WEB-INF, funky resolution of context resources, etc.
>>
>>So I wrote a BootstrapServlet that sets up a servlet-2.2 compliant 
>>ServletContext and ClassLoader and uses this environment to create the 
>>CocoonServlet to which it delegates request handling. And now Cocoon 
>>runs smoothly !
>>
>Sounds great!
>Does this work in all servlet engines which support 2.2?
>
It relies mainly on the API being present and reimplements most of 
what's used by Cocoon. So it should be OK if javax.servlet 2.2 is there, 
whatever its compliance status is.

>>I guess this could also be used for other "legacy" engines still living 
>>out there. Are people interested in this ? If yes, I can add it to the 
>>scratchpad in CVS. Or we could even include it in the soon-to-come 2.0.2 
>>(Carsten ?).
>>
>As this is a new component which is well tested and works and which
>has no influence on the existing system, I have no objections to adding
>this to 2.0.2. But please with some docs :)
>
Ok, ok. Message understood : with some docs ;-)

Sylvain

-- 
Sylvain Wallez
 Anyware Technologies  Apache Cocoon
 http://www.anyware-tech.com   mailto:[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: Serving PDF's: set the content-length in the HTTP-Response-Header

2002-03-20 Thread Sylvain Wallez

Christoph Meier wrote:

> I think Phil is right about the bug in IE+Acrobat plug-in.
> IE+Acrobat plug-in stop dowloading the stream after a certain amount 
> of bytes is down.
>
> The problem should be fixed if you can set the content-length in the 
> HTTP-Response-Header, to tell IE+Acrobat plug-in about the size of the 
> Response-Stream.
> At least this worked when i was trying to serve PDFs from another 
> application-server. I never tried serving PDFs with a 
> Java-based-App-Server, yet, therefore i didn't tried that within 
> cocoon, ...
> but i'm quite sure it will work.
>
> the point is, i have no idea where to set this 
> HTTP-Response-Header-Property within cocoon.
> let me know it, if it worked.



The only solution for now is to extend the ResourceReader to make 
shouldSetContentLength() return true. However, this means that Cocoon 
will buffer internally the whole file before sending it down to the 
browser, which may not be what you want for large files.

A better long term solution would be for a Reader to be able to give the 
content-length (will add this to the todo list).

Note also that FOPSerializer returns true, meaning this problem doesn't 
exist for dynamically-generated PDF.

Sylvain

-- 
Sylvain Wallez
 Anyware Technologies  Apache Cocoon
 http://www.anyware-tech.com   mailto:[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]>




Running Cocoon on non-compliant servlet engines

2002-03-20 Thread Sylvain Wallez

Hi folks,

The project I'm currently working on requires Cocoon to run on a 2-years 
old Netscape Enterprise server 4.1, which has the servlet 2.2 classes 
but doesn't implement them correctly : no context directory, no 
classloader for WEB-INF, funky resolution of context resources, etc.

So I wrote a BootstrapServlet that sets up a servlet-2.2 compliant 
ServletContext and ClassLoader and uses this environment to create the 
CocoonServlet to which it delegates request handling. And now Cocoon 
runs smoothly !

I guess this could also be used for other "legacy" engines still living 
out there. Are people interested in this ? If yes, I can add it to the 
scratchpad in CVS. Or we could even include it in the soon-to-come 2.0.2 
(Carsten ?).


For the same project, I also wrote the BlobSource (see 
http://www.mail-archive.com/cocoon-dev@xml.apache.org/msg12945.html) for 
which I had no feedback up to now. Nobody interested in this ?


Cheers,
Sylvain

-- 
Sylvain Wallez
 Anyware Technologies  Apache Cocoon
 http://www.anyware-tech.com   mailto:[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: Streaming PDF.

2002-03-15 Thread Sylvain Wallez

Olivier Rossel wrote:

> I wonder if FOP serializer can stream PDF documents instead of 
> buffering the whole document before sending it.
> I was told that it is because of a nasty bug in IE/Acrobat plug-in. 
> But the FOP Serializer has already the capability.
>
> Is it true?
> Can this behaviour be enabled?

Yes, Olivier, I will make it configurable.
(damn, he's 10 meters away from me and sends the question to the list ;)

Does someone know the status of this bug in recent IE versions ?

Sylvain

-- 
Sylvain Wallez
  Anyware Technologies  Apache Cocoon
  http://www.anyware-tech.com   mailto:[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: [STATUS] Cocoon Roadmap

2002-03-04 Thread Sylvain Wallez

Derek Hohls wrote:

>Hi
>
>You said:
>
>To make things easier for those who want to write with our document
>DTD, 
>I've written a CSS2 stylesheet for it. I tested it with the XMLmind XML
>editor (aka XXE, see http://www.xmlmind.com/xmleditor/) : it's a cool 
>open-source CSS2 enabled XML editor written in Java, which provides 
>word-processor like document editing.
>
>Since the CSS renders like the web site, writing a doc in the document
>DTD is like writing a web page ! Check it out in 
>src/documentation/xdocs/css, and be indulgent since it's my first CSS2
>stylesheet :)
>
>
>Quick question 1 - where is the DTD you refer to?
>
>Quick question 2 - where is the "src/documentation/xdocs/css" located? 
>(full URL)
>(bearing in mind I do not work with the source code, but only the
>prcompiled Cocoon ;-)
>
You can find the DTD in cocoon.war, in 
"documentation/xdocs/dtd/document-v10.dtd "

I added the CSS to CVS yesterday evening, so you'll have to get the 
latest CVS repository or get it directly at 
http://cvs.apache.org/viewcvs.cgi/xml-cocoon2/src/documentation/xdocs/css/

>
>Thanks
>Derek
>
Additional note about XXE : it has some plugins for non-XML formats, and 
one of the builtin plugins is for javadoc. This provides graphical 
edition of html javadoc comments. Way cool !

Sylvain

-- 
Sylvain Wallez
  Anyware Technologies  Apache Cocoon
  http://www.anyware-tech.com   mailto:[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: [STATUS] Cocoon Roadmap

2002-03-03 Thread Sylvain Wallez
re are number of things that we are working on in this regard:
>
> 3.1) Writeable Sources: we are working on making the protocol handlers
>symmetrical, meaning that you can read from any resource (say
>dbxml://database/docs/news) and also *write* on it. (this should remove
>the need to create custom write-somewhere transformers for each type of
>resource being used to write on)
>
This is a reality with the latest CVS for files (using the 'file:' 
protocol). Writing can also be transactional : see FileSource 
implementation that uses a temp file until closed sucessfully. The next 
two sources that should be made writeable are xmldb and raw URLs 
(allowing http or ftp upload)



>
>Thanks for reaching this far.
>
I did ;)

>Keep it up!
>
Sylvain

-- 
Sylvain Wallez
 Anyware Technologies  Apache Cocoon
 http://www.anyware-tech.com   mailto:[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: Multiple Namespace Decls.

2001-12-10 Thread Sylvain Wallez

Luke Studley wrote :

> Hi
>
> Wonder if anyone else has seen this
>
> I'm trying to use cinclude, but the same seems to happen for all ns
> declarations - whether from xsp or read from xml - in the down
> pipeline processing there are multiple (dual) declarations of each
> namespace - my editor complains about this and my styleshets screw
> up.
>
> Sticking in  a log statement I see the following - which seems to
> correctly fire a startPrefixMapping event - but also an attribute
> event for the xmlns:ci attribute as well - is this correct? If it
> is then something downstream is responding to both events and thus
> duplicating xmlns dec.s

First of all, would you mind avoiding HTML mail on the list ? Thanks.

I guess you're using Saxon.

This is because cocoon was mainly tested with Xalan whose serializer has
a bug associated with namespace declaration (startPrefixMapping isn't
enough, Xalan also wants xmlns: attributes).

To circumvent this problem, the XML parser in Cocoon always had the
"namespace-prefixes" property set (see
org.xml.sax.ContentHandler.startElement() javadoc to see what this
means) but this isn't in fact the real good solution and hurts Saxon.

As I also faced this problem recently and I'm currently working on a
more robust solution, that handles transparently both Saxon and Xalan,
which I will commit in the CVS I hope this week.

I'll notify you when the commit is done, and it will of course be
included in the next Cocoon minor release. In the meanwhile, I suggest
you temporarily switch to Xalan.

Sylvain.

-- 
Sylvain Wallez
Anyware Technologies - http://www.anyware-tech.com

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

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




Re: Saxon Integration (Newbie)

2001-12-06 Thread Sylvain Wallez


> Think I've found a couple of problems in the sitemap.xsl file
>  
> Line 430 
> XSLTFactoryLoader:hasSubstitutions(@pattern)
> should maybe read:
> XSLTFactoryLoader:hasSubstitutions($factory-loader, @pattern)
>  
>  
> Line 921 
> XSLTFactoryLoader:escape($pattern-value)
> should maybe read:
> XSLTFactoryLoader:escape($factory-loader, $pattern-value)
>  
>  
> Making these changes I can manually run the stylesheet against my sitemap -
> I am guessing that maybe Xalan is less fussy about the missing java objects
> (although I don't know how!). Haven't tried re-creating the jar and
> re-trying C2 yet though.
>  
> Can somebody tell me if these are C2 bugs - or are they there for a reason -
> or am I seeing some differences in usage of Saxon and Xalan?

Yes, these are bugs. I corrected this, and the updated sitemap.xsl is
available in CVS.

> More generally - if they are bugs - who should I submit changes to - or
> should I make changes myself somehow (I'm not averse to making the changes
> myself in CVS - but have never contributed directly to an Open Source
> project before so don't know the procedure/etiquette etc.)

You can register bugs in bugzilla at http://nagoya.apache.org/bugzilla/
If you have solved the bug, you can attach the patch (using diff -u) to
the bug entry.

Only committers can write in CVS, but a way to become one is to send so
many patches that we vote to allow you to apply your patches by yourself
;)

> Sorry if these are repetitive questions - I couldn't search the archives as
> the disks were down and I only started using Cocoon (and joined the list)
> yesterday.

Great : one day, one bug. Keep on !

> Thanks
>  
> Luke

Sylvain

-- 
Sylvain Wallez
Anyware Technologies - http://www.anyware-tech.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]>




[announce] Anyware & Cocoon2 at "Forum XML" in Paris, 20&21 nov.

2001-11-14 Thread Sylvain Wallez

Hi all,

I'm pleased to announce that Cocoon will be present next week, 20 & 21
november, at the "Forum XML" exhibition in Paris, France.

We will demonstrate our new "Web Application Studio" product that allows
developpers to build Java/XML web apps through a user-friendly IDE that
hides most of the complexity of these applications while enforcing a
strong methodology.

It is heavily based on Cocoon 2 and also features extensions to
Dreamweaver that turn it into a WYSIWYG XSL editor.

I would be very pleased to welcome you at Anyware's booth (no 103 & 104)
to talk about the wonders of Cocoon... and show you our product :)

You can find more informations about this exhibition at
http://www.technoforum.fr (in french) and more about our product on our
web site (in english, see link below).

Hope to see you soon,
Sylvain.

PS : For those who don't know me, I'm a member of the Cocoon 2
development team.
-- 
Sylvain Wallez
Anyware Technologies - http://www.anyware-tech.com

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

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




Re: Outputting raw XML from a Transformer

2001-10-24 Thread Sylvain Wallez

Luca Morandini a écrit :
> 
> Sylvain,
> 
> ok, I parsed it, and it shows gracefully... bar for an " encoding="UTF-8"?>" on top of every XML string which I receive from the
> external application.
> 
> I think this PI causes an "AbstractXMLPipe: Exception in endDocument" when
> I try to render the XML output in HTML via a stylesheet.
> 
> Hence, how could I get rid of this unwanted PI ?
> 

You need also to put between the parser and the transformer output a
filter that removes start/endDocument and PIs from the parsed document.
org.apache.cocoon.xml.EmbeddedXMLPipe strips start/endDocument, but not
 PI's. Your filter can extend this class and strip also PIs.

Sylvain.

> Thanks in advance,
> 
> -
>Luca Morandini
>GIS Consultant
>   [EMAIL PROTECTED]
> http://utenti.tripod.it/lmorandini/index.html
> -----
> 
> > -Original Message-
> > From: Sylvain Wallez [mailto:[EMAIL PROTECTED]]
> > Sent: Wednesday, October 24, 2001 8:58 AM
> > To: [EMAIL PROTECTED]
> > Subject: Re: Outputting raw XML from a Transformer
> >
> >
> >
> >
> > Luca Morandini a écrit :
> > >
> > > Folks,
> > >
> > > I'm writing my first Transformer, and I'd like to
> > insert an XML string,
> > > which I receive from another application, into the output stream of the
> > > Transformer... but without parsing it, is it possible ?
> > >
> > > Best regards,
> > >
> > Nope. You have to parse it. You can lookup(Parser.ROLE) on the component
> > manager to get a parser and send the resulting SAX events to the output
> > of your transformer.

-- 
Sylvain Wallez
Anyware Technologies - http://www.anyware-tech.com

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

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




Re: [C2] Howto ... IF in sitemap ...

2001-10-24 Thread Sylvain Wallez



Eduardo Godoy Vega a écrit :
> 
> I fixed ... but ... everywhere I found
> this line (including ParameterSelectorFactory.java file)
> <map:selector name="parameter"
> factory="org.apache.cocoon.selection.ParameterSelectorFactory"/>
> 
> but ... If I use "src" insted of "factory" ... It works!
> 
> BTW ... which is the diff. between use "src" and "factory"??
> 
> Eduardo.
> 
"factory" was used in early versions of Cocoon 2 to distinguish between
components implementing CodeFactory from regular components, but has
been removed since the sitemap engine detects this automatically. Only
"src" is supported now.
-- 
Sylvain Wallez
Anyware Technologies - http://www.anyware-tech.com

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

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




Re: pb installing cocoon2: javax TransformerException

2001-10-23 Thread Sylvain Wallez

Strange... it doesn't look like the usual sitemap compilation problems
:(
Aren't there some other exceptions above this one in the log files
(check *all* log files) ?

"LEUZINGER Claude (DSIT-EX)" a écrit :
> 
> "LEUZINGER Claude (DSIT-EX)" a écrit :
> > Hello,
> > I try to install the version 2.0rc1a of cocoon 2 with tomcat 3.2.2. and
> > windows NT4.0.  I have a javax.xml.transform.Transformer exception when i
> access the URI > '<http://localhost:8080/cocoon/'>. (it works well with the
> previous version > of cocoon 2.0b1)
> > Thanks in advance,
> > Claude.
> -
> Have you cleared the Tomcat work directory before running the new version ?
>  Also, you should look at log files in WEB-INF/logs which can give
> additionnal information.
> Sylvain.
> 
> 
> I have cleared the Tomcat work directory before running the new version, but
> it does'nt works.
> here is an extract of the log file. (error compiling sitemap) :
> 
> thanks,
> Claude.
> 
> DEBUG   (2001-10-23) 16:17.22:114   [cocoon  ] (/cocoon/)
> Thread-17/DefaultComponentFactory: ComponentFactory decommissioning instance
> of
> org.apache.cocoon.components.language.markup.sitemap.SitemapMarkupLanguage.
> ERROR   (2001-10-23) 16:17.22:114   [cocoon  ] (/cocoon/) Thread-17/Handler:
> Error compiling sitemap
> javax.xml.transform.TransformerException
> at
> org.apache.xalan.transformer.TransformerImpl.waitTransformThread(Transformer
> Impl.java:2954)
> at
> org.apache.xalan.stree.SourceTreeHandler.endDocument(SourceTreeHandler.java:
> 469)
> at
> org.xml.sax.helpers.XMLFilterImpl.endDocument(XMLFilterImpl.java:518)
> at
> org.xml.sax.helpers.XMLFilterImpl.endDocument(XMLFilterImpl.java:518)
> at
> org.apache.xerces.parsers.SAXParser.endDocument(SAXParser.java:1230)
> at
> org.apache.xerces.validators.common.XMLValidator.callEndDocument(XMLValidato
> r.java:1080)
> at
> org.apache.xerces.framework.XMLDocumentScanner$EndOfInputDispatcher.dispatch
> (XMLDocumentScanner.java:1499)
> at
> org.apache.xerces.framework.XMLDocumentScanner.parseSome(XMLDocumentScanner.
> java:381)
> at org.apache.xerces.framework.XMLParser.parse(XMLParser.java:1081)
> at org.xml.sax.helpers.XMLFilterImpl.parse(XMLFilterImpl.java:371)
> at org.xml.sax.helpers.XMLFilterImpl.parse(XMLFilterImpl.java:371)
> at
> org.apache.cocoon.components.language.markup.LogicsheetCodeGenerator.generat
> eCode(LogicsheetCodeGenerator.java:130)
> at
> org.apache.cocoon.components.language.markup.AbstractMarkupLanguage.generate
> Code(AbstractMarkupLanguage.java:291)
> at
> org.apache.cocoon.components.language.generator.ProgramGeneratorImpl.generat
> eResource(ProgramGeneratorImpl.java:313)
> at
> org.apache.cocoon.components.language.generator.ProgramGeneratorImpl.createR
> esource(ProgramGeneratorImpl.java:275)
> at
> org.apache.cocoon.components.language.generator.ProgramGeneratorImpl.load(Pr
> ogramGeneratorImpl.java:192)
> at org.apache.cocoon.sitemap.Handler.run(Handler.java:208)
> at java.lang.Thread.run(Thread.java:484)
> 

-- 
Sylvain Wallez
Anyware Technologies - http://www.anyware-tech.com

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

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




Re: "The sitemap handler's sitemap is not available" error

2001-10-23 Thread Sylvain Wallez



"Truong,Hoang C." a écrit :
> 
> Hi everyone,
> I got this error "The sitemap handler's sitemap is not available".  I am
> running jakarta-tomcat-4.0.1, cocoon2, redhat7.1  Could anyone tell me
> what wrong?  What can I do to fix this?  Thanks.
> 
> Hoang
> 
You should check the logs in WEB-INF/logs, which contain detailed
information about the cause of this error (search for stacktraces).

Note that the latest Cocoon 2 CVS displays the full reason on screen so
you don't have to search the logs.

-- 
Sylvain Wallez
Anyware Technologies - http://www.anyware-tech.com

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

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




Re: Pb installing cocoon2 : javax TransformerException

2001-10-23 Thread Sylvain Wallez
e(XMLDocumentScanner.
> java:381)
> at org.apache.xerces.framework.XMLParser.parse(XMLParser.java:1035)
> at org.xml.sax.helpers.XMLFilterImpl.parse(XMLFilterImpl.java:371)
> at org.xml.sax.helpers.XMLFilterImpl.parse(XMLFilterImpl.java:371)
> at
> org.apache.cocoon.components.language.markup.LogicsheetCodeGenerator.generat
> eCode(LogicsheetCodeGenerator.java:130)
> at
> org.apache.cocoon.components.language.markup.AbstractMarkupLanguage.generate
> Code(AbstractMarkupLanguage.java:291)
> at
> org.apache.cocoon.components.language.generator.ProgramGeneratorImpl.generat
> eResource(ProgramGeneratorImpl.java:313)
> at
> org.apache.cocoon.components.language.generator.ProgramGeneratorImpl.createR
> esource(ProgramGeneratorImpl.java:275)
> at
> org.apache.cocoon.components.language.generator.ProgramGeneratorImpl.load(Pr
> ogramGeneratorImpl.java:192)
> at org.apache.cocoon.sitemap.Handler.run(Handler.java:208)
> at java.lang.Thread.run(Thread.java:484)
> original exception
> javax.xml.transform.TransformerException
> 
> 
> 
> M. Claude LEUZINGER
> SNCF - DSIT-EX /Section AM
> 5, place Jules Ferry 69006 LYON
> * [EMAIL PROTECTED](SNCF [EMAIL PROTECTED])
> * 04 78 65 41 56 (SNCF 54 41 56)
> * 04 78 65 45 07 (SNCF 54 45 07)
> 
-- 
Sylvain Wallez
Anyware Technologies - http://www.anyware-tech.com

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

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




Re: [C2] Howto ... IF in sitemap ...

2001-10-23 Thread Sylvain Wallez

Your  block isn't organized correctly :

<--- remove the "/"
  
   <--- close the block.

A reminder also : the "parameter" selector test a String. This means the
"unveil-it" action should put a string in the Map it returns.

Eduardo Godoy Vega a écrit :
> 
> What I'm doing wrong ?
> here is my sitemap
> 
> 
> http://apache.org/cocoon/sitemap/1.0";>
> 
> 
> 
> 
> 
> 
> 
>  factory="org.apache.cocoon.selection.ParameterSelectorFactory"/>
> 
>  src="org.apache.cocoon.matching.WildcardURIMatcherFactory"/>
> 
> 
>  src="com.unveil.cocoon.acting.UnveilAction"/>
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
>   
> name="parameter-selector-test" value="{Count}"/>
> 
> 
> 
> 
> 
> 
> 
> 
> 
>   
> src="stylesheets/llbean-html.xsl">
> name="use-request-parameters" value="true"/>
> 
> 
> 
> 
> 
> 
> 
> 
> 
> And I get this error msg:
> 
> ERROR   (2001-10-22) 16:58.21:585   [cocoon  ]
> (/cocoon/unveil/process-unveil) Thread-13/sitemap_xmap: Sitemap
> org.apache.avalon.framework.component.ComponentException: UnnamedSelector:
> ComponentSelector could not find the component for hint: parameter
> at
> org.apache.avalon.excalibur.component.ExcaliburComponentSelector.select(Unkn
> own Source)
> at



> Eduardo.

-- 
Sylvain Wallez
Anyware Technologies - http://www.anyware-tech.com

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

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




Re: [C2] Howto ... IF in sitemap ...

2001-10-22 Thread Sylvain Wallez



Eduardo Godoy Vega a écrit :
> 
> Hi,
> I want to use some kind of "IF-ELSE" into sitemap...
> 
> right now, I have this code ...
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> "unveil_result" is a number returned by my action, and I want to choose a
> different XSP page if unveil_result is zero or if unveil_result equal one or
> if unveil_result is bigger than one ...
> I don't want to use java inside XSP pages ... so ... Is it possible to do in
> sitemap ??
> 
> Thanks
> Eduardo.
> 
You can use the "parameter" builtin selector, allowing the following
construct in your sitemap (Count should be a String) :


 
  
   
   
 
   
   
 
   
   

   
  
  http://www.anyware-tech.com

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

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




Re: where is context.setAttribute?

2001-10-22 Thread Sylvain Wallez



Paolo a écrit :
> 
> How can we set context attributes with cocoon2? Why did the authors
> implement getAttribute function but not the setAttribute?
> 
> ByeBye,
> Paolo Scaffardi
> AIRVENT SAM S.p.A.
> 
This feature has recently been added and will be part of the next
release. If you need it now, you can get the latest sources using CVS.

-- 
Sylvain Wallez
Anyware Technologies - http://www.anyware-tech.com

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

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




Re: Yet another XInclude problem

2001-10-18 Thread Sylvain Wallez



Luca Morandini a écrit :
> 
> Folks,
> 
> I'm upset by this XInclude-thing... I can't figure out what's wrong.
> 
> Ok, here's my sitemap:
> 
> 
> 
> 
> 
> 
> 
> Heres the map.xsp.xsl file:
> 
> 
>  language="java"
> xmlns:xsp="http://apache.org/xsp";
> xmlns:xinclude="http://www.w3c.org/2001/XML/XInclude";
> >
>  xinclude:parse="xml"/>
> 
> 
> Here's the result:
> 
>   
>   http://www.w3c.org/2001/XML/XInclude";
> xmlns:xsp="http://apache.org/xsp";
> xinclude:href="context:docs/parameters.xml" xinclude:parse="xml" />
> 
> Frustrating, isn't it ? By the way, the parameters.xsml file is in the same
> directory of map.xsp.xml.
> 
> Thanks in advance,
> 
First of all, I'm not sure xinclude:include is allowed as the top-level
element of an XML document.

Second, if you include a whole document (no xpath selection on it), I
strongly suggest you use CInclude, which is way faster.

Hope this helps.
-- 
Sylvain Wallez
Anyware Technologies - http://www.anyware-tech.com

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

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




Re: C2: javax.servlet... in XSP

2001-09-04 Thread Sylvain Wallez

Torsten Curdt wrote:
> I need to import some classes from the javax.servlet.http
> package in my XSP pages. With Tomcat 4b3 the javax package
> is unfortunately not known to the Cocoon classloader.
> 
> Copying the servlet.jar into WEB-INF/lib prevents
> Cocoon to start. (Tomcat does not does not like this)
> 
> Shouldn't javax be available in all ServletEngines
> automagically or is this more a Cocoon classloader problem?
> 
> Maybe I can provide an extra classpath only to the Cocoon
> classloader??
> --
> Torsten
> 
Just a guess : could you try adding servlet.jar in a directory that's 
not in the standard servlet classpath (e.g. WEB-INF/morelibs) and add it 
in the "extra-classpath" servlet parameter (e.g. 
WEB-INF/morelibs/servlet.jar) ?
-- 
Sylvain Wallez
Anyware Technologies - http://www.anyware-tech.com


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

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




Re: XSP code reuse

2001-08-31 Thread Sylvain Wallez

Curious guy :)

Have a look at the Java code generated for any XSP, and you'll 
understand : this a local variable that is used by the XSP engine to 
produce the attributes of XML elements. Since we have here a separate 
method, this local variable is out of scope, and we must therefore 
declare a new one with the same name.

Mario Muja wrote:
> Hi Sylvain,
> thank you for this hint.
> 
> I do not understand, why the following line is necessary.
> 
> AttributesImpl xspAttr = new AttributesImpl();
> 
> Can you please explain this?
> 
> Regards, Mario
> 
> 
> Sylvain Wallez wrote:
> 
>> The capture taglib won't solve this problem, because the captured 
>> content can't be parameterized.
>>
>> To achieve this, you can put the reused part in a method defined in a 
>>  block child of . Below is an example, based on 
>> simple.xsp form the samples.
>>
>> >   language="java"
>>   xmlns:xsp="http://apache.org/xsp";
>>   xmlns:xsp-request="http://apache.org/xsp/request/2.0";
>>   xmlns:log="http://apache.org/xsp/log/2.0";
>>   xmlns:capture="http://apache.org/cocoon/capture/1.0";
>> >
>>
>> 
>> private void reusedPart(String param) throws SAXException {
>>AttributesImpl xspAttr = new AttributesImpl();
>>Hi there param ! I'm a simple dynamic 
>> page generated by XSP (eXtensible Server Pages).
>>
>>I was requested as the URI: > as="xml"/>
>>
>> }
>> 
>>   
>>   
>>   Processing the beginning of the page
>>
>>A Simple XSP Page
>>
>>
>>
>>
>>  These 2 paragraphs were generated at the start of the XSP, 
>> and captured for insertion at the end.
>>
>>  Brought to you by Cocoon2 at new 
>> Date().
>>
>>
>>reusedPart("first time");
>>
>>reusedPart("second time");
>>
>>The following list was dynamically generated:
>>
>> ..
>>
>> Hope this helps.
>>
>> Mario Muja wrote:
>>
>>> Hi Alexandru,
>>> reusing part of an XSP result is something I plan to achieve with the 
>>> new logicsheet CAPTURE.XSL. You will find it under
>>>
>>> src\org\apache\cocoon\component\language\markup\xsp\java
>>>
>>> in the source tree of the 2.0 and 2.1 branch. This logicsheet 
>>> contains markup to copy part of an XSP to an XMLFragment variable, 
>>> which can be later output using
>>>
>>> here put the name of the fragment variable.
>>>
>>> I never used this logicsheet but I think that it can do what you have 
>>> described. Please let us know about your experiences with this new 
>>> logicsheet.
>>>
>>> Hope this helps.
>>> Mario
>>>
>>>
>>> Alexandru COSTIN wrote:
>>>
>>>>Hello,
>>>>I have created succesfully some dynamic pages using cocoon, but
>>>> I have one question about code reusability.
>>>>The main problem is that in the XSP file, I have XML trees that
>>>> are very similar, except for a parameter.
>>>>
>>>>I will paste a code snippet below
>>>>
>>>> 
>>>>
>>>>
>>>>select * from v_inf where idtype_inf=6
>>>>
>>>>
>>>>
>>>>    
>>>> 
>>>> >>> column="id_inf"/>
>>>> >>>  column="name_itm"/>
>>>>
>>>> 
>>>> 
>>>>
>>>> 
>>>>
>>>>This part has to be repeated (with the same columns and
>>>> structure) with
>>>> idtype_inf=7,8, etc.
>>>>How can I do this without rewritting this code snippet x-times?
>>>> A standard include mecanism has to be possible in Cocoon, or this 
>>>> can be
>>>> done otherwise.
>>>>I think I have a solution, but I don't know if it's the best
>>>> one. This part can be embedded in a XSP:logic loop that uses an array
>>>> with the 6,7,8 values and pass the values to the embedded part.
>>>>   Alexandru
>>>>
>>>>
>>>
> 
> 
> 


-- 
Sylvain Wallez
Anyware Technologies - http://www.anyware-tech.com


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

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




Re: XSP code reuse

2001-08-31 Thread Sylvain Wallez

The capture taglib won't solve this problem, because the captured 
content can't be parameterized.

To achieve this, you can put the reused part in a method defined in a 
 block child of . Below is an example, based on 
simple.xsp form the samples.

http://apache.org/xsp";
   xmlns:xsp-request="http://apache.org/xsp/request/2.0";
   xmlns:log="http://apache.org/xsp/log/2.0";
   xmlns:capture="http://apache.org/cocoon/capture/1.0";
 >


private void reusedPart(String param) throws SAXException {
AttributesImpl xspAttr = new AttributesImpl();
Hi there param ! I'm a simple dynamic 
page generated by XSP (eXtensible Server Pages).

I was requested as the URI: 

}

   
   
   Processing the beginning of the page

A Simple XSP Page




  These 2 paragraphs were generated at the start of the XSP, 
and captured for insertion at the end.

  Brought to you by Cocoon2 at new 
Date().


reusedPart("first time");

reusedPart("second time");

The following list was dynamically generated:

...

Hope this helps.

Mario Muja wrote:
> Hi Alexandru,
> reusing part of an XSP result is something I plan to achieve with the 
> new logicsheet CAPTURE.XSL. You will find it under
> 
> src\org\apache\cocoon\component\language\markup\xsp\java
> 
> in the source tree of the 2.0 and 2.1 branch. This logicsheet contains 
> markup to copy part of an XSP to an XMLFragment variable, which can be 
> later output using
> 
> here put the name of the fragment variable.
> 
> I never used this logicsheet but I think that it can do what you have 
> described. Please let us know about your experiences with this new 
> logicsheet.
> 
> Hope this helps.
> Mario
> 
> 
> Alexandru COSTIN wrote:
> 
>>Hello,
>>I have created succesfully some dynamic pages using cocoon, but
>> I have one question about code reusability.
>>The main problem is that in the XSP file, I have XML trees that
>> are very similar, except for a parameter.
>>
>>I will paste a code snippet below
>>
>> 
>>
>>
>>select * from v_inf where idtype_inf=6
>>
>>
>>
>>
>> 
>> > column="id_inf"/>
>> >  column="name_itm"/>
>>
>> 
>> 
>>
>> 
>>
>>This part has to be repeated (with the same columns and
>> structure) with
>> idtype_inf=7,8, etc.
>>How can I do this without rewritting this code snippet x-times?
>> A standard include mecanism has to be possible in Cocoon, or this can be
>> done otherwise.
>>I think I have a solution, but I don't know if it's the best
>> one. This part can be embedded in a XSP:logic loop that uses an array
>> with the 6,7,8 values and pass the values to the embedded part.
>>   Alexandru
>>
>>
> 
-- 
Sylvain Wallez
Anyware Technologies - http://www.anyware-tech.com


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

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




Re: Does CAPTURE.XSL work with C2 Beta 2 ???

2001-08-30 Thread Sylvain Wallez

Mario Muja wrote:

> Hi,
> the latest developer snapshot contains a logicsheet called capture.xsl 
> that can be used to store a stream of SAX events to an XMLFragment 
> variable. I would like to use this to store the results of an ESQL 
> call to a static variable for later usage.
>
> Does this logicsheet work with C2 Beta 2? I ask this because I could 
> not find capture.xsl in the latest distribution. It is only contained 
> in the latest developer snapshot.
>
> Regards, Mario
>
The capture logicsheet is now in the 2.0 branch (up to now, it was only 
in 2.1). There's a use sample in webapp/docs/samples/xsp/simple.xsp

To use it with a 2.0b2 distrib, you can manually add it in the source 
tree as follows. Copy the files :
- org/apache/cocoon/components/sax/XMLByteStreamFragment.java
- org/apache/cocoon/components/language/markup/xsp/java/capture.xsl
- org/apache/cocoon/components/language/markup/xsp/java/logicsheet-util.xsl

Add the logicsheet declaration in cocoon.xconf and then rebuild.

Sylvain.

-- 
Sylvain Wallez
Anyware Technologies - http://www.anyware-tech.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]>




IMPORTANT : ThreadSafe removed from Action

2001-08-22 Thread Sylvain Wallez

Hi all,

According to the conclusions of the cocoon-dev thread "Why does Action 
implement ThreadSafe ?", ThreadSafe implementation has been removed from 
Action and added to all non abstract existing implementations.

This means that :

- you should update your existing actions so that they implement 
ThreadSafe to keep the previous behaviour (one instance serves all requests)

- you can now choose the lifestyle of your actions depending on their 
implementation : ThreadSafe, Poolable, etc.

Sylvain.
-- 
Sylvain Wallez
Anyware Technologies - http://www.anyware-tech.com


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

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




Re: Quotes in query

2001-08-07 Thread Sylvain Wallez



Sébastien Lefebvre wrote:
> 
> Sylvain ,
> 
> Thank you  for your prompt answer.
> As far as I'm new to Cocoon, could you send me a piece of code ?
> It will help me very much.
> 
> Thanks again
> 
> Sébastien
> 
> >
> >Sébastien Lefebvre wrote:
> >
> >>Hi all,
> >>
> >>I have a form where I can type text.
> >>The form is submited  with post method to a xsp page.
> >>This texte can of course have quotes in it. ex:  I'd like this to work
> >>How to insert it in MySQL ?
> >>Do I have to write XSP logic in order to replace ' by \'?
> >>Or is there any other solution ?
> >>(I'd like to make the operation server side so javascript's regexp is
> >>not an issue for me).
> >>
> >>Thanks in advance
> >>Sébastien
> >>
> >Use a PreparedStatement to insert your String, the JDBC driver will take
> >care of this if needed. This will also increase the portability of your
> >code, since escaping syntax varies between databases.
> >
> 
If you're using JDBC calls, you should have a look at the dedicated
section of the excellent Java tutorial at
http://java.sun.com/docs/books/tutorial/jdbc/basics/prepared.html
It is explained here certainly better than I could do !

If you're using the esql logicsheet, I cannot be of great help since I
don't use it, but Christian told that  generates
prepared statements.
-- 
Sylvain Wallez
Anyware Technologies - http://www.anyware-tech.com

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

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




Re: Capturing generated XML in Action

2001-08-07 Thread Sylvain Wallez



Amal Sirvisetti wrote:
> 
> Hi,
> 
> Is it possible to capture the XML generated by an XSP page in an Action?
> For example,
> 
> a.xsp (generates XML) -> SaveXMLAction (saves that XML in a file)
> 
> Thanks,
> Amal
> 
I've written such an action, wich captures the output of an XSP or parts
of it an stores it in request attributes as XMLFragment instances.

However, there is some discussion going on on cocoon-dev on the way it
is written. So stay tuned, it will certainly be available soon in the
Coocoon 2.1 branch.
-- 
Sylvain Wallez
Anyware Technologies - http://www.anyware-tech.com

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

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




Re: Quotes in query

2001-08-06 Thread Sylvain Wallez



Sébastien Lefebvre wrote:
> 
> Hi all,
> 
> I have a form where I can type text.
> The form is submited  with post method to a xsp page.
> This texte can of course have quotes in it. ex:  I'd like this to work
> How to insert it in MySQL ?
> Do I have to write XSP logic in order to replace ' by \'?
> Or is there any other solution ?
> (I'd like to make the operation server side so javascript's regexp is
> not an issue for me).
> 
> Thanks in advance
> Sébastien
> 
Use a PreparedStatement to insert your String, the JDBC driver will take
care of this if needed. This will also increase the portability of your
code, since escaping syntax varies between databases.
-- 
Sylvain Wallez
Anyware Technologies - http://www.anyware-tech.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]>




[C1] new SVG formatter

2001-07-27 Thread Sylvain Wallez

Hi all,

For a "legacy" project using Cocoon 1, I needed to produce jpeg images
from SVG. So I added a new formatter using Batik as the rendering
engine, adapted from Cocoon2's SVG serializer.

It's in the CVS along with the new "batik-libs.jar" and "dom2.jar"
libraries that are required for it to work. The javadoc
(org.apache.cocoon.formatter.SVGFormatter) contains the instructions to
add it to your environment.

Enjoy :)
-- 
Sylvain Wallez
Anyware Technologies - http://www.anyware-tech.com

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

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




Re: Doubt in aplying stylesheet using Cocoon's xslt processor.

2001-07-19 Thread Sylvain Wallez



Hema Rajan a écrit :
> 
> Hi there!
> 
> We have to match an element which is in 4 or 5 th level from the current
> level.  Is there anyway to find out this element without giving the
> absolute/relative path in the xsl?
> 
> For example, our XML file is as follows:
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> In our stylesheet we have the following template:
> 
> 
> 
> 
> 
> 
> 
> 
>  value="$({@item})"/>
> 
> 
> 
> 
> 
> 
> The above template works fine only if the  element is directly below
> the  tag.  It will not work if the  element is 2 or 3
> levels below the  tag.  We tried replacing the
> "" line with
> "".  Even this did not work.  Any
> suggestions?
> 
> regards,
> Hema.
> 

Just look at your XML file : it's not "input" but "cms:input" !
-- 
Sylvain Wallez
Anyware Technologies - http://www.anyware-tech.com

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

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




Re: Getting the length of a String in px?

2001-07-18 Thread Sylvain Wallez



Kiril Sramko a écrit :
> 
> Hi, I just started with SVG, cocoon and batik.
> 
> I can't find a solution in the docs for the problem I've got to solve. I need
> to know the length of a string I'm getting from a XML-file in px for the
> width of the generated JPG. Im formating this string with different
> CSS-styles, so I have to account the style.
> 
> Is there a way to generate just the graphic of the string with  a CSS-file in
> the buffer an the detect the width of the graphic?
> 
> Thanks in advance
> 
> Kiril Sramko
> 

You can know the width of a  element after it has been rendered
with the getComputedTextLength() method. I used this on the client side
with Adobe's SVG viewer, but I don't know if Batik supports it.

You should try asking on the Batik list since it's more related to SVG
than to Cocoon...
-- 
Sylvain Wallez
Anyware Technologies - http://www.anyware-tech.com

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

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




Re: same name attributes in one tag

2001-07-17 Thread Sylvain Wallez



Tetsu Ito a écrit :
> 
>  Hi everyone.
> 
>  I am stuck on XML -> HTML transforming. I want to transform this
> 
>   jsky1.png
>   jsky2.png
>   jsky3.png
> 
> 
> to
> 
> 
> The FAQ reads "disable-output-escaping is not implemented. but ther is
> other ways".
> 
> Is there any ways to transform above without "disable-output-escaping" ?
> If so please tell me. If not so...
> 
It's not a problem about output escaping, but about XML syntax : the
names of the attributes on an element must be unique !
-- 
Sylvain Wallez
Anyware Technologies - http://www.anyware-tech.com

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

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




Re: Sylvain: was ... RE: broken build?

2001-06-19 Thread Sylvain Wallez



Paul Nock a écrit :
> 
> Hmmm...
> Is your patch correct?
> 
> I see it's changed to...
> 
> private boolean isValidName (String name) {
> if (name != null) {
> return false;
> }
> .
> 
> I found my stylesheets no longer had s working properly with the
> 20010618104654 C1 build.  Looking at the code, this would seem to be the
> correct check:
> private boolean isValidName (String name) {
> if (name == null) {
> return false;
> }
> .
> 
> With the second version, my stylesheets seem to work OK again.
> 
> Paul
You're totally right. That was a typo from me :(
It's corrected in CVS the right way now.

Thanks and sorry for the incovenience.
-- 
Sylvain Wallez
Anyware Technologies - http://www.anyware-tech.com

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

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




Re: XMLFragment and toSAX in C2

2001-06-18 Thread Sylvain Wallez



Amal Sirvisetti a écrit :
> 
> Hi,
> 
> I have implemented an XMLFragment class based on the AbstractXMLFragment
> in C2 (dev-2.1). Within the toSAX() method I call another Java class
> that returns me an XML string. I want to insert this string into the XSP
> page. However, when I call the hander.characters(...) method, the < and
> > signs are getting converted to < and > respectively and the XML
> document strcuture is not preserved. Is there an easy way to handle
> this? Or, do I need to parse the incoming string and prepare the XML
> again using the startElement and endElement methods?
> 
> Please advise.
> 
> Thanks,
> Amal
> Sirvisetti Systems
> 
The characters() method in ContentHandler is used to output...
characters. That's why "<" and ">" are escaped to < and >

To achieve the desired behaviour, you need to pass your XML-in-a-String
through a parser that outputs SAX events into the ContentHandler
parameter of toSAX().

-- 
Sylvain Wallez
Anyware Technologies - http://www.anyware-tech.com

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

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




Re: SV: Maintaining Cocoon-layout in WYSIWYG-HTML-editor

2001-06-13 Thread Sylvain Wallez



Bjarne Jensen a écrit :
> 
> You wrote:
> >“In your example, static example data is replaced by dynamic markup,
> >which is precisely what we wanted to avoid. The augmented html rather
> >looks like this (the datamodel namespace identifies markup related to
> >the application data model).
> 
>   
> Paul
>  select="Phone">3"
>   
> 
> >Put this in a web browser, and it will be rendered correctly with
> >example data, even if it's in fact a dynamic page !”
> 
> I have tried this in my IE 5.5 it looks like a normal table. So IE5.5 does
> not care about the extra attributes in the  :-) Netscape 4.7 does not
> show anything :-( so to use this approach the designers has to use IE5.5 (or
> similar). My question is: how do you put the extra attributes in
> Dreamweaver? (I have version 3). Are the designer typing them manually – or
> are you using a Javascript or? How does it look like? How do I configure my
> Dreamweaver?
> 
We've customized it with JavaScript. Some new menus are added to insert
these annotations. We've also added icons so that additional markup is
visible in edition mode. You can find docs about this in the "Extending
DreamWeaver" section of help.

> The text “Paul” and “3” is deleted when the pages is generated right
> dynamically, right?
> 
Yep. And replaced with real data.

> “for-each=”Person”” is in my opinion programming and not layout (XSLT is a
> real programming-language Turin-complete and so on, it’s not just layout).
> So haven’t you mixed programming and layout in your example? That was why I
> wrote  in stead of .
> 
This is not XSL, even if we've borrowed some of its syntax. The
primitives are dedicated to data insertion (including iteration on
data). There are also many other features but I will not detail them
here.

> In the Article (Style-free XSLT) the XSLT is split in two different files
> but the layout gets calculated run-time. Is this the same with your
> appliaction?
> 
We're targetting mainly intranet webapps (not web sites or portals) and
this approach covers most of the needs, even if advanced features of our
products allow to use several XSL for different parts of the page.

> You also wrote:
> > What is an XML persistence engine?
> >
> A component that allows XML data to be read/write/queried in any target
> persitence mechanism for which we have written an implementation (files,
> SQL db, LDAP directories, etc). The application doesn't have to know
> _how_ data is stored.
> 
> Is this component made by you or another vendor? This is some kind of
> interface-program-logic between the data-model and the transforming logic
> that guarantees the data doesn’t get mixed up, right?. ….On top of the
> transforming logic there is some layout.
> 
We did this component. It allows the application to access data as XML
conforming to an application data model whatever the underlying storage
system is.

> Thanks you very much again :-)
> /Bjarne
> 

-- 
Sylvain Wallez
Anyware Technologies - http://www.anyware-tech.com

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

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




Re: Maintaining Cocoon-layout in WYSIWYG-HTML-editor

2001-06-13 Thread Sylvain Wallez



Bjarne Jensen a écrit :
> 
> Is this correctly understood?
> 
> --
> Dreamweaver creates HTML like this:
> 
> 
> 
> 
> 
> And your XSLT render this to something like:
> 
> 
> Paul
> Ann3332
> …
> ..
> 
> 
> How do you do that? Gets the parents and so I XSLT?
> 
In your example, static example data is replaced by dynamic markup,
which is precisely what we wanted to avoid. The augmented html rather
looks like this (the datamodel namespace identifies markup related to
the application data model).

  
Paul
3"
  

Put this in a web browser, and it will be rendered correctly with
example data, even if it's in fact a dynamic page !
> -
> 
> You wrote:
> 
> ”..but this changes with C2) which calls application logic Java
> code either directly through  or using specialized
> logicsheets. “
> 
> C1 calls application logic in Java directly doesn’t it?
> It is possible to have your own logicsheets in C1 so I really does not
> understand the difference here?
> 
No actual difference since a logicsheet always finally gets translated
to Java code. We use logicsheets for commonly used features while
 is used in non-reusable specific needs.

> I know the sitemap can centralize Processing Instructions (PI) in C2 and
> that is not possible in C1 and that can give a better separation. But that
> has nothing to do with what your are writing.
> 
Well, it has in a certain way : in C1, the fact that an XSP decides
(through PI's) how it is to be rendered is mixing of concerns. With C2's
sitemap, you can use a single XSP file to produce content that gets
rendered differently (html, wml, pdf, excel, svg, etc) depending on the
sitemap-defined context.

> -
> 
> You also wrote:
> “We also have an XML persistence engine that hides
> SQL/LDAP/files/Whatever for data access.”
> 
> What is an XML persistence engine?
> 
A component that allows XML data to be read/write/queried in any target
persitence mechanism for which we have written an implementation (files,
SQL db, LDAP directories, etc). The application doesn't have to know
_how_ data is stored.

> Hides the filename in the URL, or?
> 
> Well please tell more about this
> 
> PS: I really like hearing how you made the separation. The reason why I am
> so interested in the separation is that I am writing the last paper in my
> education and the subject is separation between layers in webapplications. 3
> years ago I worked in a webfirm that mixed the layers and that was a big
> problem then. I think the problem still remains in a lot of companyes you
> are the only one I have ever head about that seems to have accomplished
> this. I agree (se below) to you why the layers should be separate. Another
> reason for having the layers separate is that you can substitute one or two
> layers and you have a new application that should suits a new customer. Are
> you doing that?
> 
Yep, separation is a big win in that domain. Some real-life examples :
- during the development of a project, the customer (which was providing
the database structure) decided to switch from SQLServer to Oracle and
change the database model to correct some design flaws of the initial DB
(information redundancy, unnecessary join tables and the like). Since we
had designed a datamodel according to the application needs and not as a
copy of the DB structure, switching to the new DB structure was just a
matter of rewriting the datamodel/SQL mapping (a few days), without
touching a single line in application code and presentation.

- we've built some generic applications in the area of human resources
and project management. Just as in the previous example, these are built
according an application data model, and not a DB model. Adapting the
application to the customer environment is just a matter of persistance
configuration (fetch user information from LDAP/Files/SQL tables/...,
store data in Oracle/Informix/Access/...) and graphic layout to adapt to
the customer's graphic standard. No application change.

> Thank you ones again :-)
> /Bjarne
> 

-- 
Sylvain Wallez
Anyware Technologies - http://www.anyware-tech.com

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

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




Re: SV: Maintaining Cocoon-layout in WYSIWYG-HTML-editor

2001-06-13 Thread Sylvain Wallez



Bjarne Jensen a écrit :
> 
> Well that sounds really interesting – congratulations :-) So by maintaining
> the website like this you have a separation between layout and content. What
> about seperation between content and program-logic – have you also
> accomplished this? Are there any need for that?
> 
Content is generated by XSPs (which was the main way of doing it with
Cocoon1, but this changes with C2) which calls application logic Java
code either directly through  or using specialized
logicsheets. We also have an XML persistence engine that hides
SQL/LDAP/files/Whatever for data access. This leads to true
presentation/logic/persistence separation.

> And then another question. What if you compute a table (so that you don't
> know how long it would be) – is this also maintained in Dreamweaver or do
> you have the HTML that makes the TABLE inside the XSLT in that situation? I
> can’t figure out how to maintain a table like this in Dreamweaver only in
> XSLT.
> 
Among our specialized tags, some are structure-oriented. The designer
just has to mark the table with the data collection he wants to display,
and this generates an  in the resulting XSL, adding rows as
necessary and feeding cells with live data (this works not only with
tables, but with any repetivite structure : lists, paragraphs, popups,
etc).

The main ideas behind all this are :
- web pages, even if dynamic, should be editable by a web designer (with
no programming skills)
- turning a static page into a dynamic one shouldn't be destructive : in
JSP/ASP/PHP, data access code replaces example data that the designer
has put in the page during the design. With our approach, markup
identifying the data surrounds (tags) or marks (attributes) the static
example data.

The benefits are that you can always show your dynamic pages as static
ones (just send a bunch of HTML files to your customer to show him what
his app looks like) and that a web designer can update the pages with
his favorite tool even if they're dynamic (easy maintenance).

> Thank you very much for your comment :-)
>
WYSIWYG editing is IMO the main feature that's missing for XML/XSL to
spread the whole web industry. That's what we're trying to do.

> /Bjarne
> 

-- 
Sylvain Wallez
Anyware Technologies - http://www.anyware-tech.com

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

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




Re: Maintaining Cocoon-layout in WYSIWYG-HTML-editor

2001-06-13 Thread Sylvain Wallez



Bjarne Jensen a écrit :
> 
> I have read the article “Style-free XSLT Style Sheets”
> (http://www.xml.com/pub/a/2000/07/26/xslt/xsltstyle.html) by Eric van der
> Vlist and this is IMHO a really great article that told me how to splits the
> XHTML and XSLT in to different layout-files. Does anyone think it would work
> in real life, if the XHTML was maintained by a WYSIWYG editor like
> dreamweaver with support for XHTML - anybody know such an editor? (if not
> you can use Dreamweaver and Tidy). The XSLT-part of the layout would be
> maintained by a programmer or a trained graphical designer. Anyone tried
> this in real life – I would really like to hear some opinions? My own
> opinion is that I think this would work because the HTML would be made as
> useual and the process of applying the new HTML to the
> Cocoon-web-application could be done automatically without involving the
> programmer - does anyone disagree or agree?
> 
> Thanks for any comments
> /Bjarne
> 
We use a similar approach here : a regular HTML page built with a
WYSIWYG editor is augmented with specialized markup that identifies
variable parts of the page. This page is then "compiled" in an XSL that
merges presentation and data to produce dynamic pages.

To avoid HTML source code edition for adding our specialized markup, we
have extended DreamWeaver (it's easily customizable in JavaScript) so
that the web designer can do it all in WYSIWYG mode.

About Tidy, we had some problems with it because it doesn't like
non-HTML markup. So we derived the AElfred parser that's in SAXON
(originally written by David Megginson, author of SAX) so that it
accepts HTML (auto-closing tags, value-less attributes, etc) and our
markup.

And thus we obtain a true separation between presentation and logic, and
a kind of WYSIWYG XSL editor with DreamWeaver !
-- 
Sylvain Wallez
Anyware Technologies - http://www.anyware-tech.com

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

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




Re: [C1] Posting parameters to a servlet

2001-06-12 Thread Sylvain Wallez



Xavier MACHENAUD a écrit :
> 
> Using C1, I can call a servlet passing parameters with an HTTP GET using
> the following code :
> 
>   
> 
>   
> "http:///?" +
> "techno=" + request.getParameter("techno") + "&" +
> "volt="   + request.getParameter("volt")   + "&" +
> "arch="   + request.getParameter("arch")   + "&" +
> "words="  + request.getParameter("words")  + "&" +
> "bits="   + request.getParameter("bits")   + "&"
>   
> 
>   
> 
> I can then transform the returned XML data to present it to the user.
> 
> But how can I do the same thing but passing parameters with an HTTP
> POST?
> I need this to be able to send a file to a servlet.
> 
> Thanks.
> 
> Xavier
> 
The answer is unfortunately simple : you can't POST using
 !
You'll have to write code that does the POST using a
java.net.HttpURLConnection and parse its result for inclusion into the
document.
-- 
Sylvain Wallez
Anyware Technologies - http://www.anyware-tech.com

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

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




Re: broken build?

2001-06-11 Thread Sylvain Wallez



Dan J Fraser a écrit :
> 
> None of the dev snapshots want to build.
> 
> I want a cocoon with xinclude that works, but also with caching that works.
> So, 1.8 release is out, and 1.8.2 release is out.  I'm trying to build a
> 1.8.3-dev, but I get this:
> 
> [javac]
> /usr/local/xml-cocoon/build/src/org/apache/cocoon/processor/xslt/XSLTP
> rocessor.java:163: Incompatible type for !. Can't convert java.lang.String
> to boolean.
> [javac] if (!name) {
> [javac] ^
> 
> Perhaps I'm doing something wrong?  I've tried all the snapshots in the
> snapshots directory.  Same error on each.
> 
> --
> Dan J. Fraser <[EMAIL PROTECTED]>
> PGP: 0xF3972A01 (17 B7 24 90 27 05 B8 92  4F 7F 61 18 B9 D1 17 CE)
> "I haven't lost my mind, it's backed up on tape somewhere."
> 

This was a typo. I patched the Cocoon 1 CVS which should now be OK.

-- 
Sylvain Wallez
Anyware Technologies - http://www.anyware-tech.com

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

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




Re: [C2] : not really OK !!

2001-06-11 Thread Sylvain Wallez

(forwarding to the list, I didn't noticed the reply-to header)

 Original Message 
Objet: Re: [C2] :  not really OK !!
Date: Mon, 11 Jun 2001 16:42:57 +0200
De: Sylvain Wallez <[EMAIL PROTECTED]>
Société: Anyware Technologies
A: [EMAIL PROTECTED]
Références: <[EMAIL PROTECTED]>



Samuel ARNOD-PRIN a écrit :
> 
> It is maybe not a bug... but xsp:attribute are difficult to handle using
> C2...
> 
> for example :
> 
> 
> String text="here is my value";
>  name="myattribute">text
> 
> 
> is ... WRONG !
> 

The change from DOM (C1) to SAX (C2) has put additional constraints on
 :
- in DOM, attributes are added on an element _after_ the element is
created, and so intermixed  and  inside the
element are evaluated in document order.
- in SAX, attributes must be known _before_ the beginning of the
element, because they are parameters of startElement(). So the C2 XSP
engine evaluates all xsp:attributes prior to starting the element, and
evaluates its content after, including  tags.

So your example should be written

  String text="here is my value";
  
text
  


-- 
Sylvain Wallez
Anyware Technologies - http://www.anyware-tech.com

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

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




Re: How to substring text from XML content ?

2001-06-11 Thread Sylvain Wallez



[EMAIL PROTECTED] a écrit :
> 
> hi,
> 
>   I am developing a system that generate xml from msword file, and than translate 
>the xml with
> xsl by using xalan. The msword content is something like this :
> 
> ** ms word example *
> Overview
> 
> Try to do it better
> 
> ...
> **
> 
> so, when the doc be converted to xml, it will like this :
> 
> Overview
> Try to do it better
> ..
> ..
> 
> then, i need to write a xsl to translate with that xml and generate html...
> but the problem is i need to format the title "Overview" make it have a better look 
>and feel,
> where the first char must be biger that other char... the html code is like  size="3">Overview. But how to make it posible when i 
>use xsl ?
> the command  select="p"/> will get the whole "Overview" word... so how to 
>substring
> it so that i can display it which the font size i need ???
> 
> Thank.
> 
> >From Kok Choon.
> 
This is an XSL question you should better ask on the XSL mailing list at
http://www.mulberrytech.com/xsl/xsl-list/

Anyway, XSL provides a number string manipulation primitives such as
substring that can answer your need. See
http://www.w3.org/TR/xpath#section-String-Functions for a detailed list.

-- 
Sylvain Wallez
Anyware Technologies - http://www.anyware-tech.com

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

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




Re: and <

2001-06-08 Thread Sylvain Wallez



Jason Foster a écrit :
> 
> Yet another output escaping question (but I have read a bunch of
> documentation)...
> 
> I'm trying to figure out a way for an Action to pass information to an XSP
> or XSLT page.  My current plan is to use session attributes.
> 
> Action
> 
>   session.setAttribute( "result", "Saved!" );
> 
> XSP
> 
> 
>   resultString = (String) ;
>   if ( resultString != null )
>   {
> 
>   
> 
> 
>   }
> 
> 
> This is working reasonably well, except for the one problem that what
> comes out is (slightly edited):
> 
> 
>   
>  <RESULT...RESULT>
>   
> 
> 
> Which of course isn't useful to me for later processing.
> 
> Does anyone know how to keep the output from being escaped?
> 
> Thanks!
> 
> Jason Foster
> 
Just a thought : you could place a DOM element or an object implementing
XMLFragment in the request and insert it in the XSP with a 

-- 
Sylvain Wallez
Anyware Technologies - http://www.anyware-tech.com

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

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




Re: Cocoon, XML and SVG !

2001-06-07 Thread Sylvain Wallez



benjamin pignier a écrit :
> 
> Hi !
> 
> I am using Cocoon 1.8.2, SVG Viewer 2.0 Beta and IE
> 5.5
> 
> I'm working on a project running with Cocoon, SVG and
> XML.
> In fact, I'm trying to create an SVG file with an XML
> and an XSL.
> The XML file contains all the informations I need to
> display inside.
> The XSL file succeed in transforming this file into
> SVG, reproducing correctly the information initially
> inside the XML file.
> 
> The problem is that Cocoon adds this heading on each
> new page containing SVG code :
>  "http://www.w3.org/TR/REC-html40/strict.dtd";>
> instead of just  which is what we
> need to make our svg works correctly
> 
> Moreover, we tried and call the svg plugin thanks to
> the "" tag but this did not work
> 
> Please run these files in your browser with Cocoon and
> look :
> Thank you for your help !
> Benjamin
> ___
> File1 : xmltest.xml
> ___
> 
> 
>  
> 
> 
> ]>
> 
> 
> 
> 
> 
> Bonjour le monde
> Hahahahaha !!!
> 
> 
> ___
> File2 : xmltest.xsl
> ___
> 
> 
>  xmlns:xsl="http://www.w3.org/1999/XSL/Transform";>
>  
>doctype-system="http://www.w3.org/TR/2000/03/WD-SVG-2303/DTD/svg-2303-stylable.dtd"/>
> 
> 
> 
>  style="fill:lightgreen"/>
>  
>style="text-anchor:middle;font-size:24;font-family:Arial;font-weight:normal;font-style:normal;fill:red"> select="texte"/>
>  
>style="text-anchor:middle;font-size:20;font-family:Arial;font-weight:normal;font-style:normal;fill:red"> select="rire"/>
> 
> 
> 
> 
> Bye !
> Benjamin
> 

xsl:output is ignored by Cocoon1 : it's the role of the Formatter, and
the default formatter outputs HTML.
Try adding  in xmltest.xml to force xml
output.

BTW, Adobe's SVG view is no more in beta, and I suggest you to consider
Cocoon2. I use it a lot for serving dynamic SVG.
-- 
Sylvain Wallez
Anyware Technologies - http://www.anyware-tech.com

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

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




Re: [C2] Problems with Sample Forms

2001-06-07 Thread Sylvain Wallez



Peter Hargreaves a écrit :
> 
> I'm using Windows NT4.0, Jdk1.3.1, Tomcat3.2.1, and C2.0b2.
> 
> Most of the Examples seem to work fine including the various database
> examples under Sample Forms. However, if I stop tomcat and restart, the
> database examples no longer work!
> 
> To update my installation I deleted my
> 'j:\jakarta-tomcat-3.2.1\webapps\cocoon' directory, removed
> the old cocoon.war file, and deleted my 'j:\jakarta-tomcat-3.2.1\work'
> directory, then did the following build:
> 
> call build.bat -Dinstall.war=j:\jakarta-tomcat-3.2.1\webapps
> -Dinclude.webapp.libs=yes clean install
> 
> The only work round I have at the moment is to delete my
> 'j:\jakarta-tomcat-3.2.1\webapps\cocoon'  directory so that it is
> reinstalled from the cocoon.war file when I restart.
> 
> If I look in cocoon.log two relevant messages seem to be:
> 
> DEBUG   22893   [cocoon  ] (Thread-26):
> org.apache.avalon.excalibur.datasource.JdbcConnection: could not be
> instantiated.
> java.sql.SQLException: File input/output error:
> j:\jakarta-tomcat-3.2.1\webapps/cocoon/WEB-INF/db/cocoondb.backup
> 
> and
> 
> DEBUG   25907   [cocoon  ] (Thread-26):
> org.apache.avalon.excalibur.datasource.JdbcConnection: could not be
> instantiated.
> java.sql.SQLException: The database is already in use by another process
> 
> Have I done something wrong or is this a bug? I've had the problem for
> quite a while now (under previous downloads), has anybody else suffered
> this? Any help or comment would be appreciated.
> 
> Many thanks,
> Peter.
> 

Hsql - the database used by C2 samples - is a single-process engine that
locks the database by setting the "modified" entry in
"WEB-INF/db/cocoondb.properties" to the value "yes" while some JDBC
connections exist. 

With connection pooling, there's always some connections opened, and
the're not closed properly when you stop Tomcat, so the database stays
in locked state and connections are refused at the next Tomcat startup.

For now, Cocoon has no way to know that the server is terminated (we
should implement the servlet destroy() method), but a workaround is to
manually change "modified" to "no" after stopping the server.

Hope this helps.
-- 
Sylvain Wallez
Anyware Technologies - http://www.anyware-tech.com

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

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




Re: Cocoon 1.8.2 + SAXON: Failed to Compile Stylesheet ERROR

2001-06-06 Thread Sylvain Wallez



William Bagby a écrit :
> 
> I am using Cocoon 1.8.2 on Weblogic 5.1, and I decided to switch from Xalan
> to Saxon to get a performance boost.  The installation went (relatively)
> smoothly, but now I'm getting the following error when I attempt to view one
> of my pages:
> 
>   javax.xml.transform.TransformerConfigurationException: Failed to
> compile stylesheet. 1 error detected.
>   at java.lang.Throwable.fillInStackTrace(Native Method)
>   at java.lang.Throwable.fillInStackTrace(Compiled Code)
>   at java.lang.Throwable.(Compiled Code)
>   at java.lang.Exception.(Compiled Code)
>   at
> javax.xml.transform.TransformerException.(TransformerException.java:12
> 9)
>   at
> javax.xml.transform.TransformerConfigurationException.(TransformerConf
> igurationException.java:41)
>   at
> com.icl.saxon.PreparedStyleSheet.prepare(PreparedStyleSheet.java:119)
>   at
> com.icl.saxon.TransformerFactoryImpl.newTemplates(TransformerFactoryImpl.jav
> a:119)
>   at
> org.apache.cocoon.transformer.SAXONTransformer.getTransformer(SAXONTransform
> er.java:309)
>   at
> org.apache.cocoon.transformer.SAXONTransformer.transform(Compiled Code)
>   at
> org.apache.cocoon.processor.xslt.XSLTProcessor.process(XSLTProcessor.java:11
> 6)
>   at org.apache.cocoon.Engine.handle(Compiled Code)
>   at org.apache.cocoon.Cocoon.service(Cocoon.java:183)
>   at
> javax.servlet.http.HttpServlet.service(HttpServlet.java:865)
> 
> etc., etc...
> 
> My next move is going through my XSL bit by bit to find this supposed error,
> but I'm hoping that maybe someone has encountered this error message.
> 
> I tried the same XSL with Instant Saxon in XMLSpy and it worked fine. In
> addition, there are other pages that I'm able to view  with Cocoon + Saxon.
> The above page worked with Cocoon + Xalan, even if it was slow as molasses
> in winter.
> 
> Forgive me if this is off-topic, but it is at least Cocoon-related.  Maybe I
> should post this to the XSL list?
> 
> William Bagby.
> 
Does your stylesheet use Xalan-specific features that aren't handled by
Saxon ? Along with this error, Saxon writes some more meaningful
messages in (I guess) System.err which gets printed in my Tomcat
console. You should check weblogic logs or console for this message.
-- 
Sylvain Wallez
Anyware Technologies - http://www.anyware-tech.com

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

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




Re: Saxon "extra stuff" problem, and comment from Michael Kay

2001-06-06 Thread Sylvain Wallez



Sylvain Wallez a écrit :
> 
> Steven Punte a écrit :
> >
> > I send this question to Michael Kay, author of Saxon,
> > and received the reply below.  He seems to indicated
> > that this is configurable, but I'm not sure of how
> > to adjust cocoon to eliminate this extra information.
> >
> > Can anyone suggest how to achieve such a "configuration"
> > to Saxon?
> >
> >Steve Punte
> >

> 
> Saxon is not in cause in this problem (or maybe only for the xmlns:xml
> declaration) and is compliant with the XSLT spec, while Xalan has some
> bugs with the namespace:: axis and the XSP engine "relies" on this bug.
> 
> I patched the XSP engine for Cocoon 2 to avoid all these extraneous
> declarations, and obviously Cocoon 1 users need this patch also. I'll
> try to do it ASAP (I'm really busy these days, so don't expect it before
> tomorrow) and will notify you when it's done.
> 

Done : I updated org/apache/cocoon/processor/xsp/xsp-java.xsl
Namespaces are now generated only once in XSPs compiled whith Saxon.

Cheers
-- 
Sylvain Wallez
Anyware Technologies - http://www.anyware-tech.com

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

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




Re: its urgent

2001-06-06 Thread Sylvain Wallez



Ramesh Vejendla a écrit :
> 
> HI ALL
>  here i'm able to connect to database and its displaying values also
> but . i want to develop login screen kind of thing, i'm facing so many
> syntax errors  . so i need "Material on XSP and ESQL" plz..it will help me
> alot.
> or some example programs ..if possible
> its very urgent..plz
> 
> Thanks Ramesh
> 
> -Original Message-
> From: Donald Ball [mailto:[EMAIL PROTECTED]]
> Sent: Sunday, May 20, 2001 2:58 AM
> To: [EMAIL PROTECTED]
> Subject: Re: esql result *
> 
> On Sat, 19 May 2001, Oskar Werewka wrote:
> 
> > How to tell esql taglibrary that I want
> > all columns from the query result set,
> > with the same name?
> >
> > I have this:
> >
> >
> >  oracle.jdbc.driver.OracleDriver
> >   ...
> >  
> >select * from helpdesk_labels
> >
> >  
> >.. column definitions ...
> >  
> >
> >  
> >
> >
> > But i do not want to declare each column,
> > I want a default - as it was with sql processor.
> 
> 
> 
> - donald
> 

Why don't you take the minimum time required to read the docs and the
samples included in Cocoon ?...
-- 
Sylvain Wallez
Anyware Technologies - http://www.anyware-tech.com

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

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




Re: Saxon "extra stuff" problem, and comment from Michael Kay

2001-06-05 Thread Sylvain Wallez



Steven Punte a écrit :
> 
> I send this question to Michael Kay, author of Saxon,
> and received the reply below.  He seems to indicated
> that this is configurable, but I'm not sure of how
> to adjust cocoon to eliminate this extra information.
> 
> Can anyone suggest how to achieve such a "configuration"
> to Saxon?
> 
>Steve Punte
> 
> -
> >From Michael Kay:
> 
> Please send me an example of a stylesheet that exhibits this behavior.
> 
> The XML namespace should never be output.
> 
> The XSP namespace should be output only when the XSLT rules require, and
> these rules are the same as in Xalan. Depending where it comes from, you may
> be able to suppress it using exclude-result-prefixes.
> 
> Mike Kay
> 
> > -Original Message-
> > From: Steve Punte [mailto:[EMAIL PROTECTED]]
> > Sent: 22 May 2001 19:25
> > To: [EMAIL PROTECTED]
> > Subject: Can emission of namespace attributes be suppressed on Saxon?
> >
> >
> > Dear Michael:
> >
> >   Saxon is great.
> >
> >   I'm using it with the Cocoon framework instead of Xalan
> >   because it is much higher performance.
> >
> >   However, a difference I see is that name space attribute
> >   information is attached to all nodes.
> >
> > XALAN:
> >   
> >   
> >   
> >
> >
> > SAXON:
> >> xmlns:xml="http://www.w3.org/XML/1998/namespace";
> > xmlns:xsp="http://www.apache.org/1999/XSP/Core"; >
> >   
> >   
> >
> >
> >   While technically more correct, this is causing A LOT of
> >   extra information to be inserted into the synthesized
> >   java file (i.e. XSP technology), and thus the 64KByte
> >   java method function JVM limitation is approached.
> >
> >   Is there anyway to suppress this behavior?
> >
> >   Thanks in advance:
> >
> >   Steve Punte
> 
> On Sat, 2 Jun 2001 14:43:44 +0200 , [EMAIL PROTECTED] wrote:
> 
> >  Yes ... we also have this problem in our XSP pages - it adds source code
> to
> >  generated .java pages to include namespace declaration attributes in
> every
> >  element we produce using XSP.
> >
> >  Our configuration is:
> >
> >  Cocoon 1.8.3, Saxon 6.2.2.
> >
> >  Does anybody other have these problems with SAXON as XSLT transformer ?
> >  Have anyone found the solution for this problem ?
> >
> >  Thanks
> >
> >  Peter
> >
> >  > -Original Message-
> >  > From: Steven Punte [mailto:[EMAIL PROTECTED]]
> >  > Sent: Monday, May 21, 2001 9:02 PM
> >  > To: [EMAIL PROTECTED]
> >  > Subject: HELP: Too many namespace attributes with Saxon
> >  >
> >  >
> >  > When using Saxon, each and every node is specified with
> >  > detailed namespace information.  For example:
> >  >
> >  > Xalan:
> >  >
> >  >   
> >  >  
> >  >   
> >  >
> >  >
> >  > Saxon:
> >  >
> >  >>  > xmlns:xml http://www.w3.org/XML/1998/namespace
> >  > xmlns:xsp http://www.apache.org/1999/XSP/Core >
> >  >   
> >  >   
> >  >
> >  >
> >  > While this is perhaps "more correct", it quickly
> >  > and needlessly pushes me over the 64K byte JVM
> >  > limitation.
> >  >
> >  > Does anyone know a way of suppressing this behavior?
> >  >
> >  > Thanks:
> >  >
> >  >Steve Punte
> >  >
> >  >
> >  >
> >  >
> >  > FRAGMETN OUTPUT JAVA FILE USING XALAN
> >  >
> >  > xspCurrentNode =
> >  >   document.createElement("page");
> >  > xspParentNode.appendChild(xspCurrentNode);
> >  >
> >  >
> >  > SAME FRAGMENT OUTPUT JAVA FILE USING SAXON
> >  >
> >  > xspCurrentNode =
> >  >   document.createElement("page");
> >  > xspParentNode.appendChild(xspCurrentNode);
> >  >
> >  >   ((Element) xspCurrentNode).setAttribute(
> >  > "xmlns:xml",
> >  > "http://www.w3.org/XML/1998/namespace";
> >  >   );
> >  >
> >  >   ((Element) xspCurrentNode).setAttribute(
> >  > "xmlns:xsp",
> >  > "http://www.apache.org/1999/XSP/Core";
> >  >   );
> >  >

Saxon is not in cause in this problem (or maybe only for the xmlns:xml
declaration) and is compliant with the XSLT spec, while Xalan has some
bugs with the namespace:: axis and the XSP engine "relies" on this bug.

I patched the XSP engine for Cocoon 2 to avoid all these extraneous
declarations, and obviously Cocoon 1 users need this patch also. I'll
try to do it ASAP (I'm really busy these days, so don't expect it before
tomorrow) and will notify you when it's done.

-- 
Sylvain Wallez
Anyware Technologies - http://www.anyware-tech.com

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

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




Re: [C2] Startrequest fails with Tomcat 3.2.1

2001-05-29 Thread Sylvain Wallez



"Pertzsch, Christoph" a écrit :
> 
> Hello!
> 
> I have downloaded cocoon2 with cvs.
> The compilation and build of a war-file was done without errors.
> 
> After requesting http://localhost:8080/cocoon/
> i get the following errorpage.
> 
> Can someone help me?
> 
> Thanks,
> Christoph.
> 


It seems you have the latest version in the *old* CVS.

How did you get C2 : with the cocoon2 branch on the "xml-cocoon" module
(old one) or with the "xml-cocoon2" module (the good one) ?
-- 
Sylvain Wallez
Anyware Technologies - http://www.anyware-tech.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]>